#[non_exhaustive]pub struct ApiConfig {
pub name: String,
pub create_time: Option<Timestamp>,
pub update_time: Option<Timestamp>,
pub labels: HashMap<String, String>,
pub display_name: String,
pub gateway_service_account: String,
pub service_config_id: String,
pub state: State,
pub openapi_documents: Vec<OpenApiDocument>,
pub grpc_services: Vec<GrpcServiceDefinition>,
pub managed_service_configs: Vec<File>,
/* private fields */
}Expand description
An API Configuration is a combination of settings for both the Managed Service and Gateways serving this API Config.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringOutput only. Resource name of the API Config. Format: projects/{project}/locations/global/apis/{api}/configs/{api_config}
create_time: Option<Timestamp>Output only. Created time.
update_time: Option<Timestamp>Output only. Updated time.
labels: HashMap<String, String>Optional. Resource labels to represent user-provided metadata. Refer to cloud documentation on labels for more details. https://cloud.google.com/compute/docs/labeling-resources
display_name: StringOptional. Display name.
gateway_service_account: StringImmutable. The Google Cloud IAM Service Account that Gateways serving this config
should use to authenticate to other services. This may either be the
Service Account’s email
({ACCOUNT_ID}@{PROJECT}.iam.gserviceaccount.com) or its full resource
name (projects/{PROJECT}/accounts/{UNIQUE_ID}). This is most often used
when the service is a GCP resource such as a Cloud Run Service or an
IAP-secured service.
service_config_id: StringOutput only. The ID of the associated Service Config ( https://cloud.google.com/service-infrastructure/docs/glossary#config).
state: StateOutput only. State of the API Config.
openapi_documents: Vec<OpenApiDocument>Optional. OpenAPI specification documents. If specified, grpc_services and managed_service_configs must not be included.
grpc_services: Vec<GrpcServiceDefinition>Optional. gRPC service definition files. If specified, openapi_documents must not be included.
managed_service_configs: Vec<File>Optional. Service Configuration files. At least one must be included when using gRPC service definitions. See https://cloud.google.com/endpoints/docs/grpc/grpc-service-config#service_configuration_overview for the expected file contents.
If multiple files are specified, the files are merged with the following rules:
- All singular scalar fields are merged using “last one wins” semantics in the order of the files uploaded.
- Repeated fields are concatenated.
- Singular embedded messages are merged using these rules for nested fields.
Implementations§
Source§impl ApiConfig
impl ApiConfig
pub fn new() -> Self
Sourcepub fn set_create_time<T>(self, v: T) -> Self
pub fn set_create_time<T>(self, v: T) -> Self
Sets the value of create_time.
§Example
use wkt::Timestamp;
let x = ApiConfig::new().set_create_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of create_time.
§Example
use wkt::Timestamp;
let x = ApiConfig::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
let x = ApiConfig::new().set_or_clear_create_time(None::<Timestamp>);Sourcepub fn set_update_time<T>(self, v: T) -> Self
pub fn set_update_time<T>(self, v: T) -> Self
Sets the value of update_time.
§Example
use wkt::Timestamp;
let x = ApiConfig::new().set_update_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_update_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_update_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of update_time.
§Example
use wkt::Timestamp;
let x = ApiConfig::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
let x = ApiConfig::new().set_or_clear_update_time(None::<Timestamp>);Sourcepub fn set_labels<T, K, V>(self, v: T) -> Self
pub fn set_labels<T, K, V>(self, v: T) -> Self
Sourcepub fn set_display_name<T: Into<String>>(self, v: T) -> Self
pub fn set_display_name<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_gateway_service_account<T: Into<String>>(self, v: T) -> Self
pub fn set_gateway_service_account<T: Into<String>>(self, v: T) -> Self
Sets the value of gateway_service_account.
§Example
let x = ApiConfig::new().set_gateway_service_account("example");Sourcepub fn set_service_config_id<T: Into<String>>(self, v: T) -> Self
pub fn set_service_config_id<T: Into<String>>(self, v: T) -> Self
Sets the value of service_config_id.
§Example
let x = ApiConfig::new().set_service_config_id("example");Sourcepub fn set_openapi_documents<T, V>(self, v: T) -> Self
pub fn set_openapi_documents<T, V>(self, v: T) -> Self
Sets the value of openapi_documents.
§Example
use google_cloud_apigateway_v1::model::api_config::OpenApiDocument;
let x = ApiConfig::new()
.set_openapi_documents([
OpenApiDocument::default()/* use setters */,
OpenApiDocument::default()/* use (different) setters */,
]);Sourcepub fn set_grpc_services<T, V>(self, v: T) -> Self
pub fn set_grpc_services<T, V>(self, v: T) -> Self
Sets the value of grpc_services.
§Example
use google_cloud_apigateway_v1::model::api_config::GrpcServiceDefinition;
let x = ApiConfig::new()
.set_grpc_services([
GrpcServiceDefinition::default()/* use setters */,
GrpcServiceDefinition::default()/* use (different) setters */,
]);Sourcepub fn set_managed_service_configs<T, V>(self, v: T) -> Self
pub fn set_managed_service_configs<T, V>(self, v: T) -> Self
Sets the value of managed_service_configs.
§Example
use google_cloud_apigateway_v1::model::api_config::File;
let x = ApiConfig::new()
.set_managed_service_configs([
File::default()/* use setters */,
File::default()/* use (different) setters */,
]);