#[non_exhaustive]pub struct Service {
pub name: String,
pub parent: String,
pub config: Option<ServiceConfig>,
pub state: State,
/* private fields */
}
Expand description
A service that is available for use by the consumer.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.name: String
The resource name of the consumer and service.
A valid name would be:
- projects/123/services/serviceusage.googleapis.com
parent: String
The resource name of the consumer.
A valid name would be:
- projects/123
config: Option<ServiceConfig>
The service configuration of the available service.
Some fields may be filtered out of the configuration in responses to
the ListServices
method. These fields are present only in responses to
the GetService
method.
state: State
Whether or not the service has been enabled for use by the consumer.
Implementations§
Source§impl Service
impl Service
pub fn new() -> Self
Sourcepub fn set_parent<T: Into<String>>(self, v: T) -> Self
pub fn set_parent<T: Into<String>>(self, v: T) -> Self
Sets the value of parent.
Sourcepub fn set_config<T>(self, v: T) -> Selfwhere
T: Into<ServiceConfig>,
pub fn set_config<T>(self, v: T) -> Selfwhere
T: Into<ServiceConfig>,
Sets the value of config.
Sourcepub fn set_or_clear_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<ServiceConfig>,
pub fn set_or_clear_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<ServiceConfig>,
Sets or clears the value of config.
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 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
Mutably borrows from an owned value. Read more