#[non_exhaustive]pub struct LicenseCode {
pub creation_timestamp: Option<String>,
pub description: Option<String>,
pub id: Option<u64>,
pub kind: Option<String>,
pub license_alias: Vec<LicenseCodeLicenseAlias>,
pub name: Option<String>,
pub self_link: Option<String>,
pub state: Option<State>,
pub transferable: Option<bool>,
/* private fields */
}license-codes only.Expand description
Represents a License Code resource.
A License Code is a unique identifier used to represent alicense resource. Caution This resource is intended for use only by third-party partners who are creatingCloud Marketplace images.
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.creation_timestamp: Option<String>Output only. [Output Only] Creation timestamp inRFC3339 text format.
description: Option<String>Output only. [Output Only] Description of this License Code.
id: Option<u64>Output only. [Output Only] The unique identifier for the resource. This identifier is defined by the server.
kind: Option<String>Output only. [Output Only] Type of resource. Always compute#licenseCode for licenses.
license_alias: Vec<LicenseCodeLicenseAlias>[Output Only] URL and description aliases of Licenses with the same License Code.
name: Option<String>Output only. [Output Only] Name of the resource. The name is 1-20 characters long and must be a valid 64 bit integer.
self_link: Option<String>Output only. [Output Only] Server-defined URL for the resource.
state: Option<State>Output only. [Output Only] Current state of this License Code.
transferable: Option<bool>Output only. [Output Only] If true, the license will remain attached when creating images or snapshots from disks. Otherwise, the license is not transferred.
Implementations§
Source§impl LicenseCode
impl LicenseCode
pub fn new() -> Self
Sourcepub fn set_creation_timestamp<T>(self, v: T) -> Self
pub fn set_creation_timestamp<T>(self, v: T) -> Self
Sets the value of creation_timestamp.
§Example
let x = LicenseCode::new().set_creation_timestamp("example");Sourcepub fn set_or_clear_creation_timestamp<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_creation_timestamp<T>(self, v: Option<T>) -> Self
Sets or clears the value of creation_timestamp.
§Example
let x = LicenseCode::new().set_or_clear_creation_timestamp(Some("example"));
let x = LicenseCode::new().set_or_clear_creation_timestamp(None::<String>);Sourcepub fn set_description<T>(self, v: T) -> Self
pub fn set_description<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_description<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_description<T>(self, v: Option<T>) -> Self
Sets or clears the value of description.
§Example
let x = LicenseCode::new().set_or_clear_description(Some("example"));
let x = LicenseCode::new().set_or_clear_description(None::<String>);Sourcepub fn set_or_clear_id<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_id<T>(self, v: Option<T>) -> Self
Sourcepub fn set_or_clear_kind<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_kind<T>(self, v: Option<T>) -> Self
Sourcepub fn set_license_alias<T, V>(self, v: T) -> Self
pub fn set_license_alias<T, V>(self, v: T) -> Self
Sets the value of license_alias.
§Example
use google_cloud_compute_v1::model::LicenseCodeLicenseAlias;
let x = LicenseCode::new()
.set_license_alias([
LicenseCodeLicenseAlias::default()/* use setters */,
LicenseCodeLicenseAlias::default()/* use (different) setters */,
]);Sourcepub fn set_or_clear_name<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_name<T>(self, v: Option<T>) -> Self
Sourcepub fn set_self_link<T>(self, v: T) -> Self
pub fn set_self_link<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_self_link<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_self_link<T>(self, v: Option<T>) -> Self
Sourcepub fn set_or_clear_state<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_state<T>(self, v: Option<T>) -> Self
Sets or clears the value of state.
§Example
use google_cloud_compute_v1::model::license_code::State;
let x0 = LicenseCode::new().set_or_clear_state(Some(State::Enabled));
let x1 = LicenseCode::new().set_or_clear_state(Some(State::Restricted));
let x2 = LicenseCode::new().set_or_clear_state(Some(State::Unspecified));
let x_none = LicenseCode::new().set_or_clear_state(None::<State>);Sourcepub fn set_transferable<T>(self, v: T) -> Self
pub fn set_transferable<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_transferable<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_transferable<T>(self, v: Option<T>) -> Self
Sets or clears the value of transferable.
§Example
let x = LicenseCode::new().set_or_clear_transferable(Some(false));
let x = LicenseCode::new().set_or_clear_transferable(None::<bool>);Trait Implementations§
Source§impl Clone for LicenseCode
impl Clone for LicenseCode
Source§fn clone(&self) -> LicenseCode
fn clone(&self) -> LicenseCode
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more