#[non_exhaustive]pub struct ServiceConfig {
pub name: String,
pub title: String,
pub apis: Vec<Api>,
pub documentation: Option<Documentation>,
pub quota: Option<Quota>,
pub authentication: Option<Authentication>,
pub usage: Option<Usage>,
pub endpoints: Vec<Endpoint>,
pub monitored_resources: Vec<MonitoredResourceDescriptor>,
pub monitoring: Option<Monitoring>,
/* private fields */
}Expand description
The configuration of the service.
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: StringThe DNS address at which this service is available.
An example DNS address would be:
calendar.googleapis.com.
title: StringThe product title for this service.
apis: Vec<Api>A list of API interfaces exported by this service. Contains only the names, versions, and method names of the interfaces.
documentation: Option<Documentation>Additional API documentation. Contains only the summary and the documentation URL.
quota: Option<Quota>Quota configuration.
authentication: Option<Authentication>Auth configuration. Contains only the OAuth rules.
usage: Option<Usage>Configuration controlling usage of this service.
endpoints: Vec<Endpoint>Configuration for network endpoints. Contains only the names and aliases of the endpoints.
monitored_resources: Vec<MonitoredResourceDescriptor>Defines the monitored resources used by this service. This is required by the [Service.monitoring][google.api.Service.monitoring] and [Service.logging][google.api.Service.logging] configurations.
monitoring: Option<Monitoring>Monitoring configuration. This should not include the ‘producer_destinations’ field.
Implementations§
Source§impl ServiceConfig
impl ServiceConfig
Sourcepub fn set_documentation<T>(self, v: T) -> Selfwhere
T: Into<Documentation>,
pub fn set_documentation<T>(self, v: T) -> Selfwhere
T: Into<Documentation>,
Sets the value of documentation.
§Example
use google_cloud_api::model::Documentation;
let x = ServiceConfig::new().set_documentation(Documentation::default()/* use setters */);Sourcepub fn set_or_clear_documentation<T>(self, v: Option<T>) -> Selfwhere
T: Into<Documentation>,
pub fn set_or_clear_documentation<T>(self, v: Option<T>) -> Selfwhere
T: Into<Documentation>,
Sets or clears the value of documentation.
§Example
use google_cloud_api::model::Documentation;
let x = ServiceConfig::new().set_or_clear_documentation(Some(Documentation::default()/* use setters */));
let x = ServiceConfig::new().set_or_clear_documentation(None::<Documentation>);Sourcepub fn set_or_clear_quota<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_quota<T>(self, v: Option<T>) -> Self
Sourcepub fn set_authentication<T>(self, v: T) -> Selfwhere
T: Into<Authentication>,
pub fn set_authentication<T>(self, v: T) -> Selfwhere
T: Into<Authentication>,
Sets the value of authentication.
§Example
use google_cloud_api::model::Authentication;
let x = ServiceConfig::new().set_authentication(Authentication::default()/* use setters */);Sourcepub fn set_or_clear_authentication<T>(self, v: Option<T>) -> Selfwhere
T: Into<Authentication>,
pub fn set_or_clear_authentication<T>(self, v: Option<T>) -> Selfwhere
T: Into<Authentication>,
Sets or clears the value of authentication.
§Example
use google_cloud_api::model::Authentication;
let x = ServiceConfig::new().set_or_clear_authentication(Some(Authentication::default()/* use setters */));
let x = ServiceConfig::new().set_or_clear_authentication(None::<Authentication>);Sourcepub fn set_or_clear_usage<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_usage<T>(self, v: Option<T>) -> Self
Sourcepub fn set_endpoints<T, V>(self, v: T) -> Self
pub fn set_endpoints<T, V>(self, v: T) -> Self
Sourcepub fn set_monitored_resources<T, V>(self, v: T) -> Self
pub fn set_monitored_resources<T, V>(self, v: T) -> Self
Sets the value of monitored_resources.
§Example
use google_cloud_api::model::MonitoredResourceDescriptor;
let x = ServiceConfig::new()
.set_monitored_resources([
MonitoredResourceDescriptor::default()/* use setters */,
MonitoredResourceDescriptor::default()/* use (different) setters */,
]);Sourcepub fn set_monitoring<T>(self, v: T) -> Selfwhere
T: Into<Monitoring>,
pub fn set_monitoring<T>(self, v: T) -> Selfwhere
T: Into<Monitoring>,
Sets the value of monitoring.
§Example
use google_cloud_api::model::Monitoring;
let x = ServiceConfig::new().set_monitoring(Monitoring::default()/* use setters */);Sourcepub fn set_or_clear_monitoring<T>(self, v: Option<T>) -> Selfwhere
T: Into<Monitoring>,
pub fn set_or_clear_monitoring<T>(self, v: Option<T>) -> Selfwhere
T: Into<Monitoring>,
Sets or clears the value of monitoring.
§Example
use google_cloud_api::model::Monitoring;
let x = ServiceConfig::new().set_or_clear_monitoring(Some(Monitoring::default()/* use setters */));
let x = ServiceConfig::new().set_or_clear_monitoring(None::<Monitoring>);Trait Implementations§
Source§impl Clone for ServiceConfig
impl Clone for ServiceConfig
Source§fn clone(&self) -> ServiceConfig
fn clone(&self) -> ServiceConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ServiceConfig
impl Debug for ServiceConfig
Source§impl Default for ServiceConfig
impl Default for ServiceConfig
Source§fn default() -> ServiceConfig
fn default() -> ServiceConfig
Source§impl Message for ServiceConfig
impl Message for ServiceConfig
Source§impl PartialEq for ServiceConfig
impl PartialEq for ServiceConfig
impl StructuralPartialEq for ServiceConfig
Auto Trait Implementations§
impl Freeze for ServiceConfig
impl RefUnwindSafe for ServiceConfig
impl Send for ServiceConfig
impl Sync for ServiceConfig
impl Unpin for ServiceConfig
impl UnsafeUnpin for ServiceConfig
impl UnwindSafe for ServiceConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request