pub struct NetworkPeering {
    pub auto_create_routes: Option<bool>,
    pub exchange_subnet_routes: Option<bool>,
    pub export_custom_routes: Option<bool>,
    pub export_subnet_routes_with_public_ip: Option<bool>,
    pub import_custom_routes: Option<bool>,
    pub import_subnet_routes_with_public_ip: Option<bool>,
    pub name: Option<String>,
    pub network: Option<String>,
    pub peer_mtu: Option<i32>,
    pub stack_type: Option<String>,
    pub state: Option<String>,
    pub state_details: Option<String>,
}
Expand description

A network peering attached to a network resource. The message includes the peering name, peer network, peering state, and a flag indicating whether Google Compute Engine should automatically create routes for the peering.

Fields§

§auto_create_routes: Option<bool>

This field will be deprecated soon. Use the exchange_subnet_routes field instead. Indicates whether full mesh connectivity is created and managed automatically between peered networks. Currently this field should always be true since Google Compute Engine will automatically create and manage subnetwork routes between two networks when peering state is ACTIVE.

§exchange_subnet_routes: Option<bool>

Indicates whether full mesh connectivity is created and managed automatically between peered networks. Currently this field should always be true since Google Compute Engine will automatically create and manage subnetwork routes between two networks when peering state is ACTIVE.

§export_custom_routes: Option<bool>

Whether to export the custom routes to peer network. The default value is false.

§export_subnet_routes_with_public_ip: Option<bool>

Whether subnet routes with public IP range are exported. The default value is true, all subnet routes are exported. IPv4 special-use ranges are always exported to peers and are not controlled by this field.

§import_custom_routes: Option<bool>

Whether to import the custom routes from peer network. The default value is false.

§import_subnet_routes_with_public_ip: Option<bool>

Whether subnet routes with public IP range are imported. The default value is false. IPv4 special-use ranges are always imported from peers and are not controlled by this field.

§name: Option<String>

Name of this peering. Provided by the client when the peering is created. The name must comply with RFC1035. Specifically, the name must be 1-63 characters long and match regular expression [a-z](\[-a-z0-9\]*[a-z0-9])?. The first character must be a lowercase letter, and all the following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

§network: Option<String>

The URL of the peer network. It can be either full URL or partial URL. The peer network may belong to a different project. If the partial URL does not contain project, it is assumed that the peer network is in the same project as the current network.

§peer_mtu: Option<i32>

Maximum Transmission Unit in bytes.

§stack_type: Option<String>

Which IP version(s) of traffic and routes are allowed to be imported or exported between peer networks. The default value is IPV4_ONLY. Check the StackType enum for the list of possible values.

§state: Option<String>

[Output Only] State for the peering, either ACTIVE or INACTIVE. The peering is ACTIVE when there’s a matching configuration in the peer network. Check the State enum for the list of possible values.

§state_details: Option<String>

[Output Only] Details about the current state of the peering.

Implementations§

source§

impl NetworkPeering

source

pub fn name(&self) -> &str

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

source

pub fn import_subnet_routes_with_public_ip(&self) -> bool

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

source

pub fn exchange_subnet_routes(&self) -> bool

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

source

pub fn auto_create_routes(&self) -> bool

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

source

pub fn export_custom_routes(&self) -> bool

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

source

pub fn peer_mtu(&self) -> i32

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

source

pub fn state_details(&self) -> &str

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

source

pub fn export_subnet_routes_with_public_ip(&self) -> bool

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

source

pub fn state(&self) -> &str

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

source

pub fn import_custom_routes(&self) -> bool

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

source

pub fn network(&self) -> &str

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

source

pub fn stack_type(&self) -> &str

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

Trait Implementations§

source§

impl Clone for NetworkPeering

source§

fn clone(&self) -> NetworkPeering

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 NetworkPeering

source§

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

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

impl Default for NetworkPeering

source§

fn default() -> Self

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

impl Message for NetworkPeering

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 NetworkPeering

source§

fn eq(&self, other: &NetworkPeering) -> 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 NetworkPeering

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