#[non_exhaustive]pub struct CustomTargetType {
pub name: String,
pub custom_target_type_id: String,
pub uid: String,
pub description: String,
pub annotations: HashMap<String, String>,
pub labels: HashMap<String, String>,
pub create_time: Option<Timestamp>,
pub update_time: Option<Timestamp>,
pub etag: String,
pub definition: Option<Definition>,
/* private fields */
}Expand description
A CustomTargetType resource in the Cloud Deploy API.
A CustomTargetType defines a type of custom target that can be referenced
in a Target in order to facilitate deploying to other systems besides the
supported runtimes.
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. Name of the CustomTargetType. Format is
projects/{project}/locations/{location}/customTargetTypes/{customTargetType}.
The customTargetType component must match
[a-z]([a-z0-9-]{0,61}[a-z0-9])?
custom_target_type_id: StringOutput only. Resource id of the CustomTargetType.
uid: StringOutput only. Unique identifier of the CustomTargetType.
description: StringOptional. Description of the CustomTargetType. Max length is 255
characters.
annotations: HashMap<String, String>Optional. User annotations. These attributes can only be set and used by the user, and not by Cloud Deploy. See https://google.aip.dev/128#annotations for more details such as format and size limitations.
labels: HashMap<String, String>Optional. Labels are attributes that can be set and used by both the user and by Cloud Deploy. Labels must meet the following constraints:
- Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes.
- All characters must use UTF-8 encoding, and international characters are allowed.
- Keys must start with a lowercase letter or international character.
- Each resource is limited to a maximum of 64 labels.
Both keys and values are additionally constrained to be <= 128 bytes.
create_time: Option<Timestamp>Output only. Time at which the CustomTargetType was created.
update_time: Option<Timestamp>Output only. Most recent time at which the CustomTargetType was updated.
etag: StringOptional. This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.
definition: Option<Definition>Defines the CustomTargetType renderer and deployer.
Implementations§
Source§impl CustomTargetType
impl CustomTargetType
Sourcepub fn set_custom_target_type_id<T: Into<String>>(self, v: T) -> Self
pub fn set_custom_target_type_id<T: Into<String>>(self, v: T) -> Self
Sets the value of custom_target_type_id.
§Example
let x = CustomTargetType::new().set_custom_target_type_id("example");Sourcepub fn set_description<T: Into<String>>(self, v: T) -> Self
pub fn set_description<T: Into<String>>(self, v: T) -> Self
Sets the value of description.
§Example
let x = CustomTargetType::new().set_description("example");Sourcepub fn set_annotations<T, K, V>(self, v: T) -> Self
pub fn set_annotations<T, K, V>(self, v: T) -> Self
Sets the value of annotations.
§Example
let x = CustomTargetType::new().set_annotations([
("key0", "abc"),
("key1", "xyz"),
]);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_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 = CustomTargetType::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 = CustomTargetType::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
let x = CustomTargetType::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 = CustomTargetType::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 = CustomTargetType::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
let x = CustomTargetType::new().set_or_clear_update_time(None::<Timestamp>);Sourcepub fn set_definition<T: Into<Option<Definition>>>(self, v: T) -> Self
pub fn set_definition<T: Into<Option<Definition>>>(self, v: T) -> Self
Sets the value of definition.
Note that all the setters affecting definition are mutually
exclusive.
§Example
use google_cloud_deploy_v1::model::CustomTargetSkaffoldActions;
let x = CustomTargetType::new().set_definition(Some(
google_cloud_deploy_v1::model::custom_target_type::Definition::CustomActions(CustomTargetSkaffoldActions::default().into())));Sourcepub fn custom_actions(&self) -> Option<&Box<CustomTargetSkaffoldActions>>
pub fn custom_actions(&self) -> Option<&Box<CustomTargetSkaffoldActions>>
The value of definition
if it holds a CustomActions, None if the field is not set or
holds a different branch.
Sourcepub fn set_custom_actions<T: Into<Box<CustomTargetSkaffoldActions>>>(
self,
v: T,
) -> Self
pub fn set_custom_actions<T: Into<Box<CustomTargetSkaffoldActions>>>( self, v: T, ) -> Self
Sets the value of definition
to hold a CustomActions.
Note that all the setters affecting definition are
mutually exclusive.
§Example
use google_cloud_deploy_v1::model::CustomTargetSkaffoldActions;
let x = CustomTargetType::new().set_custom_actions(CustomTargetSkaffoldActions::default()/* use setters */);
assert!(x.custom_actions().is_some());Trait Implementations§
Source§impl Clone for CustomTargetType
impl Clone for CustomTargetType
Source§fn clone(&self) -> CustomTargetType
fn clone(&self) -> CustomTargetType
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 CustomTargetType
impl Debug for CustomTargetType
Source§impl Default for CustomTargetType
impl Default for CustomTargetType
Source§fn default() -> CustomTargetType
fn default() -> CustomTargetType
Source§impl Message for CustomTargetType
impl Message for CustomTargetType
Source§impl PartialEq for CustomTargetType
impl PartialEq for CustomTargetType
impl StructuralPartialEq for CustomTargetType
Auto Trait Implementations§
impl Freeze for CustomTargetType
impl RefUnwindSafe for CustomTargetType
impl Send for CustomTargetType
impl Sync for CustomTargetType
impl Unpin for CustomTargetType
impl UnsafeUnpin for CustomTargetType
impl UnwindSafe for CustomTargetType
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