pub struct NetworkInterface {
Show 16 fields pub access_configs: Vec<AccessConfig>, pub alias_ip_ranges: Vec<AliasIpRange>, pub fingerprint: Option<String>, pub internal_ipv6_prefix_length: Option<i32>, pub ipv6_access_configs: Vec<AccessConfig>, pub ipv6_access_type: Option<String>, pub ipv6_address: Option<String>, pub kind: Option<String>, pub name: Option<String>, pub network: Option<String>, pub network_attachment: Option<String>, pub network_i_p: Option<String>, pub nic_type: Option<String>, pub queue_count: Option<i32>, pub stack_type: Option<String>, pub subnetwork: Option<String>,
}
Expand description

A network interface resource attached to an instance.

Fields§

§access_configs: Vec<AccessConfig>

An array of configurations for this interface. Currently, only one access config, ONE_TO_ONE_NAT, is supported. If there are no accessConfigs specified, then this instance will have no external internet access.

§alias_ip_ranges: Vec<AliasIpRange>

An array of alias IP ranges for this network interface. You can only specify this field for network interfaces in VPC networks.

§fingerprint: Option<String>

Fingerprint hash of contents stored in this network interface. This field will be ignored when inserting an Instance or adding a NetworkInterface. An up-to-date fingerprint must be provided in order to update the NetworkInterface. The request will fail with error 400 Bad Request if the fingerprint is not provided, or 412 Precondition Failed if the fingerprint is out of date.

§internal_ipv6_prefix_length: Option<i32>

The prefix length of the primary internal IPv6 range.

§ipv6_access_configs: Vec<AccessConfig>

An array of IPv6 access configurations for this interface. Currently, only one IPv6 access config, DIRECT_IPV6, is supported. If there is no ipv6AccessConfig specified, then this instance will have no external IPv6 Internet access.

§ipv6_access_type: Option<String>

[Output Only] One of EXTERNAL, INTERNAL to indicate whether the IP can be accessed from the Internet. This field is always inherited from its subnetwork. Valid only if stackType is IPV4_IPV6. Check the Ipv6AccessType enum for the list of possible values.

§ipv6_address: Option<String>

An IPv6 internal network address for this network interface. To use a static internal IP address, it must be unused and in the same region as the instance’s zone. If not specified, Google Cloud will automatically assign an internal IPv6 address from the instance’s subnetwork.

§kind: Option<String>

[Output Only] Type of the resource. Always compute#networkInterface for network interfaces.

§name: Option<String>

[Output Only] The name of the network interface, which is generated by the server. For a VM, the network interface uses the nicN naming format. Where N is a value between 0 and 7. The default interface value is nic0.

§network: Option<String>

URL of the VPC network resource for this instance. When creating an instance, if neither the network nor the subnetwork is specified, the default network global/networks/default is used. If the selected project doesn’t have the default network, you must specify a network or subnet. If the network is not specified but the subnetwork is specified, the network is inferred. If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs: - https://www.googleapis.com/compute/v1/projects/project/global/networks/ network - projects/project/global/networks/network - global/networks/default

§network_attachment: Option<String>

The URL of the network attachment that this interface should connect to in the following format: projects/{project_number}/regions/{region_name}/networkAttachments/{network_attachment_name}.

§network_i_p: Option<String>

An IPv4 internal IP address to assign to the instance for this network interface. If not specified by the user, an unused internal IP is assigned by the system.

§nic_type: Option<String>

The type of vNIC to be used on this interface. This may be gVNIC or VirtioNet. Check the NicType enum for the list of possible values.

§queue_count: Option<i32>

The networking queue count that’s specified by users for the network interface. Both Rx and Tx queues will be set to this number. It’ll be empty if not specified by the users.

§stack_type: Option<String>

The stack type for this network interface. To assign only IPv4 addresses, use IPV4_ONLY. To assign both IPv4 and IPv6 addresses, use IPV4_IPV6. If not specified, IPV4_ONLY is used. This field can be both set at instance creation and update network interface operations. Check the StackType enum for the list of possible values.

§subnetwork: Option<String>

The URL of the Subnetwork resource for this instance. If the network resource is in legacy mode, do not specify this field. If the network is in auto subnet mode, specifying the subnetwork is optional. If the network is in custom subnet mode, specifying the subnetwork is required. If you specify this field, you can specify the subnetwork as a full or partial URL. For example, the following are all valid URLs: - https://www.googleapis.com/compute/v1/projects/project/regions/region /subnetworks/subnetwork - regions/region/subnetworks/subnetwork

Implementations§

source§

impl NetworkInterface

source

pub fn kind(&self) -> &str

Returns the value of kind, or the default value if kind is unset.

source

pub fn name(&self) -> &str

Returns the value of name, or the default value if name is unset.

source

pub fn nic_type(&self) -> &str

Returns the value of nic_type, or the default value if nic_type is unset.

source

pub fn internal_ipv6_prefix_length(&self) -> i32

Returns the value of internal_ipv6_prefix_length, or the default value if internal_ipv6_prefix_length is unset.

source

pub fn network_i_p(&self) -> &str

Returns the value of network_i_p, or the default value if network_i_p is unset.

source

pub fn network_attachment(&self) -> &str

Returns the value of network_attachment, or the default value if network_attachment is unset.

source

pub fn network(&self) -> &str

Returns the value of network, or the default value if network is unset.

source

pub fn fingerprint(&self) -> &str

Returns the value of fingerprint, or the default value if fingerprint is unset.

source

pub fn subnetwork(&self) -> &str

Returns the value of subnetwork, or the default value if subnetwork is unset.

source

pub fn ipv6_address(&self) -> &str

Returns the value of ipv6_address, or the default value if ipv6_address is unset.

source

pub fn stack_type(&self) -> &str

Returns the value of stack_type, or the default value if stack_type is unset.

source

pub fn queue_count(&self) -> i32

Returns the value of queue_count, or the default value if queue_count is unset.

source

pub fn ipv6_access_type(&self) -> &str

Returns the value of ipv6_access_type, or the default value if ipv6_access_type is unset.

Trait Implementations§

source§

impl Clone for NetworkInterface

source§

fn clone(&self) -> NetworkInterface

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for NetworkInterface

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for NetworkInterface

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl Message for NetworkInterface

source§

fn encoded_len(&self) -> usize

Returns the encoded length of the message without a length delimiter.
source§

fn clear(&mut self)

Clears the message, resetting all fields to their default.
source§

fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
where B: BufMut, Self: Sized,

Encodes the message to a buffer. Read more
source§

fn encode_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message to a newly allocated buffer.
source§

fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
where B: BufMut, Self: Sized,

Encodes the message with a length-delimiter to a buffer. Read more
source§

fn encode_length_delimited_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message with a length-delimiter to a newly allocated buffer.
source§

fn decode<B>(buf: B) -> Result<Self, DecodeError>
where B: Buf, Self: Default,

Decodes an instance of the message from a buffer. Read more
source§

fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
where B: Buf, Self: Default,

Decodes a length-delimited instance of the message from the buffer.
source§

fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
where B: Buf, Self: Sized,

Decodes an instance of the message from a buffer, and merges it into self. Read more
source§

fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
where B: Buf, Self: Sized,

Decodes a length-delimited instance of the message from buffer, and merges it into self.
source§

impl PartialEq for NetworkInterface

source§

fn eq(&self, other: &NetworkInterface) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl StructuralPartialEq for NetworkInterface

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoRequest<T> for T

source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more