#![allow(rustdoc::redundant_explicit_links)]
#![allow(rustdoc::broken_intra_doc_links)]
#![no_implicit_prelude]
extern crate async_trait;
extern crate bytes;
extern crate gaxi;
extern crate google_cloud_gax;
extern crate google_cloud_iam_v1;
extern crate google_cloud_location;
extern crate google_cloud_longrunning;
extern crate google_cloud_lro;
extern crate serde;
extern crate serde_json;
extern crate serde_with;
extern crate std;
extern crate tracing;
extern crate wkt;
mod debug;
mod deserialize;
mod serialize;
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListPrivateCloudsRequest {
pub parent: std::string::String,
pub page_size: i32,
pub page_token: std::string::String,
pub filter: std::string::String,
pub order_by: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ListPrivateCloudsRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.parent = v.into();
self
}
pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.page_size = v.into();
self
}
pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.page_token = v.into();
self
}
pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.filter = v.into();
self
}
pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.order_by = v.into();
self
}
}
impl wkt::message::Message for ListPrivateCloudsRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.ListPrivateCloudsRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListPrivateCloudsResponse {
pub private_clouds: std::vec::Vec<crate::model::PrivateCloud>,
pub next_page_token: std::string::String,
pub unreachable: std::vec::Vec<std::string::String>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ListPrivateCloudsResponse {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_private_clouds<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::PrivateCloud>,
{
use std::iter::Iterator;
self.private_clouds = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.next_page_token = v.into();
self
}
pub fn set_unreachable<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<std::string::String>,
{
use std::iter::Iterator;
self.unreachable = v.into_iter().map(|i| i.into()).collect();
self
}
}
impl wkt::message::Message for ListPrivateCloudsResponse {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.ListPrivateCloudsResponse"
}
}
#[doc(hidden)]
impl google_cloud_gax::paginator::internal::PageableResponse for ListPrivateCloudsResponse {
type PageItem = crate::model::PrivateCloud;
fn items(self) -> std::vec::Vec<Self::PageItem> {
self.private_clouds
}
fn next_page_token(&self) -> std::string::String {
use std::clone::Clone;
self.next_page_token.clone()
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetPrivateCloudRequest {
pub name: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl GetPrivateCloudRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
}
impl wkt::message::Message for GetPrivateCloudRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.GetPrivateCloudRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct CreatePrivateCloudRequest {
pub parent: std::string::String,
pub private_cloud_id: std::string::String,
pub private_cloud: std::option::Option<crate::model::PrivateCloud>,
pub request_id: std::string::String,
pub validate_only: bool,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl CreatePrivateCloudRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.parent = v.into();
self
}
pub fn set_private_cloud_id<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.private_cloud_id = v.into();
self
}
pub fn set_private_cloud<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::PrivateCloud>,
{
self.private_cloud = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_private_cloud<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::PrivateCloud>,
{
self.private_cloud = v.map(|x| x.into());
self
}
pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.request_id = v.into();
self
}
pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.validate_only = v.into();
self
}
}
impl wkt::message::Message for CreatePrivateCloudRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.CreatePrivateCloudRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct UpdatePrivateCloudRequest {
pub private_cloud: std::option::Option<crate::model::PrivateCloud>,
pub update_mask: std::option::Option<wkt::FieldMask>,
pub request_id: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl UpdatePrivateCloudRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_private_cloud<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::PrivateCloud>,
{
self.private_cloud = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_private_cloud<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::PrivateCloud>,
{
self.private_cloud = v.map(|x| x.into());
self
}
pub fn set_update_mask<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::FieldMask>,
{
self.update_mask = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::FieldMask>,
{
self.update_mask = v.map(|x| x.into());
self
}
pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.request_id = v.into();
self
}
}
impl wkt::message::Message for UpdatePrivateCloudRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.UpdatePrivateCloudRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct DeletePrivateCloudRequest {
pub name: std::string::String,
pub request_id: std::string::String,
pub force: bool,
pub delay_hours: std::option::Option<i32>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl DeletePrivateCloudRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.request_id = v.into();
self
}
pub fn set_force<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.force = v.into();
self
}
pub fn set_delay_hours<T>(mut self, v: T) -> Self
where
T: std::convert::Into<i32>,
{
self.delay_hours = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_delay_hours<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<i32>,
{
self.delay_hours = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for DeletePrivateCloudRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.DeletePrivateCloudRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct UndeletePrivateCloudRequest {
pub name: std::string::String,
pub request_id: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl UndeletePrivateCloudRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.request_id = v.into();
self
}
}
impl wkt::message::Message for UndeletePrivateCloudRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.UndeletePrivateCloudRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListClustersRequest {
pub parent: std::string::String,
pub page_size: i32,
pub page_token: std::string::String,
pub filter: std::string::String,
pub order_by: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ListClustersRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.parent = v.into();
self
}
pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.page_size = v.into();
self
}
pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.page_token = v.into();
self
}
pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.filter = v.into();
self
}
pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.order_by = v.into();
self
}
}
impl wkt::message::Message for ListClustersRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.ListClustersRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListClustersResponse {
pub clusters: std::vec::Vec<crate::model::Cluster>,
pub next_page_token: std::string::String,
pub unreachable: std::vec::Vec<std::string::String>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ListClustersResponse {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_clusters<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::Cluster>,
{
use std::iter::Iterator;
self.clusters = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.next_page_token = v.into();
self
}
pub fn set_unreachable<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<std::string::String>,
{
use std::iter::Iterator;
self.unreachable = v.into_iter().map(|i| i.into()).collect();
self
}
}
impl wkt::message::Message for ListClustersResponse {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.ListClustersResponse"
}
}
#[doc(hidden)]
impl google_cloud_gax::paginator::internal::PageableResponse for ListClustersResponse {
type PageItem = crate::model::Cluster;
fn items(self) -> std::vec::Vec<Self::PageItem> {
self.clusters
}
fn next_page_token(&self) -> std::string::String {
use std::clone::Clone;
self.next_page_token.clone()
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetClusterRequest {
pub name: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl GetClusterRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
}
impl wkt::message::Message for GetClusterRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.GetClusterRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct CreateClusterRequest {
pub parent: std::string::String,
pub cluster_id: std::string::String,
pub cluster: std::option::Option<crate::model::Cluster>,
pub request_id: std::string::String,
pub validate_only: bool,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl CreateClusterRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.parent = v.into();
self
}
pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.cluster_id = v.into();
self
}
pub fn set_cluster<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::Cluster>,
{
self.cluster = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_cluster<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::Cluster>,
{
self.cluster = v.map(|x| x.into());
self
}
pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.request_id = v.into();
self
}
pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.validate_only = v.into();
self
}
}
impl wkt::message::Message for CreateClusterRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.CreateClusterRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct UpdateClusterRequest {
pub update_mask: std::option::Option<wkt::FieldMask>,
pub cluster: std::option::Option<crate::model::Cluster>,
pub request_id: std::string::String,
pub validate_only: bool,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl UpdateClusterRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_update_mask<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::FieldMask>,
{
self.update_mask = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::FieldMask>,
{
self.update_mask = v.map(|x| x.into());
self
}
pub fn set_cluster<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::Cluster>,
{
self.cluster = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_cluster<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::Cluster>,
{
self.cluster = v.map(|x| x.into());
self
}
pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.request_id = v.into();
self
}
pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.validate_only = v.into();
self
}
}
impl wkt::message::Message for UpdateClusterRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.UpdateClusterRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct DeleteClusterRequest {
pub name: std::string::String,
pub request_id: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl DeleteClusterRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.request_id = v.into();
self
}
}
impl wkt::message::Message for DeleteClusterRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.DeleteClusterRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListNodesRequest {
pub parent: std::string::String,
pub page_size: i32,
pub page_token: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ListNodesRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.parent = v.into();
self
}
pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.page_size = v.into();
self
}
pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.page_token = v.into();
self
}
}
impl wkt::message::Message for ListNodesRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.ListNodesRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListNodesResponse {
pub nodes: std::vec::Vec<crate::model::Node>,
pub next_page_token: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ListNodesResponse {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_nodes<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::Node>,
{
use std::iter::Iterator;
self.nodes = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.next_page_token = v.into();
self
}
}
impl wkt::message::Message for ListNodesResponse {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.ListNodesResponse"
}
}
#[doc(hidden)]
impl google_cloud_gax::paginator::internal::PageableResponse for ListNodesResponse {
type PageItem = crate::model::Node;
fn items(self) -> std::vec::Vec<Self::PageItem> {
self.nodes
}
fn next_page_token(&self) -> std::string::String {
use std::clone::Clone;
self.next_page_token.clone()
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetNodeRequest {
pub name: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl GetNodeRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
}
impl wkt::message::Message for GetNodeRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.GetNodeRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListExternalAddressesRequest {
pub parent: std::string::String,
pub page_size: i32,
pub page_token: std::string::String,
pub filter: std::string::String,
pub order_by: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ListExternalAddressesRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.parent = v.into();
self
}
pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.page_size = v.into();
self
}
pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.page_token = v.into();
self
}
pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.filter = v.into();
self
}
pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.order_by = v.into();
self
}
}
impl wkt::message::Message for ListExternalAddressesRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.ListExternalAddressesRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListExternalAddressesResponse {
pub external_addresses: std::vec::Vec<crate::model::ExternalAddress>,
pub next_page_token: std::string::String,
pub unreachable: std::vec::Vec<std::string::String>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ListExternalAddressesResponse {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_external_addresses<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::ExternalAddress>,
{
use std::iter::Iterator;
self.external_addresses = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.next_page_token = v.into();
self
}
pub fn set_unreachable<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<std::string::String>,
{
use std::iter::Iterator;
self.unreachable = v.into_iter().map(|i| i.into()).collect();
self
}
}
impl wkt::message::Message for ListExternalAddressesResponse {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.ListExternalAddressesResponse"
}
}
#[doc(hidden)]
impl google_cloud_gax::paginator::internal::PageableResponse for ListExternalAddressesResponse {
type PageItem = crate::model::ExternalAddress;
fn items(self) -> std::vec::Vec<Self::PageItem> {
self.external_addresses
}
fn next_page_token(&self) -> std::string::String {
use std::clone::Clone;
self.next_page_token.clone()
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct FetchNetworkPolicyExternalAddressesRequest {
pub network_policy: std::string::String,
pub page_size: i32,
pub page_token: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl FetchNetworkPolicyExternalAddressesRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_network_policy<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.network_policy = v.into();
self
}
pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.page_size = v.into();
self
}
pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.page_token = v.into();
self
}
}
impl wkt::message::Message for FetchNetworkPolicyExternalAddressesRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.FetchNetworkPolicyExternalAddressesRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct FetchNetworkPolicyExternalAddressesResponse {
pub external_addresses: std::vec::Vec<crate::model::ExternalAddress>,
pub next_page_token: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl FetchNetworkPolicyExternalAddressesResponse {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_external_addresses<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::ExternalAddress>,
{
use std::iter::Iterator;
self.external_addresses = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.next_page_token = v.into();
self
}
}
impl wkt::message::Message for FetchNetworkPolicyExternalAddressesResponse {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.FetchNetworkPolicyExternalAddressesResponse"
}
}
#[doc(hidden)]
impl google_cloud_gax::paginator::internal::PageableResponse
for FetchNetworkPolicyExternalAddressesResponse
{
type PageItem = crate::model::ExternalAddress;
fn items(self) -> std::vec::Vec<Self::PageItem> {
self.external_addresses
}
fn next_page_token(&self) -> std::string::String {
use std::clone::Clone;
self.next_page_token.clone()
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetExternalAddressRequest {
pub name: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl GetExternalAddressRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
}
impl wkt::message::Message for GetExternalAddressRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.GetExternalAddressRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct CreateExternalAddressRequest {
pub parent: std::string::String,
pub external_address: std::option::Option<crate::model::ExternalAddress>,
pub external_address_id: std::string::String,
pub request_id: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl CreateExternalAddressRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.parent = v.into();
self
}
pub fn set_external_address<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::ExternalAddress>,
{
self.external_address = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_external_address<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::ExternalAddress>,
{
self.external_address = v.map(|x| x.into());
self
}
pub fn set_external_address_id<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.external_address_id = v.into();
self
}
pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.request_id = v.into();
self
}
}
impl wkt::message::Message for CreateExternalAddressRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.CreateExternalAddressRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct UpdateExternalAddressRequest {
pub update_mask: std::option::Option<wkt::FieldMask>,
pub external_address: std::option::Option<crate::model::ExternalAddress>,
pub request_id: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl UpdateExternalAddressRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_update_mask<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::FieldMask>,
{
self.update_mask = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::FieldMask>,
{
self.update_mask = v.map(|x| x.into());
self
}
pub fn set_external_address<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::ExternalAddress>,
{
self.external_address = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_external_address<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::ExternalAddress>,
{
self.external_address = v.map(|x| x.into());
self
}
pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.request_id = v.into();
self
}
}
impl wkt::message::Message for UpdateExternalAddressRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.UpdateExternalAddressRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct DeleteExternalAddressRequest {
pub name: std::string::String,
pub request_id: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl DeleteExternalAddressRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.request_id = v.into();
self
}
}
impl wkt::message::Message for DeleteExternalAddressRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.DeleteExternalAddressRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListSubnetsRequest {
pub parent: std::string::String,
pub page_size: i32,
pub page_token: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ListSubnetsRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.parent = v.into();
self
}
pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.page_size = v.into();
self
}
pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.page_token = v.into();
self
}
}
impl wkt::message::Message for ListSubnetsRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.ListSubnetsRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListSubnetsResponse {
pub subnets: std::vec::Vec<crate::model::Subnet>,
pub next_page_token: std::string::String,
pub unreachable: std::vec::Vec<std::string::String>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ListSubnetsResponse {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_subnets<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::Subnet>,
{
use std::iter::Iterator;
self.subnets = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.next_page_token = v.into();
self
}
pub fn set_unreachable<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<std::string::String>,
{
use std::iter::Iterator;
self.unreachable = v.into_iter().map(|i| i.into()).collect();
self
}
}
impl wkt::message::Message for ListSubnetsResponse {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.ListSubnetsResponse"
}
}
#[doc(hidden)]
impl google_cloud_gax::paginator::internal::PageableResponse for ListSubnetsResponse {
type PageItem = crate::model::Subnet;
fn items(self) -> std::vec::Vec<Self::PageItem> {
self.subnets
}
fn next_page_token(&self) -> std::string::String {
use std::clone::Clone;
self.next_page_token.clone()
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetSubnetRequest {
pub name: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl GetSubnetRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
}
impl wkt::message::Message for GetSubnetRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.GetSubnetRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct UpdateSubnetRequest {
pub update_mask: std::option::Option<wkt::FieldMask>,
pub subnet: std::option::Option<crate::model::Subnet>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl UpdateSubnetRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_update_mask<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::FieldMask>,
{
self.update_mask = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::FieldMask>,
{
self.update_mask = v.map(|x| x.into());
self
}
pub fn set_subnet<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::Subnet>,
{
self.subnet = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_subnet<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::Subnet>,
{
self.subnet = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for UpdateSubnetRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.UpdateSubnetRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListExternalAccessRulesRequest {
pub parent: std::string::String,
pub page_size: i32,
pub page_token: std::string::String,
pub filter: std::string::String,
pub order_by: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ListExternalAccessRulesRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.parent = v.into();
self
}
pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.page_size = v.into();
self
}
pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.page_token = v.into();
self
}
pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.filter = v.into();
self
}
pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.order_by = v.into();
self
}
}
impl wkt::message::Message for ListExternalAccessRulesRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.ListExternalAccessRulesRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListExternalAccessRulesResponse {
pub external_access_rules: std::vec::Vec<crate::model::ExternalAccessRule>,
pub next_page_token: std::string::String,
pub unreachable: std::vec::Vec<std::string::String>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ListExternalAccessRulesResponse {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_external_access_rules<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::ExternalAccessRule>,
{
use std::iter::Iterator;
self.external_access_rules = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.next_page_token = v.into();
self
}
pub fn set_unreachable<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<std::string::String>,
{
use std::iter::Iterator;
self.unreachable = v.into_iter().map(|i| i.into()).collect();
self
}
}
impl wkt::message::Message for ListExternalAccessRulesResponse {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.ListExternalAccessRulesResponse"
}
}
#[doc(hidden)]
impl google_cloud_gax::paginator::internal::PageableResponse for ListExternalAccessRulesResponse {
type PageItem = crate::model::ExternalAccessRule;
fn items(self) -> std::vec::Vec<Self::PageItem> {
self.external_access_rules
}
fn next_page_token(&self) -> std::string::String {
use std::clone::Clone;
self.next_page_token.clone()
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetExternalAccessRuleRequest {
pub name: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl GetExternalAccessRuleRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
}
impl wkt::message::Message for GetExternalAccessRuleRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.GetExternalAccessRuleRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct CreateExternalAccessRuleRequest {
pub parent: std::string::String,
pub external_access_rule: std::option::Option<crate::model::ExternalAccessRule>,
pub external_access_rule_id: std::string::String,
pub request_id: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl CreateExternalAccessRuleRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.parent = v.into();
self
}
pub fn set_external_access_rule<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::ExternalAccessRule>,
{
self.external_access_rule = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_external_access_rule<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::ExternalAccessRule>,
{
self.external_access_rule = v.map(|x| x.into());
self
}
pub fn set_external_access_rule_id<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.external_access_rule_id = v.into();
self
}
pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.request_id = v.into();
self
}
}
impl wkt::message::Message for CreateExternalAccessRuleRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.CreateExternalAccessRuleRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct UpdateExternalAccessRuleRequest {
pub update_mask: std::option::Option<wkt::FieldMask>,
pub external_access_rule: std::option::Option<crate::model::ExternalAccessRule>,
pub request_id: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl UpdateExternalAccessRuleRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_update_mask<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::FieldMask>,
{
self.update_mask = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::FieldMask>,
{
self.update_mask = v.map(|x| x.into());
self
}
pub fn set_external_access_rule<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::ExternalAccessRule>,
{
self.external_access_rule = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_external_access_rule<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::ExternalAccessRule>,
{
self.external_access_rule = v.map(|x| x.into());
self
}
pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.request_id = v.into();
self
}
}
impl wkt::message::Message for UpdateExternalAccessRuleRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.UpdateExternalAccessRuleRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct DeleteExternalAccessRuleRequest {
pub name: std::string::String,
pub request_id: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl DeleteExternalAccessRuleRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.request_id = v.into();
self
}
}
impl wkt::message::Message for DeleteExternalAccessRuleRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.DeleteExternalAccessRuleRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListLoggingServersRequest {
pub parent: std::string::String,
pub page_size: i32,
pub page_token: std::string::String,
pub filter: std::string::String,
pub order_by: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ListLoggingServersRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.parent = v.into();
self
}
pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.page_size = v.into();
self
}
pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.page_token = v.into();
self
}
pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.filter = v.into();
self
}
pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.order_by = v.into();
self
}
}
impl wkt::message::Message for ListLoggingServersRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.ListLoggingServersRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListLoggingServersResponse {
pub logging_servers: std::vec::Vec<crate::model::LoggingServer>,
pub next_page_token: std::string::String,
pub unreachable: std::vec::Vec<std::string::String>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ListLoggingServersResponse {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_logging_servers<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::LoggingServer>,
{
use std::iter::Iterator;
self.logging_servers = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.next_page_token = v.into();
self
}
pub fn set_unreachable<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<std::string::String>,
{
use std::iter::Iterator;
self.unreachable = v.into_iter().map(|i| i.into()).collect();
self
}
}
impl wkt::message::Message for ListLoggingServersResponse {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.ListLoggingServersResponse"
}
}
#[doc(hidden)]
impl google_cloud_gax::paginator::internal::PageableResponse for ListLoggingServersResponse {
type PageItem = crate::model::LoggingServer;
fn items(self) -> std::vec::Vec<Self::PageItem> {
self.logging_servers
}
fn next_page_token(&self) -> std::string::String {
use std::clone::Clone;
self.next_page_token.clone()
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetLoggingServerRequest {
pub name: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl GetLoggingServerRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
}
impl wkt::message::Message for GetLoggingServerRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.GetLoggingServerRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct CreateLoggingServerRequest {
pub parent: std::string::String,
pub logging_server: std::option::Option<crate::model::LoggingServer>,
pub logging_server_id: std::string::String,
pub request_id: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl CreateLoggingServerRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.parent = v.into();
self
}
pub fn set_logging_server<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::LoggingServer>,
{
self.logging_server = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_logging_server<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::LoggingServer>,
{
self.logging_server = v.map(|x| x.into());
self
}
pub fn set_logging_server_id<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.logging_server_id = v.into();
self
}
pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.request_id = v.into();
self
}
}
impl wkt::message::Message for CreateLoggingServerRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.CreateLoggingServerRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct UpdateLoggingServerRequest {
pub update_mask: std::option::Option<wkt::FieldMask>,
pub logging_server: std::option::Option<crate::model::LoggingServer>,
pub request_id: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl UpdateLoggingServerRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_update_mask<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::FieldMask>,
{
self.update_mask = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::FieldMask>,
{
self.update_mask = v.map(|x| x.into());
self
}
pub fn set_logging_server<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::LoggingServer>,
{
self.logging_server = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_logging_server<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::LoggingServer>,
{
self.logging_server = v.map(|x| x.into());
self
}
pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.request_id = v.into();
self
}
}
impl wkt::message::Message for UpdateLoggingServerRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.UpdateLoggingServerRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct DeleteLoggingServerRequest {
pub name: std::string::String,
pub request_id: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl DeleteLoggingServerRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.request_id = v.into();
self
}
}
impl wkt::message::Message for DeleteLoggingServerRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.DeleteLoggingServerRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct OperationMetadata {
pub create_time: std::option::Option<wkt::Timestamp>,
pub end_time: std::option::Option<wkt::Timestamp>,
pub target: std::string::String,
pub verb: std::string::String,
pub status_message: std::string::String,
pub requested_cancellation: bool,
pub api_version: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl OperationMetadata {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_create_time<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.create_time = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.create_time = v.map(|x| x.into());
self
}
pub fn set_end_time<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.end_time = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.end_time = v.map(|x| x.into());
self
}
pub fn set_target<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.target = v.into();
self
}
pub fn set_verb<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.verb = v.into();
self
}
pub fn set_status_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.status_message = v.into();
self
}
pub fn set_requested_cancellation<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.requested_cancellation = v.into();
self
}
pub fn set_api_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.api_version = v.into();
self
}
}
impl wkt::message::Message for OperationMetadata {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.OperationMetadata"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListNodeTypesRequest {
pub parent: std::string::String,
pub page_size: i32,
pub page_token: std::string::String,
pub filter: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ListNodeTypesRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.parent = v.into();
self
}
pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.page_size = v.into();
self
}
pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.page_token = v.into();
self
}
pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.filter = v.into();
self
}
}
impl wkt::message::Message for ListNodeTypesRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.ListNodeTypesRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListNodeTypesResponse {
pub node_types: std::vec::Vec<crate::model::NodeType>,
pub next_page_token: std::string::String,
pub unreachable: std::vec::Vec<std::string::String>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ListNodeTypesResponse {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_node_types<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::NodeType>,
{
use std::iter::Iterator;
self.node_types = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.next_page_token = v.into();
self
}
pub fn set_unreachable<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<std::string::String>,
{
use std::iter::Iterator;
self.unreachable = v.into_iter().map(|i| i.into()).collect();
self
}
}
impl wkt::message::Message for ListNodeTypesResponse {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.ListNodeTypesResponse"
}
}
#[doc(hidden)]
impl google_cloud_gax::paginator::internal::PageableResponse for ListNodeTypesResponse {
type PageItem = crate::model::NodeType;
fn items(self) -> std::vec::Vec<Self::PageItem> {
self.node_types
}
fn next_page_token(&self) -> std::string::String {
use std::clone::Clone;
self.next_page_token.clone()
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetNodeTypeRequest {
pub name: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl GetNodeTypeRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
}
impl wkt::message::Message for GetNodeTypeRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.GetNodeTypeRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ShowNsxCredentialsRequest {
pub private_cloud: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ShowNsxCredentialsRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_private_cloud<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.private_cloud = v.into();
self
}
}
impl wkt::message::Message for ShowNsxCredentialsRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.ShowNsxCredentialsRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ShowVcenterCredentialsRequest {
pub private_cloud: std::string::String,
pub username: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ShowVcenterCredentialsRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_private_cloud<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.private_cloud = v.into();
self
}
pub fn set_username<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.username = v.into();
self
}
}
impl wkt::message::Message for ShowVcenterCredentialsRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.ShowVcenterCredentialsRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ResetNsxCredentialsRequest {
pub private_cloud: std::string::String,
pub request_id: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ResetNsxCredentialsRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_private_cloud<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.private_cloud = v.into();
self
}
pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.request_id = v.into();
self
}
}
impl wkt::message::Message for ResetNsxCredentialsRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.ResetNsxCredentialsRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ResetVcenterCredentialsRequest {
pub private_cloud: std::string::String,
pub request_id: std::string::String,
pub username: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ResetVcenterCredentialsRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_private_cloud<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.private_cloud = v.into();
self
}
pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.request_id = v.into();
self
}
pub fn set_username<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.username = v.into();
self
}
}
impl wkt::message::Message for ResetVcenterCredentialsRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.ResetVcenterCredentialsRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListHcxActivationKeysResponse {
pub hcx_activation_keys: std::vec::Vec<crate::model::HcxActivationKey>,
pub next_page_token: std::string::String,
pub unreachable: std::vec::Vec<std::string::String>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ListHcxActivationKeysResponse {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_hcx_activation_keys<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::HcxActivationKey>,
{
use std::iter::Iterator;
self.hcx_activation_keys = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.next_page_token = v.into();
self
}
pub fn set_unreachable<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<std::string::String>,
{
use std::iter::Iterator;
self.unreachable = v.into_iter().map(|i| i.into()).collect();
self
}
}
impl wkt::message::Message for ListHcxActivationKeysResponse {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.ListHcxActivationKeysResponse"
}
}
#[doc(hidden)]
impl google_cloud_gax::paginator::internal::PageableResponse for ListHcxActivationKeysResponse {
type PageItem = crate::model::HcxActivationKey;
fn items(self) -> std::vec::Vec<Self::PageItem> {
self.hcx_activation_keys
}
fn next_page_token(&self) -> std::string::String {
use std::clone::Clone;
self.next_page_token.clone()
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListHcxActivationKeysRequest {
pub parent: std::string::String,
pub page_size: i32,
pub page_token: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ListHcxActivationKeysRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.parent = v.into();
self
}
pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.page_size = v.into();
self
}
pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.page_token = v.into();
self
}
}
impl wkt::message::Message for ListHcxActivationKeysRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.ListHcxActivationKeysRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetHcxActivationKeyRequest {
pub name: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl GetHcxActivationKeyRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
}
impl wkt::message::Message for GetHcxActivationKeyRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.GetHcxActivationKeyRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct CreateHcxActivationKeyRequest {
pub parent: std::string::String,
pub hcx_activation_key: std::option::Option<crate::model::HcxActivationKey>,
pub hcx_activation_key_id: std::string::String,
pub request_id: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl CreateHcxActivationKeyRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.parent = v.into();
self
}
pub fn set_hcx_activation_key<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::HcxActivationKey>,
{
self.hcx_activation_key = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_hcx_activation_key<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::HcxActivationKey>,
{
self.hcx_activation_key = v.map(|x| x.into());
self
}
pub fn set_hcx_activation_key_id<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.hcx_activation_key_id = v.into();
self
}
pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.request_id = v.into();
self
}
}
impl wkt::message::Message for CreateHcxActivationKeyRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.CreateHcxActivationKeyRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetDnsForwardingRequest {
pub name: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl GetDnsForwardingRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
}
impl wkt::message::Message for GetDnsForwardingRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.GetDnsForwardingRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct UpdateDnsForwardingRequest {
pub dns_forwarding: std::option::Option<crate::model::DnsForwarding>,
pub update_mask: std::option::Option<wkt::FieldMask>,
pub request_id: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl UpdateDnsForwardingRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_dns_forwarding<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::DnsForwarding>,
{
self.dns_forwarding = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_dns_forwarding<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::DnsForwarding>,
{
self.dns_forwarding = v.map(|x| x.into());
self
}
pub fn set_update_mask<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::FieldMask>,
{
self.update_mask = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::FieldMask>,
{
self.update_mask = v.map(|x| x.into());
self
}
pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.request_id = v.into();
self
}
}
impl wkt::message::Message for UpdateDnsForwardingRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.UpdateDnsForwardingRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct CreateNetworkPeeringRequest {
pub parent: std::string::String,
pub network_peering_id: std::string::String,
pub network_peering: std::option::Option<crate::model::NetworkPeering>,
pub request_id: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl CreateNetworkPeeringRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.parent = v.into();
self
}
pub fn set_network_peering_id<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.network_peering_id = v.into();
self
}
pub fn set_network_peering<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::NetworkPeering>,
{
self.network_peering = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_network_peering<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::NetworkPeering>,
{
self.network_peering = v.map(|x| x.into());
self
}
pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.request_id = v.into();
self
}
}
impl wkt::message::Message for CreateNetworkPeeringRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.CreateNetworkPeeringRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct DeleteNetworkPeeringRequest {
pub name: std::string::String,
pub request_id: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl DeleteNetworkPeeringRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.request_id = v.into();
self
}
}
impl wkt::message::Message for DeleteNetworkPeeringRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.DeleteNetworkPeeringRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetNetworkPeeringRequest {
pub name: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl GetNetworkPeeringRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
}
impl wkt::message::Message for GetNetworkPeeringRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.GetNetworkPeeringRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListNetworkPeeringsRequest {
pub parent: std::string::String,
pub page_size: i32,
pub page_token: std::string::String,
pub filter: std::string::String,
pub order_by: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ListNetworkPeeringsRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.parent = v.into();
self
}
pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.page_size = v.into();
self
}
pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.page_token = v.into();
self
}
pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.filter = v.into();
self
}
pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.order_by = v.into();
self
}
}
impl wkt::message::Message for ListNetworkPeeringsRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.ListNetworkPeeringsRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct UpdateNetworkPeeringRequest {
pub network_peering: std::option::Option<crate::model::NetworkPeering>,
pub update_mask: std::option::Option<wkt::FieldMask>,
pub request_id: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl UpdateNetworkPeeringRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_network_peering<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::NetworkPeering>,
{
self.network_peering = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_network_peering<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::NetworkPeering>,
{
self.network_peering = v.map(|x| x.into());
self
}
pub fn set_update_mask<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::FieldMask>,
{
self.update_mask = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::FieldMask>,
{
self.update_mask = v.map(|x| x.into());
self
}
pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.request_id = v.into();
self
}
}
impl wkt::message::Message for UpdateNetworkPeeringRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.UpdateNetworkPeeringRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListNetworkPeeringsResponse {
pub network_peerings: std::vec::Vec<crate::model::NetworkPeering>,
pub next_page_token: std::string::String,
pub unreachable: std::vec::Vec<std::string::String>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ListNetworkPeeringsResponse {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_network_peerings<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::NetworkPeering>,
{
use std::iter::Iterator;
self.network_peerings = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.next_page_token = v.into();
self
}
pub fn set_unreachable<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<std::string::String>,
{
use std::iter::Iterator;
self.unreachable = v.into_iter().map(|i| i.into()).collect();
self
}
}
impl wkt::message::Message for ListNetworkPeeringsResponse {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.ListNetworkPeeringsResponse"
}
}
#[doc(hidden)]
impl google_cloud_gax::paginator::internal::PageableResponse for ListNetworkPeeringsResponse {
type PageItem = crate::model::NetworkPeering;
fn items(self) -> std::vec::Vec<Self::PageItem> {
self.network_peerings
}
fn next_page_token(&self) -> std::string::String {
use std::clone::Clone;
self.next_page_token.clone()
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListPeeringRoutesRequest {
pub parent: std::string::String,
pub page_size: i32,
pub page_token: std::string::String,
pub filter: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ListPeeringRoutesRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.parent = v.into();
self
}
pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.page_size = v.into();
self
}
pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.page_token = v.into();
self
}
pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.filter = v.into();
self
}
}
impl wkt::message::Message for ListPeeringRoutesRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.ListPeeringRoutesRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListPeeringRoutesResponse {
pub peering_routes: std::vec::Vec<crate::model::PeeringRoute>,
pub next_page_token: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ListPeeringRoutesResponse {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_peering_routes<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::PeeringRoute>,
{
use std::iter::Iterator;
self.peering_routes = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.next_page_token = v.into();
self
}
}
impl wkt::message::Message for ListPeeringRoutesResponse {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.ListPeeringRoutesResponse"
}
}
#[doc(hidden)]
impl google_cloud_gax::paginator::internal::PageableResponse for ListPeeringRoutesResponse {
type PageItem = crate::model::PeeringRoute;
fn items(self) -> std::vec::Vec<Self::PageItem> {
self.peering_routes
}
fn next_page_token(&self) -> std::string::String {
use std::clone::Clone;
self.next_page_token.clone()
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListNetworkPoliciesRequest {
pub parent: std::string::String,
pub page_size: i32,
pub page_token: std::string::String,
pub filter: std::string::String,
pub order_by: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ListNetworkPoliciesRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.parent = v.into();
self
}
pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.page_size = v.into();
self
}
pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.page_token = v.into();
self
}
pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.filter = v.into();
self
}
pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.order_by = v.into();
self
}
}
impl wkt::message::Message for ListNetworkPoliciesRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.ListNetworkPoliciesRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListNetworkPoliciesResponse {
pub network_policies: std::vec::Vec<crate::model::NetworkPolicy>,
pub next_page_token: std::string::String,
pub unreachable: std::vec::Vec<std::string::String>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ListNetworkPoliciesResponse {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_network_policies<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::NetworkPolicy>,
{
use std::iter::Iterator;
self.network_policies = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.next_page_token = v.into();
self
}
pub fn set_unreachable<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<std::string::String>,
{
use std::iter::Iterator;
self.unreachable = v.into_iter().map(|i| i.into()).collect();
self
}
}
impl wkt::message::Message for ListNetworkPoliciesResponse {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.ListNetworkPoliciesResponse"
}
}
#[doc(hidden)]
impl google_cloud_gax::paginator::internal::PageableResponse for ListNetworkPoliciesResponse {
type PageItem = crate::model::NetworkPolicy;
fn items(self) -> std::vec::Vec<Self::PageItem> {
self.network_policies
}
fn next_page_token(&self) -> std::string::String {
use std::clone::Clone;
self.next_page_token.clone()
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetNetworkPolicyRequest {
pub name: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl GetNetworkPolicyRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
}
impl wkt::message::Message for GetNetworkPolicyRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.GetNetworkPolicyRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct UpdateNetworkPolicyRequest {
pub network_policy: std::option::Option<crate::model::NetworkPolicy>,
pub update_mask: std::option::Option<wkt::FieldMask>,
pub request_id: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl UpdateNetworkPolicyRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_network_policy<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::NetworkPolicy>,
{
self.network_policy = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_network_policy<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::NetworkPolicy>,
{
self.network_policy = v.map(|x| x.into());
self
}
pub fn set_update_mask<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::FieldMask>,
{
self.update_mask = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::FieldMask>,
{
self.update_mask = v.map(|x| x.into());
self
}
pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.request_id = v.into();
self
}
}
impl wkt::message::Message for UpdateNetworkPolicyRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.UpdateNetworkPolicyRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct CreateNetworkPolicyRequest {
pub parent: std::string::String,
pub network_policy_id: std::string::String,
pub network_policy: std::option::Option<crate::model::NetworkPolicy>,
pub request_id: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl CreateNetworkPolicyRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.parent = v.into();
self
}
pub fn set_network_policy_id<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.network_policy_id = v.into();
self
}
pub fn set_network_policy<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::NetworkPolicy>,
{
self.network_policy = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_network_policy<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::NetworkPolicy>,
{
self.network_policy = v.map(|x| x.into());
self
}
pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.request_id = v.into();
self
}
}
impl wkt::message::Message for CreateNetworkPolicyRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.CreateNetworkPolicyRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct DeleteNetworkPolicyRequest {
pub name: std::string::String,
pub request_id: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl DeleteNetworkPolicyRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.request_id = v.into();
self
}
}
impl wkt::message::Message for DeleteNetworkPolicyRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.DeleteNetworkPolicyRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListManagementDnsZoneBindingsRequest {
pub parent: std::string::String,
pub page_size: i32,
pub page_token: std::string::String,
pub filter: std::string::String,
pub order_by: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ListManagementDnsZoneBindingsRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.parent = v.into();
self
}
pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.page_size = v.into();
self
}
pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.page_token = v.into();
self
}
pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.filter = v.into();
self
}
pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.order_by = v.into();
self
}
}
impl wkt::message::Message for ListManagementDnsZoneBindingsRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.ListManagementDnsZoneBindingsRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListManagementDnsZoneBindingsResponse {
pub management_dns_zone_bindings: std::vec::Vec<crate::model::ManagementDnsZoneBinding>,
pub next_page_token: std::string::String,
pub unreachable: std::vec::Vec<std::string::String>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ListManagementDnsZoneBindingsResponse {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_management_dns_zone_bindings<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::ManagementDnsZoneBinding>,
{
use std::iter::Iterator;
self.management_dns_zone_bindings = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.next_page_token = v.into();
self
}
pub fn set_unreachable<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<std::string::String>,
{
use std::iter::Iterator;
self.unreachable = v.into_iter().map(|i| i.into()).collect();
self
}
}
impl wkt::message::Message for ListManagementDnsZoneBindingsResponse {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.ListManagementDnsZoneBindingsResponse"
}
}
#[doc(hidden)]
impl google_cloud_gax::paginator::internal::PageableResponse
for ListManagementDnsZoneBindingsResponse
{
type PageItem = crate::model::ManagementDnsZoneBinding;
fn items(self) -> std::vec::Vec<Self::PageItem> {
self.management_dns_zone_bindings
}
fn next_page_token(&self) -> std::string::String {
use std::clone::Clone;
self.next_page_token.clone()
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetManagementDnsZoneBindingRequest {
pub name: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl GetManagementDnsZoneBindingRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
}
impl wkt::message::Message for GetManagementDnsZoneBindingRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.GetManagementDnsZoneBindingRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct CreateManagementDnsZoneBindingRequest {
pub parent: std::string::String,
pub management_dns_zone_binding: std::option::Option<crate::model::ManagementDnsZoneBinding>,
pub management_dns_zone_binding_id: std::string::String,
pub request_id: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl CreateManagementDnsZoneBindingRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.parent = v.into();
self
}
pub fn set_management_dns_zone_binding<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::ManagementDnsZoneBinding>,
{
self.management_dns_zone_binding = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_management_dns_zone_binding<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::ManagementDnsZoneBinding>,
{
self.management_dns_zone_binding = v.map(|x| x.into());
self
}
pub fn set_management_dns_zone_binding_id<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.management_dns_zone_binding_id = v.into();
self
}
pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.request_id = v.into();
self
}
}
impl wkt::message::Message for CreateManagementDnsZoneBindingRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.CreateManagementDnsZoneBindingRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct UpdateManagementDnsZoneBindingRequest {
pub update_mask: std::option::Option<wkt::FieldMask>,
pub management_dns_zone_binding: std::option::Option<crate::model::ManagementDnsZoneBinding>,
pub request_id: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl UpdateManagementDnsZoneBindingRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_update_mask<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::FieldMask>,
{
self.update_mask = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::FieldMask>,
{
self.update_mask = v.map(|x| x.into());
self
}
pub fn set_management_dns_zone_binding<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::ManagementDnsZoneBinding>,
{
self.management_dns_zone_binding = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_management_dns_zone_binding<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::ManagementDnsZoneBinding>,
{
self.management_dns_zone_binding = v.map(|x| x.into());
self
}
pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.request_id = v.into();
self
}
}
impl wkt::message::Message for UpdateManagementDnsZoneBindingRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.UpdateManagementDnsZoneBindingRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct DeleteManagementDnsZoneBindingRequest {
pub name: std::string::String,
pub request_id: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl DeleteManagementDnsZoneBindingRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.request_id = v.into();
self
}
}
impl wkt::message::Message for DeleteManagementDnsZoneBindingRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.DeleteManagementDnsZoneBindingRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct RepairManagementDnsZoneBindingRequest {
pub name: std::string::String,
pub request_id: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl RepairManagementDnsZoneBindingRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.request_id = v.into();
self
}
}
impl wkt::message::Message for RepairManagementDnsZoneBindingRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.RepairManagementDnsZoneBindingRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct CreateVmwareEngineNetworkRequest {
pub parent: std::string::String,
pub vmware_engine_network_id: std::string::String,
pub vmware_engine_network: std::option::Option<crate::model::VmwareEngineNetwork>,
pub request_id: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl CreateVmwareEngineNetworkRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.parent = v.into();
self
}
pub fn set_vmware_engine_network_id<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.vmware_engine_network_id = v.into();
self
}
pub fn set_vmware_engine_network<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::VmwareEngineNetwork>,
{
self.vmware_engine_network = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_vmware_engine_network<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::VmwareEngineNetwork>,
{
self.vmware_engine_network = v.map(|x| x.into());
self
}
pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.request_id = v.into();
self
}
}
impl wkt::message::Message for CreateVmwareEngineNetworkRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.CreateVmwareEngineNetworkRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct UpdateVmwareEngineNetworkRequest {
pub vmware_engine_network: std::option::Option<crate::model::VmwareEngineNetwork>,
pub update_mask: std::option::Option<wkt::FieldMask>,
pub request_id: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl UpdateVmwareEngineNetworkRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_vmware_engine_network<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::VmwareEngineNetwork>,
{
self.vmware_engine_network = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_vmware_engine_network<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::VmwareEngineNetwork>,
{
self.vmware_engine_network = v.map(|x| x.into());
self
}
pub fn set_update_mask<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::FieldMask>,
{
self.update_mask = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::FieldMask>,
{
self.update_mask = v.map(|x| x.into());
self
}
pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.request_id = v.into();
self
}
}
impl wkt::message::Message for UpdateVmwareEngineNetworkRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.UpdateVmwareEngineNetworkRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct DeleteVmwareEngineNetworkRequest {
pub name: std::string::String,
pub request_id: std::string::String,
pub etag: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl DeleteVmwareEngineNetworkRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.request_id = v.into();
self
}
pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.etag = v.into();
self
}
}
impl wkt::message::Message for DeleteVmwareEngineNetworkRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.DeleteVmwareEngineNetworkRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetVmwareEngineNetworkRequest {
pub name: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl GetVmwareEngineNetworkRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
}
impl wkt::message::Message for GetVmwareEngineNetworkRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.GetVmwareEngineNetworkRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListVmwareEngineNetworksRequest {
pub parent: std::string::String,
pub page_size: i32,
pub page_token: std::string::String,
pub filter: std::string::String,
pub order_by: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ListVmwareEngineNetworksRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.parent = v.into();
self
}
pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.page_size = v.into();
self
}
pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.page_token = v.into();
self
}
pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.filter = v.into();
self
}
pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.order_by = v.into();
self
}
}
impl wkt::message::Message for ListVmwareEngineNetworksRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.ListVmwareEngineNetworksRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListVmwareEngineNetworksResponse {
pub vmware_engine_networks: std::vec::Vec<crate::model::VmwareEngineNetwork>,
pub next_page_token: std::string::String,
pub unreachable: std::vec::Vec<std::string::String>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ListVmwareEngineNetworksResponse {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_vmware_engine_networks<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::VmwareEngineNetwork>,
{
use std::iter::Iterator;
self.vmware_engine_networks = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.next_page_token = v.into();
self
}
pub fn set_unreachable<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<std::string::String>,
{
use std::iter::Iterator;
self.unreachable = v.into_iter().map(|i| i.into()).collect();
self
}
}
impl wkt::message::Message for ListVmwareEngineNetworksResponse {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.ListVmwareEngineNetworksResponse"
}
}
#[doc(hidden)]
impl google_cloud_gax::paginator::internal::PageableResponse for ListVmwareEngineNetworksResponse {
type PageItem = crate::model::VmwareEngineNetwork;
fn items(self) -> std::vec::Vec<Self::PageItem> {
self.vmware_engine_networks
}
fn next_page_token(&self) -> std::string::String {
use std::clone::Clone;
self.next_page_token.clone()
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct CreatePrivateConnectionRequest {
pub parent: std::string::String,
pub private_connection_id: std::string::String,
pub private_connection: std::option::Option<crate::model::PrivateConnection>,
pub request_id: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl CreatePrivateConnectionRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.parent = v.into();
self
}
pub fn set_private_connection_id<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.private_connection_id = v.into();
self
}
pub fn set_private_connection<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::PrivateConnection>,
{
self.private_connection = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_private_connection<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::PrivateConnection>,
{
self.private_connection = v.map(|x| x.into());
self
}
pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.request_id = v.into();
self
}
}
impl wkt::message::Message for CreatePrivateConnectionRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.CreatePrivateConnectionRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetPrivateConnectionRequest {
pub name: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl GetPrivateConnectionRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
}
impl wkt::message::Message for GetPrivateConnectionRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.GetPrivateConnectionRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListPrivateConnectionsRequest {
pub parent: std::string::String,
pub page_size: i32,
pub page_token: std::string::String,
pub filter: std::string::String,
pub order_by: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ListPrivateConnectionsRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.parent = v.into();
self
}
pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.page_size = v.into();
self
}
pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.page_token = v.into();
self
}
pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.filter = v.into();
self
}
pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.order_by = v.into();
self
}
}
impl wkt::message::Message for ListPrivateConnectionsRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.ListPrivateConnectionsRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListPrivateConnectionsResponse {
pub private_connections: std::vec::Vec<crate::model::PrivateConnection>,
pub next_page_token: std::string::String,
pub unreachable: std::vec::Vec<std::string::String>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ListPrivateConnectionsResponse {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_private_connections<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::PrivateConnection>,
{
use std::iter::Iterator;
self.private_connections = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.next_page_token = v.into();
self
}
pub fn set_unreachable<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<std::string::String>,
{
use std::iter::Iterator;
self.unreachable = v.into_iter().map(|i| i.into()).collect();
self
}
}
impl wkt::message::Message for ListPrivateConnectionsResponse {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.ListPrivateConnectionsResponse"
}
}
#[doc(hidden)]
impl google_cloud_gax::paginator::internal::PageableResponse for ListPrivateConnectionsResponse {
type PageItem = crate::model::PrivateConnection;
fn items(self) -> std::vec::Vec<Self::PageItem> {
self.private_connections
}
fn next_page_token(&self) -> std::string::String {
use std::clone::Clone;
self.next_page_token.clone()
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct UpdatePrivateConnectionRequest {
pub private_connection: std::option::Option<crate::model::PrivateConnection>,
pub update_mask: std::option::Option<wkt::FieldMask>,
pub request_id: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl UpdatePrivateConnectionRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_private_connection<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::PrivateConnection>,
{
self.private_connection = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_private_connection<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::PrivateConnection>,
{
self.private_connection = v.map(|x| x.into());
self
}
pub fn set_update_mask<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::FieldMask>,
{
self.update_mask = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::FieldMask>,
{
self.update_mask = v.map(|x| x.into());
self
}
pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.request_id = v.into();
self
}
}
impl wkt::message::Message for UpdatePrivateConnectionRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.UpdatePrivateConnectionRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct DeletePrivateConnectionRequest {
pub name: std::string::String,
pub request_id: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl DeletePrivateConnectionRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.request_id = v.into();
self
}
}
impl wkt::message::Message for DeletePrivateConnectionRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.DeletePrivateConnectionRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListPrivateConnectionPeeringRoutesRequest {
pub parent: std::string::String,
pub page_size: i32,
pub page_token: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ListPrivateConnectionPeeringRoutesRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.parent = v.into();
self
}
pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.page_size = v.into();
self
}
pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.page_token = v.into();
self
}
}
impl wkt::message::Message for ListPrivateConnectionPeeringRoutesRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.ListPrivateConnectionPeeringRoutesRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListPrivateConnectionPeeringRoutesResponse {
pub peering_routes: std::vec::Vec<crate::model::PeeringRoute>,
pub next_page_token: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ListPrivateConnectionPeeringRoutesResponse {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_peering_routes<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::PeeringRoute>,
{
use std::iter::Iterator;
self.peering_routes = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.next_page_token = v.into();
self
}
}
impl wkt::message::Message for ListPrivateConnectionPeeringRoutesResponse {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.ListPrivateConnectionPeeringRoutesResponse"
}
}
#[doc(hidden)]
impl google_cloud_gax::paginator::internal::PageableResponse
for ListPrivateConnectionPeeringRoutesResponse
{
type PageItem = crate::model::PeeringRoute;
fn items(self) -> std::vec::Vec<Self::PageItem> {
self.peering_routes
}
fn next_page_token(&self) -> std::string::String {
use std::clone::Clone;
self.next_page_token.clone()
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GrantDnsBindPermissionRequest {
pub name: std::string::String,
pub principal: std::option::Option<crate::model::Principal>,
pub request_id: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl GrantDnsBindPermissionRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_principal<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::Principal>,
{
self.principal = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_principal<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::Principal>,
{
self.principal = v.map(|x| x.into());
self
}
pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.request_id = v.into();
self
}
}
impl wkt::message::Message for GrantDnsBindPermissionRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.GrantDnsBindPermissionRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct RevokeDnsBindPermissionRequest {
pub name: std::string::String,
pub principal: std::option::Option<crate::model::Principal>,
pub request_id: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl RevokeDnsBindPermissionRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_principal<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::Principal>,
{
self.principal = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_principal<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::Principal>,
{
self.principal = v.map(|x| x.into());
self
}
pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.request_id = v.into();
self
}
}
impl wkt::message::Message for RevokeDnsBindPermissionRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.RevokeDnsBindPermissionRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetDnsBindPermissionRequest {
pub name: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl GetDnsBindPermissionRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
}
impl wkt::message::Message for GetDnsBindPermissionRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.GetDnsBindPermissionRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct NetworkConfig {
pub management_cidr: std::string::String,
pub vmware_engine_network: std::string::String,
pub vmware_engine_network_canonical: std::string::String,
pub management_ip_address_layout_version: i32,
pub dns_server_ip: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl NetworkConfig {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_management_cidr<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.management_cidr = v.into();
self
}
pub fn set_vmware_engine_network<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.vmware_engine_network = v.into();
self
}
pub fn set_vmware_engine_network_canonical<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.vmware_engine_network_canonical = v.into();
self
}
pub fn set_management_ip_address_layout_version<T: std::convert::Into<i32>>(
mut self,
v: T,
) -> Self {
self.management_ip_address_layout_version = v.into();
self
}
pub fn set_dns_server_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.dns_server_ip = v.into();
self
}
}
impl wkt::message::Message for NetworkConfig {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.NetworkConfig"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct NodeTypeConfig {
pub node_count: i32,
pub custom_core_count: i32,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl NodeTypeConfig {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.node_count = v.into();
self
}
pub fn set_custom_core_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.custom_core_count = v.into();
self
}
}
impl wkt::message::Message for NodeTypeConfig {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.NodeTypeConfig"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct StretchedClusterConfig {
pub preferred_location: std::string::String,
pub secondary_location: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl StretchedClusterConfig {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_preferred_location<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.preferred_location = v.into();
self
}
pub fn set_secondary_location<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.secondary_location = v.into();
self
}
}
impl wkt::message::Message for StretchedClusterConfig {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.StretchedClusterConfig"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct PrivateCloud {
pub name: std::string::String,
pub create_time: std::option::Option<wkt::Timestamp>,
pub update_time: std::option::Option<wkt::Timestamp>,
pub delete_time: std::option::Option<wkt::Timestamp>,
pub expire_time: std::option::Option<wkt::Timestamp>,
pub state: crate::model::private_cloud::State,
pub network_config: std::option::Option<crate::model::NetworkConfig>,
pub management_cluster: std::option::Option<crate::model::private_cloud::ManagementCluster>,
pub description: std::string::String,
pub hcx: std::option::Option<crate::model::Hcx>,
pub nsx: std::option::Option<crate::model::Nsx>,
pub vcenter: std::option::Option<crate::model::Vcenter>,
pub uid: std::string::String,
pub r#type: crate::model::private_cloud::Type,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl PrivateCloud {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_create_time<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.create_time = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.create_time = v.map(|x| x.into());
self
}
pub fn set_update_time<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.update_time = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.update_time = v.map(|x| x.into());
self
}
pub fn set_delete_time<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.delete_time = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_delete_time<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.delete_time = v.map(|x| x.into());
self
}
pub fn set_expire_time<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.expire_time = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_expire_time<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.expire_time = v.map(|x| x.into());
self
}
pub fn set_state<T: std::convert::Into<crate::model::private_cloud::State>>(
mut self,
v: T,
) -> Self {
self.state = v.into();
self
}
pub fn set_network_config<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::NetworkConfig>,
{
self.network_config = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_network_config<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::NetworkConfig>,
{
self.network_config = v.map(|x| x.into());
self
}
pub fn set_management_cluster<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::private_cloud::ManagementCluster>,
{
self.management_cluster = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_management_cluster<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::private_cloud::ManagementCluster>,
{
self.management_cluster = v.map(|x| x.into());
self
}
pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.description = v.into();
self
}
pub fn set_hcx<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::Hcx>,
{
self.hcx = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_hcx<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::Hcx>,
{
self.hcx = v.map(|x| x.into());
self
}
pub fn set_nsx<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::Nsx>,
{
self.nsx = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_nsx<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::Nsx>,
{
self.nsx = v.map(|x| x.into());
self
}
pub fn set_vcenter<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::Vcenter>,
{
self.vcenter = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_vcenter<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::Vcenter>,
{
self.vcenter = v.map(|x| x.into());
self
}
pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.uid = v.into();
self
}
pub fn set_type<T: std::convert::Into<crate::model::private_cloud::Type>>(
mut self,
v: T,
) -> Self {
self.r#type = v.into();
self
}
}
impl wkt::message::Message for PrivateCloud {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.PrivateCloud"
}
}
pub mod private_cloud {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ManagementCluster {
pub cluster_id: std::string::String,
pub node_type_configs:
std::collections::HashMap<std::string::String, crate::model::NodeTypeConfig>,
pub stretched_cluster_config: std::option::Option<crate::model::StretchedClusterConfig>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ManagementCluster {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.cluster_id = v.into();
self
}
pub fn set_node_type_configs<T, K, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = (K, V)>,
K: std::convert::Into<std::string::String>,
V: std::convert::Into<crate::model::NodeTypeConfig>,
{
use std::iter::Iterator;
self.node_type_configs = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
self
}
pub fn set_stretched_cluster_config<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::StretchedClusterConfig>,
{
self.stretched_cluster_config = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_stretched_cluster_config<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::StretchedClusterConfig>,
{
self.stretched_cluster_config = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for ManagementCluster {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.PrivateCloud.ManagementCluster"
}
}
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum State {
Unspecified,
Active,
Creating,
Updating,
Failed,
Deleted,
Purging,
UnknownValue(state::UnknownValue),
}
#[doc(hidden)]
pub mod state {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl State {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::Active => std::option::Option::Some(1),
Self::Creating => std::option::Option::Some(2),
Self::Updating => std::option::Option::Some(3),
Self::Failed => std::option::Option::Some(5),
Self::Deleted => std::option::Option::Some(6),
Self::Purging => std::option::Option::Some(7),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
Self::Active => std::option::Option::Some("ACTIVE"),
Self::Creating => std::option::Option::Some("CREATING"),
Self::Updating => std::option::Option::Some("UPDATING"),
Self::Failed => std::option::Option::Some("FAILED"),
Self::Deleted => std::option::Option::Some("DELETED"),
Self::Purging => std::option::Option::Some("PURGING"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for State {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for State {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for State {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::Active,
2 => Self::Creating,
3 => Self::Updating,
5 => Self::Failed,
6 => Self::Deleted,
7 => Self::Purging,
_ => Self::UnknownValue(state::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for State {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"STATE_UNSPECIFIED" => Self::Unspecified,
"ACTIVE" => Self::Active,
"CREATING" => Self::Creating,
"UPDATING" => Self::Updating,
"FAILED" => Self::Failed,
"DELETED" => Self::Deleted,
"PURGING" => Self::Purging,
_ => Self::UnknownValue(state::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for State {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::Active => serializer.serialize_i32(1),
Self::Creating => serializer.serialize_i32(2),
Self::Updating => serializer.serialize_i32(3),
Self::Failed => serializer.serialize_i32(5),
Self::Deleted => serializer.serialize_i32(6),
Self::Purging => serializer.serialize_i32(7),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for State {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
".google.cloud.vmwareengine.v1.PrivateCloud.State",
))
}
}
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum Type {
Standard,
TimeLimited,
Stretched,
UnknownValue(r#type::UnknownValue),
}
#[doc(hidden)]
pub mod r#type {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl Type {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Standard => std::option::Option::Some(0),
Self::TimeLimited => std::option::Option::Some(1),
Self::Stretched => std::option::Option::Some(2),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Standard => std::option::Option::Some("STANDARD"),
Self::TimeLimited => std::option::Option::Some("TIME_LIMITED"),
Self::Stretched => std::option::Option::Some("STRETCHED"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for Type {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for Type {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for Type {
fn from(value: i32) -> Self {
match value {
0 => Self::Standard,
1 => Self::TimeLimited,
2 => Self::Stretched,
_ => Self::UnknownValue(r#type::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for Type {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"STANDARD" => Self::Standard,
"TIME_LIMITED" => Self::TimeLimited,
"STRETCHED" => Self::Stretched,
_ => Self::UnknownValue(r#type::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for Type {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Standard => serializer.serialize_i32(0),
Self::TimeLimited => serializer.serialize_i32(1),
Self::Stretched => serializer.serialize_i32(2),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for Type {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
".google.cloud.vmwareengine.v1.PrivateCloud.Type",
))
}
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct Cluster {
pub name: std::string::String,
pub create_time: std::option::Option<wkt::Timestamp>,
pub update_time: std::option::Option<wkt::Timestamp>,
pub state: crate::model::cluster::State,
pub management: bool,
pub autoscaling_settings: std::option::Option<crate::model::AutoscalingSettings>,
pub uid: std::string::String,
pub node_type_configs:
std::collections::HashMap<std::string::String, crate::model::NodeTypeConfig>,
pub stretched_cluster_config: std::option::Option<crate::model::StretchedClusterConfig>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl Cluster {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_create_time<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.create_time = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.create_time = v.map(|x| x.into());
self
}
pub fn set_update_time<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.update_time = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.update_time = v.map(|x| x.into());
self
}
pub fn set_state<T: std::convert::Into<crate::model::cluster::State>>(mut self, v: T) -> Self {
self.state = v.into();
self
}
pub fn set_management<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.management = v.into();
self
}
pub fn set_autoscaling_settings<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::AutoscalingSettings>,
{
self.autoscaling_settings = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_autoscaling_settings<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::AutoscalingSettings>,
{
self.autoscaling_settings = v.map(|x| x.into());
self
}
pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.uid = v.into();
self
}
pub fn set_node_type_configs<T, K, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = (K, V)>,
K: std::convert::Into<std::string::String>,
V: std::convert::Into<crate::model::NodeTypeConfig>,
{
use std::iter::Iterator;
self.node_type_configs = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
self
}
pub fn set_stretched_cluster_config<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::StretchedClusterConfig>,
{
self.stretched_cluster_config = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_stretched_cluster_config<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::StretchedClusterConfig>,
{
self.stretched_cluster_config = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for Cluster {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.Cluster"
}
}
pub mod cluster {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum State {
Unspecified,
Active,
Creating,
Updating,
Deleting,
Repairing,
UnknownValue(state::UnknownValue),
}
#[doc(hidden)]
pub mod state {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl State {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::Active => std::option::Option::Some(1),
Self::Creating => std::option::Option::Some(2),
Self::Updating => std::option::Option::Some(3),
Self::Deleting => std::option::Option::Some(4),
Self::Repairing => std::option::Option::Some(5),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
Self::Active => std::option::Option::Some("ACTIVE"),
Self::Creating => std::option::Option::Some("CREATING"),
Self::Updating => std::option::Option::Some("UPDATING"),
Self::Deleting => std::option::Option::Some("DELETING"),
Self::Repairing => std::option::Option::Some("REPAIRING"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for State {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for State {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for State {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::Active,
2 => Self::Creating,
3 => Self::Updating,
4 => Self::Deleting,
5 => Self::Repairing,
_ => Self::UnknownValue(state::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for State {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"STATE_UNSPECIFIED" => Self::Unspecified,
"ACTIVE" => Self::Active,
"CREATING" => Self::Creating,
"UPDATING" => Self::Updating,
"DELETING" => Self::Deleting,
"REPAIRING" => Self::Repairing,
_ => Self::UnknownValue(state::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for State {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::Active => serializer.serialize_i32(1),
Self::Creating => serializer.serialize_i32(2),
Self::Updating => serializer.serialize_i32(3),
Self::Deleting => serializer.serialize_i32(4),
Self::Repairing => serializer.serialize_i32(5),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for State {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
".google.cloud.vmwareengine.v1.Cluster.State",
))
}
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct Node {
pub name: std::string::String,
pub fqdn: std::string::String,
pub internal_ip: std::string::String,
pub node_type_id: std::string::String,
pub version: std::string::String,
pub custom_core_count: i64,
pub state: crate::model::node::State,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl Node {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_fqdn<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.fqdn = v.into();
self
}
pub fn set_internal_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.internal_ip = v.into();
self
}
pub fn set_node_type_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.node_type_id = v.into();
self
}
pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.version = v.into();
self
}
pub fn set_custom_core_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
self.custom_core_count = v.into();
self
}
pub fn set_state<T: std::convert::Into<crate::model::node::State>>(mut self, v: T) -> Self {
self.state = v.into();
self
}
}
impl wkt::message::Message for Node {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.Node"
}
}
pub mod node {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum State {
Unspecified,
Active,
Creating,
Failed,
Upgrading,
UnknownValue(state::UnknownValue),
}
#[doc(hidden)]
pub mod state {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl State {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::Active => std::option::Option::Some(1),
Self::Creating => std::option::Option::Some(2),
Self::Failed => std::option::Option::Some(3),
Self::Upgrading => std::option::Option::Some(4),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
Self::Active => std::option::Option::Some("ACTIVE"),
Self::Creating => std::option::Option::Some("CREATING"),
Self::Failed => std::option::Option::Some("FAILED"),
Self::Upgrading => std::option::Option::Some("UPGRADING"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for State {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for State {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for State {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::Active,
2 => Self::Creating,
3 => Self::Failed,
4 => Self::Upgrading,
_ => Self::UnknownValue(state::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for State {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"STATE_UNSPECIFIED" => Self::Unspecified,
"ACTIVE" => Self::Active,
"CREATING" => Self::Creating,
"FAILED" => Self::Failed,
"UPGRADING" => Self::Upgrading,
_ => Self::UnknownValue(state::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for State {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::Active => serializer.serialize_i32(1),
Self::Creating => serializer.serialize_i32(2),
Self::Failed => serializer.serialize_i32(3),
Self::Upgrading => serializer.serialize_i32(4),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for State {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
".google.cloud.vmwareengine.v1.Node.State",
))
}
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ExternalAddress {
pub name: std::string::String,
pub create_time: std::option::Option<wkt::Timestamp>,
pub update_time: std::option::Option<wkt::Timestamp>,
pub internal_ip: std::string::String,
pub external_ip: std::string::String,
pub state: crate::model::external_address::State,
pub uid: std::string::String,
pub description: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ExternalAddress {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_create_time<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.create_time = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.create_time = v.map(|x| x.into());
self
}
pub fn set_update_time<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.update_time = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.update_time = v.map(|x| x.into());
self
}
pub fn set_internal_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.internal_ip = v.into();
self
}
pub fn set_external_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.external_ip = v.into();
self
}
pub fn set_state<T: std::convert::Into<crate::model::external_address::State>>(
mut self,
v: T,
) -> Self {
self.state = v.into();
self
}
pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.uid = v.into();
self
}
pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.description = v.into();
self
}
}
impl wkt::message::Message for ExternalAddress {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.ExternalAddress"
}
}
pub mod external_address {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum State {
Unspecified,
Active,
Creating,
Updating,
Deleting,
UnknownValue(state::UnknownValue),
}
#[doc(hidden)]
pub mod state {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl State {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::Active => std::option::Option::Some(1),
Self::Creating => std::option::Option::Some(2),
Self::Updating => std::option::Option::Some(3),
Self::Deleting => std::option::Option::Some(4),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
Self::Active => std::option::Option::Some("ACTIVE"),
Self::Creating => std::option::Option::Some("CREATING"),
Self::Updating => std::option::Option::Some("UPDATING"),
Self::Deleting => std::option::Option::Some("DELETING"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for State {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for State {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for State {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::Active,
2 => Self::Creating,
3 => Self::Updating,
4 => Self::Deleting,
_ => Self::UnknownValue(state::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for State {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"STATE_UNSPECIFIED" => Self::Unspecified,
"ACTIVE" => Self::Active,
"CREATING" => Self::Creating,
"UPDATING" => Self::Updating,
"DELETING" => Self::Deleting,
_ => Self::UnknownValue(state::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for State {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::Active => serializer.serialize_i32(1),
Self::Creating => serializer.serialize_i32(2),
Self::Updating => serializer.serialize_i32(3),
Self::Deleting => serializer.serialize_i32(4),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for State {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
".google.cloud.vmwareengine.v1.ExternalAddress.State",
))
}
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct Subnet {
pub name: std::string::String,
pub ip_cidr_range: std::string::String,
pub gateway_ip: std::string::String,
pub r#type: std::string::String,
pub state: crate::model::subnet::State,
pub vlan_id: i32,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl Subnet {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_ip_cidr_range<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.ip_cidr_range = v.into();
self
}
pub fn set_gateway_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.gateway_ip = v.into();
self
}
pub fn set_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.r#type = v.into();
self
}
pub fn set_state<T: std::convert::Into<crate::model::subnet::State>>(mut self, v: T) -> Self {
self.state = v.into();
self
}
pub fn set_vlan_id<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.vlan_id = v.into();
self
}
}
impl wkt::message::Message for Subnet {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.Subnet"
}
}
pub mod subnet {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum State {
Unspecified,
Active,
Creating,
Updating,
Deleting,
Reconciling,
Failed,
UnknownValue(state::UnknownValue),
}
#[doc(hidden)]
pub mod state {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl State {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::Active => std::option::Option::Some(1),
Self::Creating => std::option::Option::Some(2),
Self::Updating => std::option::Option::Some(3),
Self::Deleting => std::option::Option::Some(4),
Self::Reconciling => std::option::Option::Some(5),
Self::Failed => std::option::Option::Some(6),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
Self::Active => std::option::Option::Some("ACTIVE"),
Self::Creating => std::option::Option::Some("CREATING"),
Self::Updating => std::option::Option::Some("UPDATING"),
Self::Deleting => std::option::Option::Some("DELETING"),
Self::Reconciling => std::option::Option::Some("RECONCILING"),
Self::Failed => std::option::Option::Some("FAILED"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for State {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for State {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for State {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::Active,
2 => Self::Creating,
3 => Self::Updating,
4 => Self::Deleting,
5 => Self::Reconciling,
6 => Self::Failed,
_ => Self::UnknownValue(state::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for State {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"STATE_UNSPECIFIED" => Self::Unspecified,
"ACTIVE" => Self::Active,
"CREATING" => Self::Creating,
"UPDATING" => Self::Updating,
"DELETING" => Self::Deleting,
"RECONCILING" => Self::Reconciling,
"FAILED" => Self::Failed,
_ => Self::UnknownValue(state::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for State {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::Active => serializer.serialize_i32(1),
Self::Creating => serializer.serialize_i32(2),
Self::Updating => serializer.serialize_i32(3),
Self::Deleting => serializer.serialize_i32(4),
Self::Reconciling => serializer.serialize_i32(5),
Self::Failed => serializer.serialize_i32(6),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for State {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
".google.cloud.vmwareengine.v1.Subnet.State",
))
}
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ExternalAccessRule {
pub name: std::string::String,
pub create_time: std::option::Option<wkt::Timestamp>,
pub update_time: std::option::Option<wkt::Timestamp>,
pub description: std::string::String,
pub priority: i32,
pub action: crate::model::external_access_rule::Action,
pub ip_protocol: std::string::String,
pub source_ip_ranges: std::vec::Vec<crate::model::external_access_rule::IpRange>,
pub source_ports: std::vec::Vec<std::string::String>,
pub destination_ip_ranges: std::vec::Vec<crate::model::external_access_rule::IpRange>,
pub destination_ports: std::vec::Vec<std::string::String>,
pub state: crate::model::external_access_rule::State,
pub uid: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ExternalAccessRule {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_create_time<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.create_time = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.create_time = v.map(|x| x.into());
self
}
pub fn set_update_time<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.update_time = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.update_time = v.map(|x| x.into());
self
}
pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.description = v.into();
self
}
pub fn set_priority<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.priority = v.into();
self
}
pub fn set_action<T: std::convert::Into<crate::model::external_access_rule::Action>>(
mut self,
v: T,
) -> Self {
self.action = v.into();
self
}
pub fn set_ip_protocol<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.ip_protocol = v.into();
self
}
pub fn set_source_ip_ranges<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::external_access_rule::IpRange>,
{
use std::iter::Iterator;
self.source_ip_ranges = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_source_ports<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<std::string::String>,
{
use std::iter::Iterator;
self.source_ports = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_destination_ip_ranges<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::external_access_rule::IpRange>,
{
use std::iter::Iterator;
self.destination_ip_ranges = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_destination_ports<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<std::string::String>,
{
use std::iter::Iterator;
self.destination_ports = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_state<T: std::convert::Into<crate::model::external_access_rule::State>>(
mut self,
v: T,
) -> Self {
self.state = v.into();
self
}
pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.uid = v.into();
self
}
}
impl wkt::message::Message for ExternalAccessRule {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.ExternalAccessRule"
}
}
pub mod external_access_rule {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct IpRange {
pub ip_range: std::option::Option<crate::model::external_access_rule::ip_range::IpRange>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl IpRange {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_ip_range<
T: std::convert::Into<
std::option::Option<crate::model::external_access_rule::ip_range::IpRange>,
>,
>(
mut self,
v: T,
) -> Self {
self.ip_range = v.into();
self
}
pub fn ip_address(&self) -> std::option::Option<&std::string::String> {
#[allow(unreachable_patterns)]
self.ip_range.as_ref().and_then(|v| match v {
crate::model::external_access_rule::ip_range::IpRange::IpAddress(v) => {
std::option::Option::Some(v)
}
_ => std::option::Option::None,
})
}
pub fn set_ip_address<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.ip_range = std::option::Option::Some(
crate::model::external_access_rule::ip_range::IpRange::IpAddress(v.into()),
);
self
}
pub fn ip_address_range(&self) -> std::option::Option<&std::string::String> {
#[allow(unreachable_patterns)]
self.ip_range.as_ref().and_then(|v| match v {
crate::model::external_access_rule::ip_range::IpRange::IpAddressRange(v) => {
std::option::Option::Some(v)
}
_ => std::option::Option::None,
})
}
pub fn set_ip_address_range<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.ip_range = std::option::Option::Some(
crate::model::external_access_rule::ip_range::IpRange::IpAddressRange(v.into()),
);
self
}
pub fn external_address(&self) -> std::option::Option<&std::string::String> {
#[allow(unreachable_patterns)]
self.ip_range.as_ref().and_then(|v| match v {
crate::model::external_access_rule::ip_range::IpRange::ExternalAddress(v) => {
std::option::Option::Some(v)
}
_ => std::option::Option::None,
})
}
pub fn set_external_address<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.ip_range = std::option::Option::Some(
crate::model::external_access_rule::ip_range::IpRange::ExternalAddress(v.into()),
);
self
}
}
impl wkt::message::Message for IpRange {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.ExternalAccessRule.IpRange"
}
}
pub mod ip_range {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum IpRange {
IpAddress(std::string::String),
IpAddressRange(std::string::String),
ExternalAddress(std::string::String),
}
}
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum Action {
Unspecified,
Allow,
Deny,
UnknownValue(action::UnknownValue),
}
#[doc(hidden)]
pub mod action {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl Action {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::Allow => std::option::Option::Some(1),
Self::Deny => std::option::Option::Some(2),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("ACTION_UNSPECIFIED"),
Self::Allow => std::option::Option::Some("ALLOW"),
Self::Deny => std::option::Option::Some("DENY"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for Action {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for Action {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for Action {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::Allow,
2 => Self::Deny,
_ => Self::UnknownValue(action::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for Action {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"ACTION_UNSPECIFIED" => Self::Unspecified,
"ALLOW" => Self::Allow,
"DENY" => Self::Deny,
_ => Self::UnknownValue(action::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for Action {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::Allow => serializer.serialize_i32(1),
Self::Deny => serializer.serialize_i32(2),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for Action {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<Action>::new(
".google.cloud.vmwareengine.v1.ExternalAccessRule.Action",
))
}
}
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum State {
Unspecified,
Active,
Creating,
Updating,
Deleting,
UnknownValue(state::UnknownValue),
}
#[doc(hidden)]
pub mod state {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl State {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::Active => std::option::Option::Some(1),
Self::Creating => std::option::Option::Some(2),
Self::Updating => std::option::Option::Some(3),
Self::Deleting => std::option::Option::Some(4),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
Self::Active => std::option::Option::Some("ACTIVE"),
Self::Creating => std::option::Option::Some("CREATING"),
Self::Updating => std::option::Option::Some("UPDATING"),
Self::Deleting => std::option::Option::Some("DELETING"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for State {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for State {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for State {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::Active,
2 => Self::Creating,
3 => Self::Updating,
4 => Self::Deleting,
_ => Self::UnknownValue(state::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for State {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"STATE_UNSPECIFIED" => Self::Unspecified,
"ACTIVE" => Self::Active,
"CREATING" => Self::Creating,
"UPDATING" => Self::Updating,
"DELETING" => Self::Deleting,
_ => Self::UnknownValue(state::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for State {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::Active => serializer.serialize_i32(1),
Self::Creating => serializer.serialize_i32(2),
Self::Updating => serializer.serialize_i32(3),
Self::Deleting => serializer.serialize_i32(4),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for State {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
".google.cloud.vmwareengine.v1.ExternalAccessRule.State",
))
}
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct LoggingServer {
pub name: std::string::String,
pub create_time: std::option::Option<wkt::Timestamp>,
pub update_time: std::option::Option<wkt::Timestamp>,
pub hostname: std::string::String,
pub port: i32,
pub protocol: crate::model::logging_server::Protocol,
pub source_type: crate::model::logging_server::SourceType,
pub uid: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl LoggingServer {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_create_time<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.create_time = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.create_time = v.map(|x| x.into());
self
}
pub fn set_update_time<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.update_time = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.update_time = v.map(|x| x.into());
self
}
pub fn set_hostname<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.hostname = v.into();
self
}
pub fn set_port<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.port = v.into();
self
}
pub fn set_protocol<T: std::convert::Into<crate::model::logging_server::Protocol>>(
mut self,
v: T,
) -> Self {
self.protocol = v.into();
self
}
pub fn set_source_type<T: std::convert::Into<crate::model::logging_server::SourceType>>(
mut self,
v: T,
) -> Self {
self.source_type = v.into();
self
}
pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.uid = v.into();
self
}
}
impl wkt::message::Message for LoggingServer {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.LoggingServer"
}
}
pub mod logging_server {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum Protocol {
Unspecified,
Udp,
Tcp,
Tls,
Ssl,
Relp,
UnknownValue(protocol::UnknownValue),
}
#[doc(hidden)]
pub mod protocol {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl Protocol {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::Udp => std::option::Option::Some(1),
Self::Tcp => std::option::Option::Some(2),
Self::Tls => std::option::Option::Some(3),
Self::Ssl => std::option::Option::Some(4),
Self::Relp => std::option::Option::Some(5),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("PROTOCOL_UNSPECIFIED"),
Self::Udp => std::option::Option::Some("UDP"),
Self::Tcp => std::option::Option::Some("TCP"),
Self::Tls => std::option::Option::Some("TLS"),
Self::Ssl => std::option::Option::Some("SSL"),
Self::Relp => std::option::Option::Some("RELP"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for Protocol {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for Protocol {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for Protocol {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::Udp,
2 => Self::Tcp,
3 => Self::Tls,
4 => Self::Ssl,
5 => Self::Relp,
_ => Self::UnknownValue(protocol::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for Protocol {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"PROTOCOL_UNSPECIFIED" => Self::Unspecified,
"UDP" => Self::Udp,
"TCP" => Self::Tcp,
"TLS" => Self::Tls,
"SSL" => Self::Ssl,
"RELP" => Self::Relp,
_ => Self::UnknownValue(protocol::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for Protocol {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::Udp => serializer.serialize_i32(1),
Self::Tcp => serializer.serialize_i32(2),
Self::Tls => serializer.serialize_i32(3),
Self::Ssl => serializer.serialize_i32(4),
Self::Relp => serializer.serialize_i32(5),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for Protocol {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<Protocol>::new(
".google.cloud.vmwareengine.v1.LoggingServer.Protocol",
))
}
}
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum SourceType {
Unspecified,
Esxi,
Vcsa,
UnknownValue(source_type::UnknownValue),
}
#[doc(hidden)]
pub mod source_type {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl SourceType {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::Esxi => std::option::Option::Some(1),
Self::Vcsa => std::option::Option::Some(2),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("SOURCE_TYPE_UNSPECIFIED"),
Self::Esxi => std::option::Option::Some("ESXI"),
Self::Vcsa => std::option::Option::Some("VCSA"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for SourceType {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for SourceType {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for SourceType {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::Esxi,
2 => Self::Vcsa,
_ => Self::UnknownValue(source_type::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for SourceType {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"SOURCE_TYPE_UNSPECIFIED" => Self::Unspecified,
"ESXI" => Self::Esxi,
"VCSA" => Self::Vcsa,
_ => Self::UnknownValue(source_type::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for SourceType {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::Esxi => serializer.serialize_i32(1),
Self::Vcsa => serializer.serialize_i32(2),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for SourceType {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<SourceType>::new(
".google.cloud.vmwareengine.v1.LoggingServer.SourceType",
))
}
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct NodeType {
pub name: std::string::String,
pub node_type_id: std::string::String,
pub display_name: std::string::String,
pub virtual_cpu_count: i32,
pub total_core_count: i32,
pub memory_gb: i32,
pub disk_size_gb: i32,
pub available_custom_core_counts: std::vec::Vec<i32>,
pub kind: crate::model::node_type::Kind,
pub families: std::vec::Vec<std::string::String>,
pub capabilities: std::vec::Vec<crate::model::node_type::Capability>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl NodeType {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_node_type_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.node_type_id = v.into();
self
}
pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.display_name = v.into();
self
}
pub fn set_virtual_cpu_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.virtual_cpu_count = v.into();
self
}
pub fn set_total_core_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.total_core_count = v.into();
self
}
pub fn set_memory_gb<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.memory_gb = v.into();
self
}
pub fn set_disk_size_gb<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.disk_size_gb = v.into();
self
}
pub fn set_available_custom_core_counts<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<i32>,
{
use std::iter::Iterator;
self.available_custom_core_counts = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_kind<T: std::convert::Into<crate::model::node_type::Kind>>(mut self, v: T) -> Self {
self.kind = v.into();
self
}
pub fn set_families<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<std::string::String>,
{
use std::iter::Iterator;
self.families = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_capabilities<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::node_type::Capability>,
{
use std::iter::Iterator;
self.capabilities = v.into_iter().map(|i| i.into()).collect();
self
}
}
impl wkt::message::Message for NodeType {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.NodeType"
}
}
pub mod node_type {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum Kind {
Unspecified,
Standard,
StorageOnly,
UnknownValue(kind::UnknownValue),
}
#[doc(hidden)]
pub mod kind {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl Kind {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::Standard => std::option::Option::Some(1),
Self::StorageOnly => std::option::Option::Some(2),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("KIND_UNSPECIFIED"),
Self::Standard => std::option::Option::Some("STANDARD"),
Self::StorageOnly => std::option::Option::Some("STORAGE_ONLY"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for Kind {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for Kind {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for Kind {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::Standard,
2 => Self::StorageOnly,
_ => Self::UnknownValue(kind::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for Kind {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"KIND_UNSPECIFIED" => Self::Unspecified,
"STANDARD" => Self::Standard,
"STORAGE_ONLY" => Self::StorageOnly,
_ => Self::UnknownValue(kind::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for Kind {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::Standard => serializer.serialize_i32(1),
Self::StorageOnly => serializer.serialize_i32(2),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for Kind {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<Kind>::new(
".google.cloud.vmwareengine.v1.NodeType.Kind",
))
}
}
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum Capability {
Unspecified,
StretchedClusters,
UnknownValue(capability::UnknownValue),
}
#[doc(hidden)]
pub mod capability {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl Capability {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::StretchedClusters => std::option::Option::Some(1),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("CAPABILITY_UNSPECIFIED"),
Self::StretchedClusters => std::option::Option::Some("STRETCHED_CLUSTERS"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for Capability {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for Capability {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for Capability {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::StretchedClusters,
_ => Self::UnknownValue(capability::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for Capability {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"CAPABILITY_UNSPECIFIED" => Self::Unspecified,
"STRETCHED_CLUSTERS" => Self::StretchedClusters,
_ => Self::UnknownValue(capability::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for Capability {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::StretchedClusters => serializer.serialize_i32(1),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for Capability {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<Capability>::new(
".google.cloud.vmwareengine.v1.NodeType.Capability",
))
}
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct Credentials {
pub username: std::string::String,
pub password: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl Credentials {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_username<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.username = v.into();
self
}
pub fn set_password<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.password = v.into();
self
}
}
impl wkt::message::Message for Credentials {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.Credentials"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct HcxActivationKey {
pub name: std::string::String,
pub create_time: std::option::Option<wkt::Timestamp>,
pub state: crate::model::hcx_activation_key::State,
pub activation_key: std::string::String,
pub uid: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl HcxActivationKey {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_create_time<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.create_time = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.create_time = v.map(|x| x.into());
self
}
pub fn set_state<T: std::convert::Into<crate::model::hcx_activation_key::State>>(
mut self,
v: T,
) -> Self {
self.state = v.into();
self
}
pub fn set_activation_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.activation_key = v.into();
self
}
pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.uid = v.into();
self
}
}
impl wkt::message::Message for HcxActivationKey {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.HcxActivationKey"
}
}
pub mod hcx_activation_key {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum State {
Unspecified,
Available,
Consumed,
Creating,
UnknownValue(state::UnknownValue),
}
#[doc(hidden)]
pub mod state {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl State {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::Available => std::option::Option::Some(1),
Self::Consumed => std::option::Option::Some(2),
Self::Creating => std::option::Option::Some(3),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
Self::Available => std::option::Option::Some("AVAILABLE"),
Self::Consumed => std::option::Option::Some("CONSUMED"),
Self::Creating => std::option::Option::Some("CREATING"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for State {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for State {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for State {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::Available,
2 => Self::Consumed,
3 => Self::Creating,
_ => Self::UnknownValue(state::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for State {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"STATE_UNSPECIFIED" => Self::Unspecified,
"AVAILABLE" => Self::Available,
"CONSUMED" => Self::Consumed,
"CREATING" => Self::Creating,
_ => Self::UnknownValue(state::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for State {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::Available => serializer.serialize_i32(1),
Self::Consumed => serializer.serialize_i32(2),
Self::Creating => serializer.serialize_i32(3),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for State {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
".google.cloud.vmwareengine.v1.HcxActivationKey.State",
))
}
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct Hcx {
pub internal_ip: std::string::String,
pub version: std::string::String,
pub state: crate::model::hcx::State,
pub fqdn: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl Hcx {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_internal_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.internal_ip = v.into();
self
}
pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.version = v.into();
self
}
pub fn set_state<T: std::convert::Into<crate::model::hcx::State>>(mut self, v: T) -> Self {
self.state = v.into();
self
}
pub fn set_fqdn<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.fqdn = v.into();
self
}
}
impl wkt::message::Message for Hcx {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.Hcx"
}
}
pub mod hcx {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum State {
Unspecified,
Active,
Creating,
Activating,
UnknownValue(state::UnknownValue),
}
#[doc(hidden)]
pub mod state {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl State {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::Active => std::option::Option::Some(1),
Self::Creating => std::option::Option::Some(2),
Self::Activating => std::option::Option::Some(3),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
Self::Active => std::option::Option::Some("ACTIVE"),
Self::Creating => std::option::Option::Some("CREATING"),
Self::Activating => std::option::Option::Some("ACTIVATING"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for State {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for State {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for State {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::Active,
2 => Self::Creating,
3 => Self::Activating,
_ => Self::UnknownValue(state::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for State {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"STATE_UNSPECIFIED" => Self::Unspecified,
"ACTIVE" => Self::Active,
"CREATING" => Self::Creating,
"ACTIVATING" => Self::Activating,
_ => Self::UnknownValue(state::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for State {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::Active => serializer.serialize_i32(1),
Self::Creating => serializer.serialize_i32(2),
Self::Activating => serializer.serialize_i32(3),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for State {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
".google.cloud.vmwareengine.v1.Hcx.State",
))
}
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct Nsx {
pub internal_ip: std::string::String,
pub version: std::string::String,
pub state: crate::model::nsx::State,
pub fqdn: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl Nsx {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_internal_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.internal_ip = v.into();
self
}
pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.version = v.into();
self
}
pub fn set_state<T: std::convert::Into<crate::model::nsx::State>>(mut self, v: T) -> Self {
self.state = v.into();
self
}
pub fn set_fqdn<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.fqdn = v.into();
self
}
}
impl wkt::message::Message for Nsx {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.Nsx"
}
}
pub mod nsx {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum State {
Unspecified,
Active,
Creating,
UnknownValue(state::UnknownValue),
}
#[doc(hidden)]
pub mod state {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl State {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::Active => std::option::Option::Some(1),
Self::Creating => std::option::Option::Some(2),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
Self::Active => std::option::Option::Some("ACTIVE"),
Self::Creating => std::option::Option::Some("CREATING"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for State {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for State {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for State {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::Active,
2 => Self::Creating,
_ => Self::UnknownValue(state::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for State {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"STATE_UNSPECIFIED" => Self::Unspecified,
"ACTIVE" => Self::Active,
"CREATING" => Self::Creating,
_ => Self::UnknownValue(state::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for State {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::Active => serializer.serialize_i32(1),
Self::Creating => serializer.serialize_i32(2),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for State {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
".google.cloud.vmwareengine.v1.Nsx.State",
))
}
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct Vcenter {
pub internal_ip: std::string::String,
pub version: std::string::String,
pub state: crate::model::vcenter::State,
pub fqdn: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl Vcenter {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_internal_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.internal_ip = v.into();
self
}
pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.version = v.into();
self
}
pub fn set_state<T: std::convert::Into<crate::model::vcenter::State>>(mut self, v: T) -> Self {
self.state = v.into();
self
}
pub fn set_fqdn<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.fqdn = v.into();
self
}
}
impl wkt::message::Message for Vcenter {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.Vcenter"
}
}
pub mod vcenter {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum State {
Unspecified,
Active,
Creating,
UnknownValue(state::UnknownValue),
}
#[doc(hidden)]
pub mod state {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl State {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::Active => std::option::Option::Some(1),
Self::Creating => std::option::Option::Some(2),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
Self::Active => std::option::Option::Some("ACTIVE"),
Self::Creating => std::option::Option::Some("CREATING"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for State {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for State {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for State {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::Active,
2 => Self::Creating,
_ => Self::UnknownValue(state::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for State {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"STATE_UNSPECIFIED" => Self::Unspecified,
"ACTIVE" => Self::Active,
"CREATING" => Self::Creating,
_ => Self::UnknownValue(state::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for State {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::Active => serializer.serialize_i32(1),
Self::Creating => serializer.serialize_i32(2),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for State {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
".google.cloud.vmwareengine.v1.Vcenter.State",
))
}
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct AutoscalingSettings {
pub autoscaling_policies: std::collections::HashMap<
std::string::String,
crate::model::autoscaling_settings::AutoscalingPolicy,
>,
pub min_cluster_node_count: i32,
pub max_cluster_node_count: i32,
pub cool_down_period: std::option::Option<wkt::Duration>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl AutoscalingSettings {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_autoscaling_policies<T, K, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = (K, V)>,
K: std::convert::Into<std::string::String>,
V: std::convert::Into<crate::model::autoscaling_settings::AutoscalingPolicy>,
{
use std::iter::Iterator;
self.autoscaling_policies = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
self
}
pub fn set_min_cluster_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.min_cluster_node_count = v.into();
self
}
pub fn set_max_cluster_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.max_cluster_node_count = v.into();
self
}
pub fn set_cool_down_period<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::Duration>,
{
self.cool_down_period = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_cool_down_period<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::Duration>,
{
self.cool_down_period = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for AutoscalingSettings {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.AutoscalingSettings"
}
}
pub mod autoscaling_settings {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct Thresholds {
pub scale_out: i32,
pub scale_in: i32,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl Thresholds {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_scale_out<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.scale_out = v.into();
self
}
pub fn set_scale_in<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.scale_in = v.into();
self
}
}
impl wkt::message::Message for Thresholds {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.AutoscalingSettings.Thresholds"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct AutoscalingPolicy {
pub node_type_id: std::string::String,
pub scale_out_size: i32,
pub cpu_thresholds: std::option::Option<crate::model::autoscaling_settings::Thresholds>,
pub granted_memory_thresholds:
std::option::Option<crate::model::autoscaling_settings::Thresholds>,
pub consumed_memory_thresholds:
std::option::Option<crate::model::autoscaling_settings::Thresholds>,
pub storage_thresholds: std::option::Option<crate::model::autoscaling_settings::Thresholds>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl AutoscalingPolicy {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_node_type_id<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.node_type_id = v.into();
self
}
pub fn set_scale_out_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.scale_out_size = v.into();
self
}
pub fn set_cpu_thresholds<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::autoscaling_settings::Thresholds>,
{
self.cpu_thresholds = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_cpu_thresholds<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::autoscaling_settings::Thresholds>,
{
self.cpu_thresholds = v.map(|x| x.into());
self
}
pub fn set_granted_memory_thresholds<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::autoscaling_settings::Thresholds>,
{
self.granted_memory_thresholds = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_granted_memory_thresholds<T>(
mut self,
v: std::option::Option<T>,
) -> Self
where
T: std::convert::Into<crate::model::autoscaling_settings::Thresholds>,
{
self.granted_memory_thresholds = v.map(|x| x.into());
self
}
pub fn set_consumed_memory_thresholds<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::autoscaling_settings::Thresholds>,
{
self.consumed_memory_thresholds = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_consumed_memory_thresholds<T>(
mut self,
v: std::option::Option<T>,
) -> Self
where
T: std::convert::Into<crate::model::autoscaling_settings::Thresholds>,
{
self.consumed_memory_thresholds = v.map(|x| x.into());
self
}
pub fn set_storage_thresholds<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::autoscaling_settings::Thresholds>,
{
self.storage_thresholds = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_storage_thresholds<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::autoscaling_settings::Thresholds>,
{
self.storage_thresholds = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for AutoscalingPolicy {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.AutoscalingSettings.AutoscalingPolicy"
}
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct DnsForwarding {
pub name: std::string::String,
pub create_time: std::option::Option<wkt::Timestamp>,
pub update_time: std::option::Option<wkt::Timestamp>,
pub forwarding_rules: std::vec::Vec<crate::model::dns_forwarding::ForwardingRule>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl DnsForwarding {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_create_time<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.create_time = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.create_time = v.map(|x| x.into());
self
}
pub fn set_update_time<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.update_time = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.update_time = v.map(|x| x.into());
self
}
pub fn set_forwarding_rules<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::dns_forwarding::ForwardingRule>,
{
use std::iter::Iterator;
self.forwarding_rules = v.into_iter().map(|i| i.into()).collect();
self
}
}
impl wkt::message::Message for DnsForwarding {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.DnsForwarding"
}
}
pub mod dns_forwarding {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ForwardingRule {
pub domain: std::string::String,
pub name_servers: std::vec::Vec<std::string::String>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ForwardingRule {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_domain<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.domain = v.into();
self
}
pub fn set_name_servers<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<std::string::String>,
{
use std::iter::Iterator;
self.name_servers = v.into_iter().map(|i| i.into()).collect();
self
}
}
impl wkt::message::Message for ForwardingRule {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.DnsForwarding.ForwardingRule"
}
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct NetworkPeering {
pub name: std::string::String,
pub create_time: std::option::Option<wkt::Timestamp>,
pub update_time: std::option::Option<wkt::Timestamp>,
pub peer_network: std::string::String,
pub export_custom_routes: std::option::Option<bool>,
pub import_custom_routes: std::option::Option<bool>,
pub exchange_subnet_routes: std::option::Option<bool>,
pub export_custom_routes_with_public_ip: std::option::Option<bool>,
pub import_custom_routes_with_public_ip: std::option::Option<bool>,
pub state: crate::model::network_peering::State,
pub state_details: std::string::String,
pub peer_mtu: i32,
pub peer_network_type: crate::model::network_peering::PeerNetworkType,
pub uid: std::string::String,
pub vmware_engine_network: std::string::String,
pub description: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl NetworkPeering {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_create_time<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.create_time = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.create_time = v.map(|x| x.into());
self
}
pub fn set_update_time<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.update_time = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.update_time = v.map(|x| x.into());
self
}
pub fn set_peer_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.peer_network = v.into();
self
}
pub fn set_export_custom_routes<T>(mut self, v: T) -> Self
where
T: std::convert::Into<bool>,
{
self.export_custom_routes = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_export_custom_routes<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<bool>,
{
self.export_custom_routes = v.map(|x| x.into());
self
}
pub fn set_import_custom_routes<T>(mut self, v: T) -> Self
where
T: std::convert::Into<bool>,
{
self.import_custom_routes = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_import_custom_routes<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<bool>,
{
self.import_custom_routes = v.map(|x| x.into());
self
}
pub fn set_exchange_subnet_routes<T>(mut self, v: T) -> Self
where
T: std::convert::Into<bool>,
{
self.exchange_subnet_routes = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_exchange_subnet_routes<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<bool>,
{
self.exchange_subnet_routes = v.map(|x| x.into());
self
}
pub fn set_export_custom_routes_with_public_ip<T>(mut self, v: T) -> Self
where
T: std::convert::Into<bool>,
{
self.export_custom_routes_with_public_ip = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_export_custom_routes_with_public_ip<T>(
mut self,
v: std::option::Option<T>,
) -> Self
where
T: std::convert::Into<bool>,
{
self.export_custom_routes_with_public_ip = v.map(|x| x.into());
self
}
pub fn set_import_custom_routes_with_public_ip<T>(mut self, v: T) -> Self
where
T: std::convert::Into<bool>,
{
self.import_custom_routes_with_public_ip = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_import_custom_routes_with_public_ip<T>(
mut self,
v: std::option::Option<T>,
) -> Self
where
T: std::convert::Into<bool>,
{
self.import_custom_routes_with_public_ip = v.map(|x| x.into());
self
}
pub fn set_state<T: std::convert::Into<crate::model::network_peering::State>>(
mut self,
v: T,
) -> Self {
self.state = v.into();
self
}
pub fn set_state_details<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.state_details = v.into();
self
}
pub fn set_peer_mtu<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.peer_mtu = v.into();
self
}
pub fn set_peer_network_type<
T: std::convert::Into<crate::model::network_peering::PeerNetworkType>,
>(
mut self,
v: T,
) -> Self {
self.peer_network_type = v.into();
self
}
pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.uid = v.into();
self
}
pub fn set_vmware_engine_network<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.vmware_engine_network = v.into();
self
}
pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.description = v.into();
self
}
}
impl wkt::message::Message for NetworkPeering {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.NetworkPeering"
}
}
pub mod network_peering {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum State {
Unspecified,
Inactive,
Active,
Creating,
Deleting,
UnknownValue(state::UnknownValue),
}
#[doc(hidden)]
pub mod state {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl State {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::Inactive => std::option::Option::Some(1),
Self::Active => std::option::Option::Some(2),
Self::Creating => std::option::Option::Some(3),
Self::Deleting => std::option::Option::Some(4),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
Self::Inactive => std::option::Option::Some("INACTIVE"),
Self::Active => std::option::Option::Some("ACTIVE"),
Self::Creating => std::option::Option::Some("CREATING"),
Self::Deleting => std::option::Option::Some("DELETING"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for State {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for State {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for State {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::Inactive,
2 => Self::Active,
3 => Self::Creating,
4 => Self::Deleting,
_ => Self::UnknownValue(state::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for State {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"STATE_UNSPECIFIED" => Self::Unspecified,
"INACTIVE" => Self::Inactive,
"ACTIVE" => Self::Active,
"CREATING" => Self::Creating,
"DELETING" => Self::Deleting,
_ => Self::UnknownValue(state::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for State {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::Inactive => serializer.serialize_i32(1),
Self::Active => serializer.serialize_i32(2),
Self::Creating => serializer.serialize_i32(3),
Self::Deleting => serializer.serialize_i32(4),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for State {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
".google.cloud.vmwareengine.v1.NetworkPeering.State",
))
}
}
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum PeerNetworkType {
Unspecified,
Standard,
VmwareEngineNetwork,
PrivateServicesAccess,
NetappCloudVolumes,
ThirdPartyService,
DellPowerscale,
GoogleCloudNetappVolumes,
UnknownValue(peer_network_type::UnknownValue),
}
#[doc(hidden)]
pub mod peer_network_type {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl PeerNetworkType {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::Standard => std::option::Option::Some(1),
Self::VmwareEngineNetwork => std::option::Option::Some(2),
Self::PrivateServicesAccess => std::option::Option::Some(3),
Self::NetappCloudVolumes => std::option::Option::Some(4),
Self::ThirdPartyService => std::option::Option::Some(5),
Self::DellPowerscale => std::option::Option::Some(6),
Self::GoogleCloudNetappVolumes => std::option::Option::Some(7),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("PEER_NETWORK_TYPE_UNSPECIFIED"),
Self::Standard => std::option::Option::Some("STANDARD"),
Self::VmwareEngineNetwork => std::option::Option::Some("VMWARE_ENGINE_NETWORK"),
Self::PrivateServicesAccess => std::option::Option::Some("PRIVATE_SERVICES_ACCESS"),
Self::NetappCloudVolumes => std::option::Option::Some("NETAPP_CLOUD_VOLUMES"),
Self::ThirdPartyService => std::option::Option::Some("THIRD_PARTY_SERVICE"),
Self::DellPowerscale => std::option::Option::Some("DELL_POWERSCALE"),
Self::GoogleCloudNetappVolumes => {
std::option::Option::Some("GOOGLE_CLOUD_NETAPP_VOLUMES")
}
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for PeerNetworkType {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for PeerNetworkType {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for PeerNetworkType {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::Standard,
2 => Self::VmwareEngineNetwork,
3 => Self::PrivateServicesAccess,
4 => Self::NetappCloudVolumes,
5 => Self::ThirdPartyService,
6 => Self::DellPowerscale,
7 => Self::GoogleCloudNetappVolumes,
_ => Self::UnknownValue(peer_network_type::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for PeerNetworkType {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"PEER_NETWORK_TYPE_UNSPECIFIED" => Self::Unspecified,
"STANDARD" => Self::Standard,
"VMWARE_ENGINE_NETWORK" => Self::VmwareEngineNetwork,
"PRIVATE_SERVICES_ACCESS" => Self::PrivateServicesAccess,
"NETAPP_CLOUD_VOLUMES" => Self::NetappCloudVolumes,
"THIRD_PARTY_SERVICE" => Self::ThirdPartyService,
"DELL_POWERSCALE" => Self::DellPowerscale,
"GOOGLE_CLOUD_NETAPP_VOLUMES" => Self::GoogleCloudNetappVolumes,
_ => Self::UnknownValue(peer_network_type::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for PeerNetworkType {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::Standard => serializer.serialize_i32(1),
Self::VmwareEngineNetwork => serializer.serialize_i32(2),
Self::PrivateServicesAccess => serializer.serialize_i32(3),
Self::NetappCloudVolumes => serializer.serialize_i32(4),
Self::ThirdPartyService => serializer.serialize_i32(5),
Self::DellPowerscale => serializer.serialize_i32(6),
Self::GoogleCloudNetappVolumes => serializer.serialize_i32(7),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for PeerNetworkType {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<PeerNetworkType>::new(
".google.cloud.vmwareengine.v1.NetworkPeering.PeerNetworkType",
))
}
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct PeeringRoute {
pub dest_range: std::string::String,
pub r#type: crate::model::peering_route::Type,
pub next_hop_region: std::string::String,
pub priority: i64,
pub imported: bool,
pub direction: crate::model::peering_route::Direction,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl PeeringRoute {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_dest_range<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.dest_range = v.into();
self
}
pub fn set_type<T: std::convert::Into<crate::model::peering_route::Type>>(
mut self,
v: T,
) -> Self {
self.r#type = v.into();
self
}
pub fn set_next_hop_region<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.next_hop_region = v.into();
self
}
pub fn set_priority<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
self.priority = v.into();
self
}
pub fn set_imported<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.imported = v.into();
self
}
pub fn set_direction<T: std::convert::Into<crate::model::peering_route::Direction>>(
mut self,
v: T,
) -> Self {
self.direction = v.into();
self
}
}
impl wkt::message::Message for PeeringRoute {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.PeeringRoute"
}
}
pub mod peering_route {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum Type {
Unspecified,
DynamicPeeringRoute,
StaticPeeringRoute,
SubnetPeeringRoute,
UnknownValue(r#type::UnknownValue),
}
#[doc(hidden)]
pub mod r#type {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl Type {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::DynamicPeeringRoute => std::option::Option::Some(1),
Self::StaticPeeringRoute => std::option::Option::Some(2),
Self::SubnetPeeringRoute => std::option::Option::Some(3),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("TYPE_UNSPECIFIED"),
Self::DynamicPeeringRoute => std::option::Option::Some("DYNAMIC_PEERING_ROUTE"),
Self::StaticPeeringRoute => std::option::Option::Some("STATIC_PEERING_ROUTE"),
Self::SubnetPeeringRoute => std::option::Option::Some("SUBNET_PEERING_ROUTE"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for Type {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for Type {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for Type {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::DynamicPeeringRoute,
2 => Self::StaticPeeringRoute,
3 => Self::SubnetPeeringRoute,
_ => Self::UnknownValue(r#type::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for Type {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"TYPE_UNSPECIFIED" => Self::Unspecified,
"DYNAMIC_PEERING_ROUTE" => Self::DynamicPeeringRoute,
"STATIC_PEERING_ROUTE" => Self::StaticPeeringRoute,
"SUBNET_PEERING_ROUTE" => Self::SubnetPeeringRoute,
_ => Self::UnknownValue(r#type::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for Type {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::DynamicPeeringRoute => serializer.serialize_i32(1),
Self::StaticPeeringRoute => serializer.serialize_i32(2),
Self::SubnetPeeringRoute => serializer.serialize_i32(3),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for Type {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
".google.cloud.vmwareengine.v1.PeeringRoute.Type",
))
}
}
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum Direction {
Unspecified,
Incoming,
Outgoing,
UnknownValue(direction::UnknownValue),
}
#[doc(hidden)]
pub mod direction {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl Direction {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::Incoming => std::option::Option::Some(1),
Self::Outgoing => std::option::Option::Some(2),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("DIRECTION_UNSPECIFIED"),
Self::Incoming => std::option::Option::Some("INCOMING"),
Self::Outgoing => std::option::Option::Some("OUTGOING"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for Direction {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for Direction {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for Direction {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::Incoming,
2 => Self::Outgoing,
_ => Self::UnknownValue(direction::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for Direction {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"DIRECTION_UNSPECIFIED" => Self::Unspecified,
"INCOMING" => Self::Incoming,
"OUTGOING" => Self::Outgoing,
_ => Self::UnknownValue(direction::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for Direction {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::Incoming => serializer.serialize_i32(1),
Self::Outgoing => serializer.serialize_i32(2),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for Direction {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<Direction>::new(
".google.cloud.vmwareengine.v1.PeeringRoute.Direction",
))
}
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct NetworkPolicy {
pub name: std::string::String,
pub create_time: std::option::Option<wkt::Timestamp>,
pub update_time: std::option::Option<wkt::Timestamp>,
pub internet_access: std::option::Option<crate::model::network_policy::NetworkService>,
pub external_ip: std::option::Option<crate::model::network_policy::NetworkService>,
pub edge_services_cidr: std::string::String,
pub uid: std::string::String,
pub vmware_engine_network: std::string::String,
pub description: std::string::String,
pub vmware_engine_network_canonical: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl NetworkPolicy {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_create_time<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.create_time = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.create_time = v.map(|x| x.into());
self
}
pub fn set_update_time<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.update_time = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.update_time = v.map(|x| x.into());
self
}
pub fn set_internet_access<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::network_policy::NetworkService>,
{
self.internet_access = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_internet_access<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::network_policy::NetworkService>,
{
self.internet_access = v.map(|x| x.into());
self
}
pub fn set_external_ip<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::network_policy::NetworkService>,
{
self.external_ip = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_external_ip<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::network_policy::NetworkService>,
{
self.external_ip = v.map(|x| x.into());
self
}
pub fn set_edge_services_cidr<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.edge_services_cidr = v.into();
self
}
pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.uid = v.into();
self
}
pub fn set_vmware_engine_network<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.vmware_engine_network = v.into();
self
}
pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.description = v.into();
self
}
pub fn set_vmware_engine_network_canonical<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.vmware_engine_network_canonical = v.into();
self
}
}
impl wkt::message::Message for NetworkPolicy {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.NetworkPolicy"
}
}
pub mod network_policy {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct NetworkService {
pub enabled: bool,
pub state: crate::model::network_policy::network_service::State,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl NetworkService {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.enabled = v.into();
self
}
pub fn set_state<
T: std::convert::Into<crate::model::network_policy::network_service::State>,
>(
mut self,
v: T,
) -> Self {
self.state = v.into();
self
}
}
impl wkt::message::Message for NetworkService {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.NetworkPolicy.NetworkService"
}
}
pub mod network_service {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum State {
Unspecified,
Unprovisioned,
Reconciling,
Active,
UnknownValue(state::UnknownValue),
}
#[doc(hidden)]
pub mod state {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl State {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::Unprovisioned => std::option::Option::Some(1),
Self::Reconciling => std::option::Option::Some(2),
Self::Active => std::option::Option::Some(3),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
Self::Unprovisioned => std::option::Option::Some("UNPROVISIONED"),
Self::Reconciling => std::option::Option::Some("RECONCILING"),
Self::Active => std::option::Option::Some("ACTIVE"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for State {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for State {
fn fmt(
&self,
f: &mut std::fmt::Formatter<'_>,
) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for State {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::Unprovisioned,
2 => Self::Reconciling,
3 => Self::Active,
_ => Self::UnknownValue(state::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for State {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"STATE_UNSPECIFIED" => Self::Unspecified,
"UNPROVISIONED" => Self::Unprovisioned,
"RECONCILING" => Self::Reconciling,
"ACTIVE" => Self::Active,
_ => Self::UnknownValue(state::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for State {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::Unprovisioned => serializer.serialize_i32(1),
Self::Reconciling => serializer.serialize_i32(2),
Self::Active => serializer.serialize_i32(3),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for State {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
".google.cloud.vmwareengine.v1.NetworkPolicy.NetworkService.State",
))
}
}
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ManagementDnsZoneBinding {
pub name: std::string::String,
pub create_time: std::option::Option<wkt::Timestamp>,
pub update_time: std::option::Option<wkt::Timestamp>,
pub state: crate::model::management_dns_zone_binding::State,
pub description: std::string::String,
pub uid: std::string::String,
pub bind_network: std::option::Option<crate::model::management_dns_zone_binding::BindNetwork>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ManagementDnsZoneBinding {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_create_time<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.create_time = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.create_time = v.map(|x| x.into());
self
}
pub fn set_update_time<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.update_time = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.update_time = v.map(|x| x.into());
self
}
pub fn set_state<T: std::convert::Into<crate::model::management_dns_zone_binding::State>>(
mut self,
v: T,
) -> Self {
self.state = v.into();
self
}
pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.description = v.into();
self
}
pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.uid = v.into();
self
}
pub fn set_bind_network<
T: std::convert::Into<
std::option::Option<crate::model::management_dns_zone_binding::BindNetwork>,
>,
>(
mut self,
v: T,
) -> Self {
self.bind_network = v.into();
self
}
pub fn vpc_network(&self) -> std::option::Option<&std::string::String> {
#[allow(unreachable_patterns)]
self.bind_network.as_ref().and_then(|v| match v {
crate::model::management_dns_zone_binding::BindNetwork::VpcNetwork(v) => {
std::option::Option::Some(v)
}
_ => std::option::Option::None,
})
}
pub fn set_vpc_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.bind_network = std::option::Option::Some(
crate::model::management_dns_zone_binding::BindNetwork::VpcNetwork(v.into()),
);
self
}
pub fn vmware_engine_network(&self) -> std::option::Option<&std::string::String> {
#[allow(unreachable_patterns)]
self.bind_network.as_ref().and_then(|v| match v {
crate::model::management_dns_zone_binding::BindNetwork::VmwareEngineNetwork(v) => {
std::option::Option::Some(v)
}
_ => std::option::Option::None,
})
}
pub fn set_vmware_engine_network<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.bind_network = std::option::Option::Some(
crate::model::management_dns_zone_binding::BindNetwork::VmwareEngineNetwork(v.into()),
);
self
}
}
impl wkt::message::Message for ManagementDnsZoneBinding {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.ManagementDnsZoneBinding"
}
}
pub mod management_dns_zone_binding {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum State {
Unspecified,
Active,
Creating,
Updating,
Deleting,
Failed,
UnknownValue(state::UnknownValue),
}
#[doc(hidden)]
pub mod state {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl State {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::Active => std::option::Option::Some(1),
Self::Creating => std::option::Option::Some(2),
Self::Updating => std::option::Option::Some(3),
Self::Deleting => std::option::Option::Some(4),
Self::Failed => std::option::Option::Some(5),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
Self::Active => std::option::Option::Some("ACTIVE"),
Self::Creating => std::option::Option::Some("CREATING"),
Self::Updating => std::option::Option::Some("UPDATING"),
Self::Deleting => std::option::Option::Some("DELETING"),
Self::Failed => std::option::Option::Some("FAILED"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for State {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for State {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for State {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::Active,
2 => Self::Creating,
3 => Self::Updating,
4 => Self::Deleting,
5 => Self::Failed,
_ => Self::UnknownValue(state::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for State {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"STATE_UNSPECIFIED" => Self::Unspecified,
"ACTIVE" => Self::Active,
"CREATING" => Self::Creating,
"UPDATING" => Self::Updating,
"DELETING" => Self::Deleting,
"FAILED" => Self::Failed,
_ => Self::UnknownValue(state::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for State {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::Active => serializer.serialize_i32(1),
Self::Creating => serializer.serialize_i32(2),
Self::Updating => serializer.serialize_i32(3),
Self::Deleting => serializer.serialize_i32(4),
Self::Failed => serializer.serialize_i32(5),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for State {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
".google.cloud.vmwareengine.v1.ManagementDnsZoneBinding.State",
))
}
}
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum BindNetwork {
VpcNetwork(std::string::String),
VmwareEngineNetwork(std::string::String),
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct VmwareEngineNetwork {
pub name: std::string::String,
pub create_time: std::option::Option<wkt::Timestamp>,
pub update_time: std::option::Option<wkt::Timestamp>,
pub description: std::string::String,
pub vpc_networks: std::vec::Vec<crate::model::vmware_engine_network::VpcNetwork>,
pub state: crate::model::vmware_engine_network::State,
pub r#type: crate::model::vmware_engine_network::Type,
pub uid: std::string::String,
pub etag: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl VmwareEngineNetwork {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_create_time<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.create_time = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.create_time = v.map(|x| x.into());
self
}
pub fn set_update_time<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.update_time = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.update_time = v.map(|x| x.into());
self
}
pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.description = v.into();
self
}
pub fn set_vpc_networks<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::vmware_engine_network::VpcNetwork>,
{
use std::iter::Iterator;
self.vpc_networks = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_state<T: std::convert::Into<crate::model::vmware_engine_network::State>>(
mut self,
v: T,
) -> Self {
self.state = v.into();
self
}
pub fn set_type<T: std::convert::Into<crate::model::vmware_engine_network::Type>>(
mut self,
v: T,
) -> Self {
self.r#type = v.into();
self
}
pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.uid = v.into();
self
}
pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.etag = v.into();
self
}
}
impl wkt::message::Message for VmwareEngineNetwork {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.VmwareEngineNetwork"
}
}
pub mod vmware_engine_network {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct VpcNetwork {
pub r#type: crate::model::vmware_engine_network::vpc_network::Type,
pub network: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl VpcNetwork {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_type<
T: std::convert::Into<crate::model::vmware_engine_network::vpc_network::Type>,
>(
mut self,
v: T,
) -> Self {
self.r#type = v.into();
self
}
pub fn set_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.network = v.into();
self
}
}
impl wkt::message::Message for VpcNetwork {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.VmwareEngineNetwork.VpcNetwork"
}
}
pub mod vpc_network {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum Type {
Unspecified,
Intranet,
Internet,
GoogleCloud,
UnknownValue(r#type::UnknownValue),
}
#[doc(hidden)]
pub mod r#type {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl Type {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::Intranet => std::option::Option::Some(1),
Self::Internet => std::option::Option::Some(2),
Self::GoogleCloud => std::option::Option::Some(3),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("TYPE_UNSPECIFIED"),
Self::Intranet => std::option::Option::Some("INTRANET"),
Self::Internet => std::option::Option::Some("INTERNET"),
Self::GoogleCloud => std::option::Option::Some("GOOGLE_CLOUD"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for Type {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for Type {
fn fmt(
&self,
f: &mut std::fmt::Formatter<'_>,
) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for Type {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::Intranet,
2 => Self::Internet,
3 => Self::GoogleCloud,
_ => Self::UnknownValue(r#type::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for Type {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"TYPE_UNSPECIFIED" => Self::Unspecified,
"INTRANET" => Self::Intranet,
"INTERNET" => Self::Internet,
"GOOGLE_CLOUD" => Self::GoogleCloud,
_ => Self::UnknownValue(r#type::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for Type {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::Intranet => serializer.serialize_i32(1),
Self::Internet => serializer.serialize_i32(2),
Self::GoogleCloud => serializer.serialize_i32(3),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for Type {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
".google.cloud.vmwareengine.v1.VmwareEngineNetwork.VpcNetwork.Type",
))
}
}
}
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum State {
Unspecified,
Creating,
Active,
Updating,
Deleting,
UnknownValue(state::UnknownValue),
}
#[doc(hidden)]
pub mod state {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl State {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::Creating => std::option::Option::Some(1),
Self::Active => std::option::Option::Some(2),
Self::Updating => std::option::Option::Some(3),
Self::Deleting => std::option::Option::Some(4),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
Self::Creating => std::option::Option::Some("CREATING"),
Self::Active => std::option::Option::Some("ACTIVE"),
Self::Updating => std::option::Option::Some("UPDATING"),
Self::Deleting => std::option::Option::Some("DELETING"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for State {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for State {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for State {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::Creating,
2 => Self::Active,
3 => Self::Updating,
4 => Self::Deleting,
_ => Self::UnknownValue(state::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for State {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"STATE_UNSPECIFIED" => Self::Unspecified,
"CREATING" => Self::Creating,
"ACTIVE" => Self::Active,
"UPDATING" => Self::Updating,
"DELETING" => Self::Deleting,
_ => Self::UnknownValue(state::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for State {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::Creating => serializer.serialize_i32(1),
Self::Active => serializer.serialize_i32(2),
Self::Updating => serializer.serialize_i32(3),
Self::Deleting => serializer.serialize_i32(4),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for State {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
".google.cloud.vmwareengine.v1.VmwareEngineNetwork.State",
))
}
}
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum Type {
Unspecified,
Legacy,
Standard,
UnknownValue(r#type::UnknownValue),
}
#[doc(hidden)]
pub mod r#type {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl Type {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::Legacy => std::option::Option::Some(1),
Self::Standard => std::option::Option::Some(2),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("TYPE_UNSPECIFIED"),
Self::Legacy => std::option::Option::Some("LEGACY"),
Self::Standard => std::option::Option::Some("STANDARD"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for Type {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for Type {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for Type {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::Legacy,
2 => Self::Standard,
_ => Self::UnknownValue(r#type::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for Type {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"TYPE_UNSPECIFIED" => Self::Unspecified,
"LEGACY" => Self::Legacy,
"STANDARD" => Self::Standard,
_ => Self::UnknownValue(r#type::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for Type {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::Legacy => serializer.serialize_i32(1),
Self::Standard => serializer.serialize_i32(2),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for Type {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
".google.cloud.vmwareengine.v1.VmwareEngineNetwork.Type",
))
}
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct PrivateConnection {
pub name: std::string::String,
pub create_time: std::option::Option<wkt::Timestamp>,
pub update_time: std::option::Option<wkt::Timestamp>,
pub description: std::string::String,
pub state: crate::model::private_connection::State,
pub vmware_engine_network: std::string::String,
pub vmware_engine_network_canonical: std::string::String,
pub r#type: crate::model::private_connection::Type,
pub peering_id: std::string::String,
pub routing_mode: crate::model::private_connection::RoutingMode,
pub uid: std::string::String,
pub service_network: std::string::String,
pub peering_state: crate::model::private_connection::PeeringState,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl PrivateConnection {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_create_time<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.create_time = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.create_time = v.map(|x| x.into());
self
}
pub fn set_update_time<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.update_time = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.update_time = v.map(|x| x.into());
self
}
pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.description = v.into();
self
}
pub fn set_state<T: std::convert::Into<crate::model::private_connection::State>>(
mut self,
v: T,
) -> Self {
self.state = v.into();
self
}
pub fn set_vmware_engine_network<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.vmware_engine_network = v.into();
self
}
pub fn set_vmware_engine_network_canonical<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.vmware_engine_network_canonical = v.into();
self
}
pub fn set_type<T: std::convert::Into<crate::model::private_connection::Type>>(
mut self,
v: T,
) -> Self {
self.r#type = v.into();
self
}
pub fn set_peering_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.peering_id = v.into();
self
}
pub fn set_routing_mode<
T: std::convert::Into<crate::model::private_connection::RoutingMode>,
>(
mut self,
v: T,
) -> Self {
self.routing_mode = v.into();
self
}
pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.uid = v.into();
self
}
pub fn set_service_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.service_network = v.into();
self
}
pub fn set_peering_state<
T: std::convert::Into<crate::model::private_connection::PeeringState>,
>(
mut self,
v: T,
) -> Self {
self.peering_state = v.into();
self
}
}
impl wkt::message::Message for PrivateConnection {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.PrivateConnection"
}
}
pub mod private_connection {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum State {
Unspecified,
Creating,
Active,
Updating,
Deleting,
Unprovisioned,
Failed,
UnknownValue(state::UnknownValue),
}
#[doc(hidden)]
pub mod state {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl State {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::Creating => std::option::Option::Some(1),
Self::Active => std::option::Option::Some(2),
Self::Updating => std::option::Option::Some(3),
Self::Deleting => std::option::Option::Some(4),
Self::Unprovisioned => std::option::Option::Some(5),
Self::Failed => std::option::Option::Some(6),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
Self::Creating => std::option::Option::Some("CREATING"),
Self::Active => std::option::Option::Some("ACTIVE"),
Self::Updating => std::option::Option::Some("UPDATING"),
Self::Deleting => std::option::Option::Some("DELETING"),
Self::Unprovisioned => std::option::Option::Some("UNPROVISIONED"),
Self::Failed => std::option::Option::Some("FAILED"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for State {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for State {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for State {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::Creating,
2 => Self::Active,
3 => Self::Updating,
4 => Self::Deleting,
5 => Self::Unprovisioned,
6 => Self::Failed,
_ => Self::UnknownValue(state::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for State {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"STATE_UNSPECIFIED" => Self::Unspecified,
"CREATING" => Self::Creating,
"ACTIVE" => Self::Active,
"UPDATING" => Self::Updating,
"DELETING" => Self::Deleting,
"UNPROVISIONED" => Self::Unprovisioned,
"FAILED" => Self::Failed,
_ => Self::UnknownValue(state::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for State {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::Creating => serializer.serialize_i32(1),
Self::Active => serializer.serialize_i32(2),
Self::Updating => serializer.serialize_i32(3),
Self::Deleting => serializer.serialize_i32(4),
Self::Unprovisioned => serializer.serialize_i32(5),
Self::Failed => serializer.serialize_i32(6),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for State {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
".google.cloud.vmwareengine.v1.PrivateConnection.State",
))
}
}
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum Type {
Unspecified,
PrivateServiceAccess,
NetappCloudVolumes,
DellPowerscale,
ThirdPartyService,
UnknownValue(r#type::UnknownValue),
}
#[doc(hidden)]
pub mod r#type {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl Type {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::PrivateServiceAccess => std::option::Option::Some(1),
Self::NetappCloudVolumes => std::option::Option::Some(2),
Self::DellPowerscale => std::option::Option::Some(3),
Self::ThirdPartyService => std::option::Option::Some(4),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("TYPE_UNSPECIFIED"),
Self::PrivateServiceAccess => std::option::Option::Some("PRIVATE_SERVICE_ACCESS"),
Self::NetappCloudVolumes => std::option::Option::Some("NETAPP_CLOUD_VOLUMES"),
Self::DellPowerscale => std::option::Option::Some("DELL_POWERSCALE"),
Self::ThirdPartyService => std::option::Option::Some("THIRD_PARTY_SERVICE"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for Type {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for Type {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for Type {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::PrivateServiceAccess,
2 => Self::NetappCloudVolumes,
3 => Self::DellPowerscale,
4 => Self::ThirdPartyService,
_ => Self::UnknownValue(r#type::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for Type {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"TYPE_UNSPECIFIED" => Self::Unspecified,
"PRIVATE_SERVICE_ACCESS" => Self::PrivateServiceAccess,
"NETAPP_CLOUD_VOLUMES" => Self::NetappCloudVolumes,
"DELL_POWERSCALE" => Self::DellPowerscale,
"THIRD_PARTY_SERVICE" => Self::ThirdPartyService,
_ => Self::UnknownValue(r#type::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for Type {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::PrivateServiceAccess => serializer.serialize_i32(1),
Self::NetappCloudVolumes => serializer.serialize_i32(2),
Self::DellPowerscale => serializer.serialize_i32(3),
Self::ThirdPartyService => serializer.serialize_i32(4),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for Type {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
".google.cloud.vmwareengine.v1.PrivateConnection.Type",
))
}
}
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum RoutingMode {
Unspecified,
Global,
Regional,
UnknownValue(routing_mode::UnknownValue),
}
#[doc(hidden)]
pub mod routing_mode {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl RoutingMode {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::Global => std::option::Option::Some(1),
Self::Regional => std::option::Option::Some(2),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("ROUTING_MODE_UNSPECIFIED"),
Self::Global => std::option::Option::Some("GLOBAL"),
Self::Regional => std::option::Option::Some("REGIONAL"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for RoutingMode {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for RoutingMode {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for RoutingMode {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::Global,
2 => Self::Regional,
_ => Self::UnknownValue(routing_mode::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for RoutingMode {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"ROUTING_MODE_UNSPECIFIED" => Self::Unspecified,
"GLOBAL" => Self::Global,
"REGIONAL" => Self::Regional,
_ => Self::UnknownValue(routing_mode::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for RoutingMode {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::Global => serializer.serialize_i32(1),
Self::Regional => serializer.serialize_i32(2),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for RoutingMode {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<RoutingMode>::new(
".google.cloud.vmwareengine.v1.PrivateConnection.RoutingMode",
))
}
}
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum PeeringState {
Unspecified,
PeeringActive,
PeeringInactive,
UnknownValue(peering_state::UnknownValue),
}
#[doc(hidden)]
pub mod peering_state {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl PeeringState {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::PeeringActive => std::option::Option::Some(1),
Self::PeeringInactive => std::option::Option::Some(2),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("PEERING_STATE_UNSPECIFIED"),
Self::PeeringActive => std::option::Option::Some("PEERING_ACTIVE"),
Self::PeeringInactive => std::option::Option::Some("PEERING_INACTIVE"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for PeeringState {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for PeeringState {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for PeeringState {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::PeeringActive,
2 => Self::PeeringInactive,
_ => Self::UnknownValue(peering_state::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for PeeringState {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"PEERING_STATE_UNSPECIFIED" => Self::Unspecified,
"PEERING_ACTIVE" => Self::PeeringActive,
"PEERING_INACTIVE" => Self::PeeringInactive,
_ => Self::UnknownValue(peering_state::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for PeeringState {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::PeeringActive => serializer.serialize_i32(1),
Self::PeeringInactive => serializer.serialize_i32(2),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for PeeringState {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<PeeringState>::new(
".google.cloud.vmwareengine.v1.PrivateConnection.PeeringState",
))
}
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct LocationMetadata {
pub capabilities: std::vec::Vec<crate::model::location_metadata::Capability>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl LocationMetadata {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_capabilities<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::location_metadata::Capability>,
{
use std::iter::Iterator;
self.capabilities = v.into_iter().map(|i| i.into()).collect();
self
}
}
impl wkt::message::Message for LocationMetadata {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.LocationMetadata"
}
}
pub mod location_metadata {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum Capability {
Unspecified,
StretchedClusters,
UnknownValue(capability::UnknownValue),
}
#[doc(hidden)]
pub mod capability {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl Capability {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::StretchedClusters => std::option::Option::Some(1),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("CAPABILITY_UNSPECIFIED"),
Self::StretchedClusters => std::option::Option::Some("STRETCHED_CLUSTERS"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for Capability {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for Capability {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for Capability {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::StretchedClusters,
_ => Self::UnknownValue(capability::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for Capability {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"CAPABILITY_UNSPECIFIED" => Self::Unspecified,
"STRETCHED_CLUSTERS" => Self::StretchedClusters,
_ => Self::UnknownValue(capability::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for Capability {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::StretchedClusters => serializer.serialize_i32(1),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for Capability {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<Capability>::new(
".google.cloud.vmwareengine.v1.LocationMetadata.Capability",
))
}
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct DnsBindPermission {
pub name: std::string::String,
pub principals: std::vec::Vec<crate::model::Principal>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl DnsBindPermission {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_principals<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::Principal>,
{
use std::iter::Iterator;
self.principals = v.into_iter().map(|i| i.into()).collect();
self
}
}
impl wkt::message::Message for DnsBindPermission {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.DnsBindPermission"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct Principal {
pub principal: std::option::Option<crate::model::principal::Principal>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl Principal {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_principal<
T: std::convert::Into<std::option::Option<crate::model::principal::Principal>>,
>(
mut self,
v: T,
) -> Self {
self.principal = v.into();
self
}
pub fn user(&self) -> std::option::Option<&std::string::String> {
#[allow(unreachable_patterns)]
self.principal.as_ref().and_then(|v| match v {
crate::model::principal::Principal::User(v) => std::option::Option::Some(v),
_ => std::option::Option::None,
})
}
pub fn set_user<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.principal =
std::option::Option::Some(crate::model::principal::Principal::User(v.into()));
self
}
pub fn service_account(&self) -> std::option::Option<&std::string::String> {
#[allow(unreachable_patterns)]
self.principal.as_ref().and_then(|v| match v {
crate::model::principal::Principal::ServiceAccount(v) => std::option::Option::Some(v),
_ => std::option::Option::None,
})
}
pub fn set_service_account<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.principal =
std::option::Option::Some(crate::model::principal::Principal::ServiceAccount(v.into()));
self
}
}
impl wkt::message::Message for Principal {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.vmwareengine.v1.Principal"
}
}
pub mod principal {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum Principal {
User(std::string::String),
ServiceAccount(std::string::String),
}
}