#[non_exhaustive]pub struct Service {
pub name: String,
pub display_name: String,
pub description: String,
pub service_reference: Option<ServiceReference>,
pub service_properties: Option<ServiceProperties>,
pub attributes: Option<Attributes>,
pub discovered_service: String,
pub create_time: Option<Timestamp>,
pub update_time: Option<Timestamp>,
pub uid: String,
pub state: State,
/* private fields */
}Expand description
Service is an App Hub data model that contains a discovered service, which represents a network or API interface that exposes some functionality to clients for consumption over the network.
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: StringIdentifier. The resource name of a Service. Format:
"projects/{host-project-id}/locations/{location}/applications/{application-id}/services/{service-id}"
display_name: StringOptional. User-defined name for the Service. Can have a maximum length of 63 characters.
description: StringOptional. User-defined description of a Service. Can have a maximum length of 2048 characters.
service_reference: Option<ServiceReference>Output only. Reference to an underlying networking resource that can comprise a Service. These are immutable.
service_properties: Option<ServiceProperties>Output only. Properties of an underlying compute resource that can comprise a Service. These are immutable.
attributes: Option<Attributes>Optional. Consumer provided attributes.
discovered_service: StringRequired. Immutable. The resource name of the original discovered service.
create_time: Option<Timestamp>Output only. Create time.
update_time: Option<Timestamp>Output only. Update time.
uid: StringOutput only. A universally unique identifier (UUID) for the Service in
the UUID4 format.
state: StateOutput only. Service state.
Implementations§
Source§impl Service
impl Service
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_description<T: Into<String>>(self, v: T) -> Self
pub fn set_description<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_service_reference<T>(self, v: T) -> Selfwhere
T: Into<ServiceReference>,
pub fn set_service_reference<T>(self, v: T) -> Selfwhere
T: Into<ServiceReference>,
Sets the value of service_reference.
§Example
use google_cloud_apphub_v1::model::ServiceReference;
let x = Service::new().set_service_reference(ServiceReference::default()/* use setters */);Sourcepub fn set_or_clear_service_reference<T>(self, v: Option<T>) -> Selfwhere
T: Into<ServiceReference>,
pub fn set_or_clear_service_reference<T>(self, v: Option<T>) -> Selfwhere
T: Into<ServiceReference>,
Sets or clears the value of service_reference.
§Example
use google_cloud_apphub_v1::model::ServiceReference;
let x = Service::new().set_or_clear_service_reference(Some(ServiceReference::default()/* use setters */));
let x = Service::new().set_or_clear_service_reference(None::<ServiceReference>);Sourcepub fn set_service_properties<T>(self, v: T) -> Selfwhere
T: Into<ServiceProperties>,
pub fn set_service_properties<T>(self, v: T) -> Selfwhere
T: Into<ServiceProperties>,
Sets the value of service_properties.
§Example
use google_cloud_apphub_v1::model::ServiceProperties;
let x = Service::new().set_service_properties(ServiceProperties::default()/* use setters */);Sourcepub fn set_or_clear_service_properties<T>(self, v: Option<T>) -> Selfwhere
T: Into<ServiceProperties>,
pub fn set_or_clear_service_properties<T>(self, v: Option<T>) -> Selfwhere
T: Into<ServiceProperties>,
Sets or clears the value of service_properties.
§Example
use google_cloud_apphub_v1::model::ServiceProperties;
let x = Service::new().set_or_clear_service_properties(Some(ServiceProperties::default()/* use setters */));
let x = Service::new().set_or_clear_service_properties(None::<ServiceProperties>);Sourcepub fn set_attributes<T>(self, v: T) -> Selfwhere
T: Into<Attributes>,
pub fn set_attributes<T>(self, v: T) -> Selfwhere
T: Into<Attributes>,
Sets the value of attributes.
§Example
use google_cloud_apphub_v1::model::Attributes;
let x = Service::new().set_attributes(Attributes::default()/* use setters */);Sourcepub fn set_or_clear_attributes<T>(self, v: Option<T>) -> Selfwhere
T: Into<Attributes>,
pub fn set_or_clear_attributes<T>(self, v: Option<T>) -> Selfwhere
T: Into<Attributes>,
Sets or clears the value of attributes.
§Example
use google_cloud_apphub_v1::model::Attributes;
let x = Service::new().set_or_clear_attributes(Some(Attributes::default()/* use setters */));
let x = Service::new().set_or_clear_attributes(None::<Attributes>);Sourcepub fn set_discovered_service<T: Into<String>>(self, v: T) -> Self
pub fn set_discovered_service<T: Into<String>>(self, v: T) -> Self
Sets the value of discovered_service.
§Example
let x = Service::new().set_discovered_service(format!("projects/{project_id}/locations/{location_id}"));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 = Service::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 = Service::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
let x = Service::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 = Service::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 = Service::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
let x = Service::new().set_or_clear_update_time(None::<Timestamp>);Trait Implementations§
impl StructuralPartialEq for Service
Auto Trait Implementations§
impl Freeze for Service
impl RefUnwindSafe for Service
impl Send for Service
impl Sync for Service
impl Unpin for Service
impl UnsafeUnpin for Service
impl UnwindSafe for Service
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