Class License.Builder (1.74.0)

public static final class License.Builder extends GeneratedMessageV3.Builder<License.Builder> implements LicenseOrBuilder

Represents a License resource. A License represents billing and aggregate usage data for public and marketplace images. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images.

Protobuf type google.cloud.compute.v1.License

Implements

LicenseOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addAllAllowedReplacementLicenses(Iterable<String> values)

public License.Builder addAllAllowedReplacementLicenses(Iterable<String> values)

Specifies licenseCodes of licenses that can replace this license. Note: such replacements are allowed even if removable_from_disk is false.

repeated string allowed_replacement_licenses = 195677718;

Parameter
Name Description
values Iterable<String>

The allowedReplacementLicenses to add.

Returns
Type Description
License.Builder

This builder for chaining.

addAllIncompatibleLicenses(Iterable<String> values)

public License.Builder addAllIncompatibleLicenses(Iterable<String> values)

Specifies licenseCodes of licenses that are incompatible with this license. If a license is incompatible with this license, it cannot be attached to the same disk or image.

repeated string incompatible_licenses = 334239768;

Parameter
Name Description
values Iterable<String>

The incompatibleLicenses to add.

Returns
Type Description
License.Builder

This builder for chaining.

addAllRequiredCoattachedLicenses(Iterable<String> values)

public License.Builder addAllRequiredCoattachedLicenses(Iterable<String> values)

Specifies the set of permissible coattached licenseCodes of licenses that satisfy the coattachment requirement of this license. At least one license from the set must be attached to the same disk or image as this license.

repeated string required_coattached_licenses = 129195265;

Parameter
Name Description
values Iterable<String>

The requiredCoattachedLicenses to add.

Returns
Type Description
License.Builder

This builder for chaining.

addAllowedReplacementLicenses(String value)

public License.Builder addAllowedReplacementLicenses(String value)

Specifies licenseCodes of licenses that can replace this license. Note: such replacements are allowed even if removable_from_disk is false.

repeated string allowed_replacement_licenses = 195677718;

Parameter
Name Description
value String

The allowedReplacementLicenses to add.

Returns
Type Description
License.Builder

This builder for chaining.

addAllowedReplacementLicensesBytes(ByteString value)

public License.Builder addAllowedReplacementLicensesBytes(ByteString value)

Specifies licenseCodes of licenses that can replace this license. Note: such replacements are allowed even if removable_from_disk is false.

repeated string allowed_replacement_licenses = 195677718;

Parameter
Name Description
value ByteString

The bytes of the allowedReplacementLicenses to add.

Returns
Type Description
License.Builder

This builder for chaining.

addIncompatibleLicenses(String value)

public License.Builder addIncompatibleLicenses(String value)

Specifies licenseCodes of licenses that are incompatible with this license. If a license is incompatible with this license, it cannot be attached to the same disk or image.

repeated string incompatible_licenses = 334239768;

Parameter
Name Description
value String

The incompatibleLicenses to add.

Returns
Type Description
License.Builder

This builder for chaining.

addIncompatibleLicensesBytes(ByteString value)

public License.Builder addIncompatibleLicensesBytes(ByteString value)

Specifies licenseCodes of licenses that are incompatible with this license. If a license is incompatible with this license, it cannot be attached to the same disk or image.

repeated string incompatible_licenses = 334239768;

Parameter
Name Description
value ByteString

The bytes of the incompatibleLicenses to add.

Returns
Type Description
License.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public License.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
License.Builder
Overrides

addRequiredCoattachedLicenses(String value)

public License.Builder addRequiredCoattachedLicenses(String value)

Specifies the set of permissible coattached licenseCodes of licenses that satisfy the coattachment requirement of this license. At least one license from the set must be attached to the same disk or image as this license.

repeated string required_coattached_licenses = 129195265;

Parameter
Name Description
value String

The requiredCoattachedLicenses to add.

Returns
Type Description
License.Builder

This builder for chaining.

addRequiredCoattachedLicensesBytes(ByteString value)

public License.Builder addRequiredCoattachedLicensesBytes(ByteString value)

Specifies the set of permissible coattached licenseCodes of licenses that satisfy the coattachment requirement of this license. At least one license from the set must be attached to the same disk or image as this license.

repeated string required_coattached_licenses = 129195265;

Parameter
Name Description
value ByteString

The bytes of the requiredCoattachedLicenses to add.

Returns
Type Description
License.Builder

This builder for chaining.

build()

public License build()
Returns
Type Description
License

buildPartial()

public License buildPartial()
Returns
Type Description
License

clear()

public License.Builder clear()
Returns
Type Description
License.Builder
Overrides

clearAllowedReplacementLicenses()

public License.Builder clearAllowedReplacementLicenses()

Specifies licenseCodes of licenses that can replace this license. Note: such replacements are allowed even if removable_from_disk is false.

repeated string allowed_replacement_licenses = 195677718;

Returns
Type Description
License.Builder

This builder for chaining.

clearAppendableToDisk()

public License.Builder clearAppendableToDisk()

If true, this license can be appended to an existing disk's set of licenses.

optional bool appendable_to_disk = 16959254;

Returns
Type Description
License.Builder

This builder for chaining.

clearChargesUseFee()

public License.Builder clearChargesUseFee()

[Output Only] Deprecated. This field no longer reflects whether a license charges a usage fee.

optional bool charges_use_fee = 372412622;

Returns
Type Description
License.Builder

This builder for chaining.

clearCreationTimestamp()

public License.Builder clearCreationTimestamp()

[Output Only] Creation timestamp in RFC3339 text format.

optional string creation_timestamp = 30525366;

Returns
Type Description
License.Builder

This builder for chaining.

clearDescription()

public License.Builder clearDescription()

An optional textual description of the resource; provided by the client when the resource is created.

optional string description = 422937596;

Returns
Type Description
License.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public License.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
License.Builder
Overrides

clearId()

public License.Builder clearId()

[Output Only] The unique identifier for the resource. This identifier is defined by the server.

optional uint64 id = 3355;

Returns
Type Description
License.Builder

This builder for chaining.

clearIncompatibleLicenses()

public License.Builder clearIncompatibleLicenses()

Specifies licenseCodes of licenses that are incompatible with this license. If a license is incompatible with this license, it cannot be attached to the same disk or image.

repeated string incompatible_licenses = 334239768;

Returns
Type Description
License.Builder

This builder for chaining.

clearKind()

public License.Builder clearKind()

[Output Only] Type of resource. Always compute#license for licenses.

optional string kind = 3292052;

Returns
Type Description
License.Builder

This builder for chaining.

clearLicenseCode()

public License.Builder clearLicenseCode()

[Output Only] The unique code used to attach this license to images, snapshots, and disks.

optional uint64 license_code = 1467179;

Returns
Type Description
License.Builder

This builder for chaining.

clearMinimumRetention()

public License.Builder clearMinimumRetention()

If set, this license will be unable to be removed or replaced once attached to a disk until the minimum_retention period has passed.

optional .google.cloud.compute.v1.Duration minimum_retention = 155398189;

Returns
Type Description
License.Builder

clearMultiTenantOnly()

public License.Builder clearMultiTenantOnly()

If true, this license can only be used on VMs on multi tenant nodes.

optional bool multi_tenant_only = 274395163;

Returns
Type Description
License.Builder

This builder for chaining.

clearName()

public License.Builder clearName()

Name of the resource. The name must be 1-63 characters long and comply with RFC1035.

optional string name = 3373707;

Returns
Type Description
License.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public License.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
License.Builder
Overrides

clearOsLicense()

public License.Builder clearOsLicense()

If true, indicates this is an OS license. Only one OS license can be attached to a disk or image at a time.

optional bool os_license = 487986406;

Returns
Type Description
License.Builder

This builder for chaining.

clearRemovableFromDisk()

public License.Builder clearRemovableFromDisk()

If true, this license can be removed from a disk's set of licenses, with no replacement license needed.

optional bool removable_from_disk = 25854638;

Returns
Type Description
License.Builder

This builder for chaining.

clearRequiredCoattachedLicenses()

public License.Builder clearRequiredCoattachedLicenses()

Specifies the set of permissible coattached licenseCodes of licenses that satisfy the coattachment requirement of this license. At least one license from the set must be attached to the same disk or image as this license.

repeated string required_coattached_licenses = 129195265;

Returns
Type Description
License.Builder

This builder for chaining.

clearResourceRequirements()

public License.Builder clearResourceRequirements()

[Input Only] Deprecated.

optional .google.cloud.compute.v1.LicenseResourceRequirements resource_requirements = 214292769;

Returns
Type Description
License.Builder
public License.Builder clearSelfLink()

[Output Only] Server-defined URL for the resource.

optional string self_link = 456214797;

Returns
Type Description
License.Builder

This builder for chaining.

clearSelfLinkWithId()

public License.Builder clearSelfLinkWithId()

[Output Only] Server-defined URL for this resource with the resource id.

optional string self_link_with_id = 44520962;

Returns
Type Description
License.Builder

This builder for chaining.

clearSoleTenantOnly()

public License.Builder clearSoleTenantOnly()

If true, this license can only be used on VMs on sole tenant nodes.

optional bool sole_tenant_only = 427525559;

Returns
Type Description
License.Builder

This builder for chaining.

clearTransferable()

public License.Builder clearTransferable()

If false, licenses will not be copied from the source resource when creating an image from a disk, disk from snapshot, or snapshot from disk.

optional bool transferable = 4349893;

Returns
Type Description
License.Builder

This builder for chaining.

clearUpdateTimestamp()

public License.Builder clearUpdateTimestamp()

[Output Only] Last update timestamp in RFC3339 text format.

optional string update_timestamp = 120894752;

Returns
Type Description
License.Builder

This builder for chaining.

clone()

public License.Builder clone()
Returns
Type Description
License.Builder
Overrides

getAllowedReplacementLicenses(int index)

public String getAllowedReplacementLicenses(int index)

Specifies licenseCodes of licenses that can replace this license. Note: such replacements are allowed even if removable_from_disk is false.

repeated string allowed_replacement_licenses = 195677718;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The allowedReplacementLicenses at the given index.

getAllowedReplacementLicensesBytes(int index)

public ByteString getAllowedReplacementLicensesBytes(int index)

Specifies licenseCodes of licenses that can replace this license. Note: such replacements are allowed even if removable_from_disk is false.

repeated string allowed_replacement_licenses = 195677718;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the allowedReplacementLicenses at the given index.

getAllowedReplacementLicensesCount()

public int getAllowedReplacementLicensesCount()

Specifies licenseCodes of licenses that can replace this license. Note: such replacements are allowed even if removable_from_disk is false.

repeated string allowed_replacement_licenses = 195677718;

Returns
Type Description
int

The count of allowedReplacementLicenses.

getAllowedReplacementLicensesList()

public ProtocolStringList getAllowedReplacementLicensesList()

Specifies licenseCodes of licenses that can replace this license. Note: such replacements are allowed even if removable_from_disk is false.

repeated string allowed_replacement_licenses = 195677718;

Returns
Type Description
ProtocolStringList

A list containing the allowedReplacementLicenses.

getAppendableToDisk()

public boolean getAppendableToDisk()

If true, this license can be appended to an existing disk's set of licenses.

optional bool appendable_to_disk = 16959254;

Returns
Type Description
boolean

The appendableToDisk.

getChargesUseFee()

public boolean getChargesUseFee()

[Output Only] Deprecated. This field no longer reflects whether a license charges a usage fee.

optional bool charges_use_fee = 372412622;

Returns
Type Description
boolean

The chargesUseFee.

getCreationTimestamp()

public String getCreationTimestamp()

[Output Only] Creation timestamp in RFC3339 text format.

optional string creation_timestamp = 30525366;

Returns
Type Description
String

The creationTimestamp.

getCreationTimestampBytes()

public ByteString getCreationTimestampBytes()

[Output Only] Creation timestamp in RFC3339 text format.

optional string creation_timestamp = 30525366;

Returns
Type Description
ByteString

The bytes for creationTimestamp.

getDefaultInstanceForType()

public License getDefaultInstanceForType()
Returns
Type Description
License

getDescription()

public String getDescription()

An optional textual description of the resource; provided by the client when the resource is created.

optional string description = 422937596;

Returns
Type Description
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

An optional textual description of the resource; provided by the client when the resource is created.

optional string description = 422937596;

Returns
Type Description
ByteString

The bytes for description.

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getId()

public long getId()

[Output Only] The unique identifier for the resource. This identifier is defined by the server.

optional uint64 id = 3355;

Returns
Type Description
long

The id.

getIncompatibleLicenses(int index)

public String getIncompatibleLicenses(int index)

Specifies licenseCodes of licenses that are incompatible with this license. If a license is incompatible with this license, it cannot be attached to the same disk or image.

repeated string incompatible_licenses = 334239768;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The incompatibleLicenses at the given index.

getIncompatibleLicensesBytes(int index)

public ByteString getIncompatibleLicensesBytes(int index)

Specifies licenseCodes of licenses that are incompatible with this license. If a license is incompatible with this license, it cannot be attached to the same disk or image.

repeated string incompatible_licenses = 334239768;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the incompatibleLicenses at the given index.

getIncompatibleLicensesCount()

public int getIncompatibleLicensesCount()

Specifies licenseCodes of licenses that are incompatible with this license. If a license is incompatible with this license, it cannot be attached to the same disk or image.

repeated string incompatible_licenses = 334239768;

Returns
Type Description
int

The count of incompatibleLicenses.

getIncompatibleLicensesList()

public ProtocolStringList getIncompatibleLicensesList()

Specifies licenseCodes of licenses that are incompatible with this license. If a license is incompatible with this license, it cannot be attached to the same disk or image.

repeated string incompatible_licenses = 334239768;

Returns
Type Description
ProtocolStringList

A list containing the incompatibleLicenses.

getKind()

public String getKind()

[Output Only] Type of resource. Always compute#license for licenses.

optional string kind = 3292052;

Returns
Type Description
String

The kind.

getKindBytes()

public ByteString getKindBytes()

[Output Only] Type of resource. Always compute#license for licenses.

optional string kind = 3292052;

Returns
Type Description
ByteString

The bytes for kind.

getLicenseCode()

public long getLicenseCode()

[Output Only] The unique code used to attach this license to images, snapshots, and disks.

optional uint64 license_code = 1467179;

Returns
Type Description
long

The licenseCode.

getMinimumRetention()

public Duration getMinimumRetention()

If set, this license will be unable to be removed or replaced once attached to a disk until the minimum_retention period has passed.

optional .google.cloud.compute.v1.Duration minimum_retention = 155398189;

Returns
Type Description
Duration

The minimumRetention.

getMinimumRetentionBuilder()

public Duration.Builder getMinimumRetentionBuilder()

If set, this license will be unable to be removed or replaced once attached to a disk until the minimum_retention period has passed.

optional .google.cloud.compute.v1.Duration minimum_retention = 155398189;

Returns
Type Description
Duration.Builder

getMinimumRetentionOrBuilder()

public DurationOrBuilder getMinimumRetentionOrBuilder()

If set, this license will be unable to be removed or replaced once attached to a disk until the minimum_retention period has passed.

optional .google.cloud.compute.v1.Duration minimum_retention = 155398189;

Returns
Type Description
DurationOrBuilder

getMultiTenantOnly()

public boolean getMultiTenantOnly()

If true, this license can only be used on VMs on multi tenant nodes.

optional bool multi_tenant_only = 274395163;

Returns
Type Description
boolean

The multiTenantOnly.

getName()

public String getName()

Name of the resource. The name must be 1-63 characters long and comply with RFC1035.

optional string name = 3373707;

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Name of the resource. The name must be 1-63 characters long and comply with RFC1035.

optional string name = 3373707;

Returns
Type Description
ByteString

The bytes for name.

getOsLicense()

public boolean getOsLicense()

If true, indicates this is an OS license. Only one OS license can be attached to a disk or image at a time.

optional bool os_license = 487986406;

Returns
Type Description
boolean

The osLicense.

getRemovableFromDisk()

public boolean getRemovableFromDisk()

If true, this license can be removed from a disk's set of licenses, with no replacement license needed.

optional bool removable_from_disk = 25854638;

Returns
Type Description
boolean

The removableFromDisk.

getRequiredCoattachedLicenses(int index)

public String getRequiredCoattachedLicenses(int index)

Specifies the set of permissible coattached licenseCodes of licenses that satisfy the coattachment requirement of this license. At least one license from the set must be attached to the same disk or image as this license.

repeated string required_coattached_licenses = 129195265;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The requiredCoattachedLicenses at the given index.

getRequiredCoattachedLicensesBytes(int index)

public ByteString getRequiredCoattachedLicensesBytes(int index)

Specifies the set of permissible coattached licenseCodes of licenses that satisfy the coattachment requirement of this license. At least one license from the set must be attached to the same disk or image as this license.

repeated string required_coattached_licenses = 129195265;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the requiredCoattachedLicenses at the given index.

getRequiredCoattachedLicensesCount()

public int getRequiredCoattachedLicensesCount()

Specifies the set of permissible coattached licenseCodes of licenses that satisfy the coattachment requirement of this license. At least one license from the set must be attached to the same disk or image as this license.

repeated string required_coattached_licenses = 129195265;

Returns
Type Description
int

The count of requiredCoattachedLicenses.

getRequiredCoattachedLicensesList()

public ProtocolStringList getRequiredCoattachedLicensesList()

Specifies the set of permissible coattached licenseCodes of licenses that satisfy the coattachment requirement of this license. At least one license from the set must be attached to the same disk or image as this license.

repeated string required_coattached_licenses = 129195265;

Returns
Type Description
ProtocolStringList

A list containing the requiredCoattachedLicenses.

getResourceRequirements()

public LicenseResourceRequirements getResourceRequirements()

[Input Only] Deprecated.

optional .google.cloud.compute.v1.LicenseResourceRequirements resource_requirements = 214292769;

Returns
Type Description
LicenseResourceRequirements

The resourceRequirements.

getResourceRequirementsBuilder()

public LicenseResourceRequirements.Builder getResourceRequirementsBuilder()

[Input Only] Deprecated.

optional .google.cloud.compute.v1.LicenseResourceRequirements resource_requirements = 214292769;

Returns
Type Description
LicenseResourceRequirements.Builder

getResourceRequirementsOrBuilder()

public LicenseResourceRequirementsOrBuilder getResourceRequirementsOrBuilder()

[Input Only] Deprecated.

optional .google.cloud.compute.v1.LicenseResourceRequirements resource_requirements = 214292769;

Returns
Type Description
LicenseResourceRequirementsOrBuilder
public String getSelfLink()

[Output Only] Server-defined URL for the resource.

optional string self_link = 456214797;

Returns
Type Description
String

The selfLink.

getSelfLinkBytes()

public ByteString getSelfLinkBytes()

[Output Only] Server-defined URL for the resource.

optional string self_link = 456214797;

Returns
Type Description
ByteString

The bytes for selfLink.

getSelfLinkWithId()

public String getSelfLinkWithId()

[Output Only] Server-defined URL for this resource with the resource id.

optional string self_link_with_id = 44520962;

Returns
Type Description
String

The selfLinkWithId.

getSelfLinkWithIdBytes()

public ByteString getSelfLinkWithIdBytes()

[Output Only] Server-defined URL for this resource with the resource id.

optional string self_link_with_id = 44520962;

Returns
Type Description
ByteString

The bytes for selfLinkWithId.

getSoleTenantOnly()

public boolean getSoleTenantOnly()

If true, this license can only be used on VMs on sole tenant nodes.

optional bool sole_tenant_only = 427525559;

Returns
Type Description
boolean

The soleTenantOnly.

getTransferable()

public boolean getTransferable()

If false, licenses will not be copied from the source resource when creating an image from a disk, disk from snapshot, or snapshot from disk.

optional bool transferable = 4349893;

Returns
Type Description
boolean

The transferable.

getUpdateTimestamp()

public String getUpdateTimestamp()

[Output Only] Last update timestamp in RFC3339 text format.

optional string update_timestamp = 120894752;

Returns
Type Description
String

The updateTimestamp.

getUpdateTimestampBytes()

public ByteString getUpdateTimestampBytes()

[Output Only] Last update timestamp in RFC3339 text format.

optional string update_timestamp = 120894752;

Returns
Type Description
ByteString

The bytes for updateTimestamp.

hasAppendableToDisk()

public boolean hasAppendableToDisk()

If true, this license can be appended to an existing disk's set of licenses.

optional bool appendable_to_disk = 16959254;

Returns
Type Description
boolean

Whether the appendableToDisk field is set.

hasChargesUseFee()

public boolean hasChargesUseFee()

[Output Only] Deprecated. This field no longer reflects whether a license charges a usage fee.

optional bool charges_use_fee = 372412622;

Returns
Type Description
boolean

Whether the chargesUseFee field is set.

hasCreationTimestamp()

public boolean hasCreationTimestamp()

[Output Only] Creation timestamp in RFC3339 text format.

optional string creation_timestamp = 30525366;

Returns
Type Description
boolean

Whether the creationTimestamp field is set.

hasDescription()

public boolean hasDescription()

An optional textual description of the resource; provided by the client when the resource is created.

optional string description = 422937596;

Returns
Type Description
boolean

Whether the description field is set.

hasId()

public boolean hasId()

[Output Only] The unique identifier for the resource. This identifier is defined by the server.

optional uint64 id = 3355;

Returns
Type Description
boolean

Whether the id field is set.

hasKind()

public boolean hasKind()

[Output Only] Type of resource. Always compute#license for licenses.

optional string kind = 3292052;

Returns
Type Description
boolean

Whether the kind field is set.

hasLicenseCode()

public boolean hasLicenseCode()

[Output Only] The unique code used to attach this license to images, snapshots, and disks.

optional uint64 license_code = 1467179;

Returns
Type Description
boolean

Whether the licenseCode field is set.

hasMinimumRetention()

public boolean hasMinimumRetention()

If set, this license will be unable to be removed or replaced once attached to a disk until the minimum_retention period has passed.

optional .google.cloud.compute.v1.Duration minimum_retention = 155398189;

Returns
Type Description
boolean

Whether the minimumRetention field is set.

hasMultiTenantOnly()

public boolean hasMultiTenantOnly()

If true, this license can only be used on VMs on multi tenant nodes.

optional bool multi_tenant_only = 274395163;

Returns
Type Description
boolean

Whether the multiTenantOnly field is set.

hasName()

public boolean hasName()

Name of the resource. The name must be 1-63 characters long and comply with RFC1035.

optional string name = 3373707;

Returns
Type Description
boolean

Whether the name field is set.

hasOsLicense()

public boolean hasOsLicense()

If true, indicates this is an OS license. Only one OS license can be attached to a disk or image at a time.

optional bool os_license = 487986406;

Returns
Type Description
boolean

Whether the osLicense field is set.

hasRemovableFromDisk()

public boolean hasRemovableFromDisk()

If true, this license can be removed from a disk's set of licenses, with no replacement license needed.

optional bool removable_from_disk = 25854638;

Returns
Type Description
boolean

Whether the removableFromDisk field is set.

hasResourceRequirements()

public boolean hasResourceRequirements()

[Input Only] Deprecated.

optional .google.cloud.compute.v1.LicenseResourceRequirements resource_requirements = 214292769;

Returns
Type Description
boolean

Whether the resourceRequirements field is set.

public boolean hasSelfLink()

[Output Only] Server-defined URL for the resource.

optional string self_link = 456214797;

Returns
Type Description
boolean

Whether the selfLink field is set.

hasSelfLinkWithId()

public boolean hasSelfLinkWithId()

[Output Only] Server-defined URL for this resource with the resource id.

optional string self_link_with_id = 44520962;

Returns
Type Description
boolean

Whether the selfLinkWithId field is set.

hasSoleTenantOnly()

public boolean hasSoleTenantOnly()

If true, this license can only be used on VMs on sole tenant nodes.

optional bool sole_tenant_only = 427525559;

Returns
Type Description
boolean

Whether the soleTenantOnly field is set.

hasTransferable()

public boolean hasTransferable()

If false, licenses will not be copied from the source resource when creating an image from a disk, disk from snapshot, or snapshot from disk.

optional bool transferable = 4349893;

Returns
Type Description
boolean

Whether the transferable field is set.

hasUpdateTimestamp()

public boolean hasUpdateTimestamp()

[Output Only] Last update timestamp in RFC3339 text format.

optional string update_timestamp = 120894752;

Returns
Type Description
boolean

Whether the updateTimestamp field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(License other)

public License.Builder mergeFrom(License other)
Parameter
Name Description
other License
Returns
Type Description
License.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public License.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
License.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public License.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
License.Builder
Overrides

mergeMinimumRetention(Duration value)

public License.Builder mergeMinimumRetention(Duration value)

If set, this license will be unable to be removed or replaced once attached to a disk until the minimum_retention period has passed.

optional .google.cloud.compute.v1.Duration minimum_retention = 155398189;

Parameter
Name Description
value Duration
Returns
Type Description
License.Builder

mergeResourceRequirements(LicenseResourceRequirements value)

public License.Builder mergeResourceRequirements(LicenseResourceRequirements value)

[Input Only] Deprecated.

optional .google.cloud.compute.v1.LicenseResourceRequirements resource_requirements = 214292769;

Parameter
Name Description
value LicenseResourceRequirements
Returns
Type Description
License.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final License.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
License.Builder
Overrides

setAllowedReplacementLicenses(int index, String value)

public License.Builder setAllowedReplacementLicenses(int index, String value)

Specifies licenseCodes of licenses that can replace this license. Note: such replacements are allowed even if removable_from_disk is false.

repeated string allowed_replacement_licenses = 195677718;

Parameters
Name Description
index int

The index to set the value at.

value String

The allowedReplacementLicenses to set.

Returns
Type Description
License.Builder

This builder for chaining.

setAppendableToDisk(boolean value)

public License.Builder setAppendableToDisk(boolean value)

If true, this license can be appended to an existing disk's set of licenses.

optional bool appendable_to_disk = 16959254;

Parameter
Name Description
value boolean

The appendableToDisk to set.

Returns
Type Description
License.Builder

This builder for chaining.

setChargesUseFee(boolean value)

public License.Builder setChargesUseFee(boolean value)

[Output Only] Deprecated. This field no longer reflects whether a license charges a usage fee.

optional bool charges_use_fee = 372412622;

Parameter
Name Description
value boolean

The chargesUseFee to set.

Returns
Type Description
License.Builder

This builder for chaining.

setCreationTimestamp(String value)

public License.Builder setCreationTimestamp(String value)

[Output Only] Creation timestamp in RFC3339 text format.

optional string creation_timestamp = 30525366;

Parameter
Name Description
value String

The creationTimestamp to set.

Returns
Type Description
License.Builder

This builder for chaining.

setCreationTimestampBytes(ByteString value)

public License.Builder setCreationTimestampBytes(ByteString value)

[Output Only] Creation timestamp in RFC3339 text format.

optional string creation_timestamp = 30525366;

Parameter
Name Description
value ByteString

The bytes for creationTimestamp to set.

Returns
Type Description
License.Builder

This builder for chaining.

setDescription(String value)

public License.Builder setDescription(String value)

An optional textual description of the resource; provided by the client when the resource is created.

optional string description = 422937596;

Parameter
Name Description
value String

The description to set.

Returns
Type Description
License.Builder

This builder for chaining.

setDescriptionBytes(ByteString value)

public License.Builder setDescriptionBytes(ByteString value)

An optional textual description of the resource; provided by the client when the resource is created.

optional string description = 422937596;

Parameter
Name Description
value ByteString

The bytes for description to set.

Returns
Type Description
License.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public License.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
License.Builder
Overrides

setId(long value)

public License.Builder setId(long value)

[Output Only] The unique identifier for the resource. This identifier is defined by the server.

optional uint64 id = 3355;

Parameter
Name Description
value long

The id to set.

Returns
Type Description
License.Builder

This builder for chaining.

setIncompatibleLicenses(int index, String value)

public License.Builder setIncompatibleLicenses(int index, String value)

Specifies licenseCodes of licenses that are incompatible with this license. If a license is incompatible with this license, it cannot be attached to the same disk or image.

repeated string incompatible_licenses = 334239768;

Parameters
Name Description
index int

The index to set the value at.

value String

The incompatibleLicenses to set.

Returns
Type Description
License.Builder

This builder for chaining.

setKind(String value)

public License.Builder setKind(String value)

[Output Only] Type of resource. Always compute#license for licenses.

optional string kind = 3292052;

Parameter
Name Description
value String

The kind to set.

Returns
Type Description
License.Builder

This builder for chaining.

setKindBytes(ByteString value)

public License.Builder setKindBytes(ByteString value)

[Output Only] Type of resource. Always compute#license for licenses.

optional string kind = 3292052;

Parameter
Name Description
value ByteString

The bytes for kind to set.

Returns
Type Description
License.Builder

This builder for chaining.

setLicenseCode(long value)

public License.Builder setLicenseCode(long value)

[Output Only] The unique code used to attach this license to images, snapshots, and disks.

optional uint64 license_code = 1467179;

Parameter
Name Description
value long

The licenseCode to set.

Returns
Type Description
License.Builder

This builder for chaining.

setMinimumRetention(Duration value)

public License.Builder setMinimumRetention(Duration value)

If set, this license will be unable to be removed or replaced once attached to a disk until the minimum_retention period has passed.

optional .google.cloud.compute.v1.Duration minimum_retention = 155398189;

Parameter
Name Description
value Duration
Returns
Type Description
License.Builder

setMinimumRetention(Duration.Builder builderForValue)

public License.Builder setMinimumRetention(Duration.Builder builderForValue)

If set, this license will be unable to be removed or replaced once attached to a disk until the minimum_retention period has passed.

optional .google.cloud.compute.v1.Duration minimum_retention = 155398189;

Parameter
Name Description
builderForValue Duration.Builder
Returns
Type Description
License.Builder

setMultiTenantOnly(boolean value)

public License.Builder setMultiTenantOnly(boolean value)

If true, this license can only be used on VMs on multi tenant nodes.

optional bool multi_tenant_only = 274395163;

Parameter
Name Description
value boolean

The multiTenantOnly to set.

Returns
Type Description
License.Builder

This builder for chaining.

setName(String value)

public License.Builder setName(String value)

Name of the resource. The name must be 1-63 characters long and comply with RFC1035.

optional string name = 3373707;

Parameter
Name Description
value String

The name to set.

Returns
Type Description
License.Builder

This builder for chaining.

setNameBytes(ByteString value)

public License.Builder setNameBytes(ByteString value)

Name of the resource. The name must be 1-63 characters long and comply with RFC1035.

optional string name = 3373707;

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
License.Builder

This builder for chaining.

setOsLicense(boolean value)

public License.Builder setOsLicense(boolean value)

If true, indicates this is an OS license. Only one OS license can be attached to a disk or image at a time.

optional bool os_license = 487986406;

Parameter
Name Description
value boolean

The osLicense to set.

Returns
Type Description
License.Builder

This builder for chaining.

setRemovableFromDisk(boolean value)

public License.Builder setRemovableFromDisk(boolean value)

If true, this license can be removed from a disk's set of licenses, with no replacement license needed.

optional bool removable_from_disk = 25854638;

Parameter
Name Description
value boolean

The removableFromDisk to set.

Returns
Type Description
License.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public License.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
License.Builder
Overrides

setRequiredCoattachedLicenses(int index, String value)

public License.Builder setRequiredCoattachedLicenses(int index, String value)

Specifies the set of permissible coattached licenseCodes of licenses that satisfy the coattachment requirement of this license. At least one license from the set must be attached to the same disk or image as this license.

repeated string required_coattached_licenses = 129195265;

Parameters
Name Description
index int

The index to set the value at.

value String

The requiredCoattachedLicenses to set.

Returns
Type Description
License.Builder

This builder for chaining.

setResourceRequirements(LicenseResourceRequirements value)

public License.Builder setResourceRequirements(LicenseResourceRequirements value)

[Input Only] Deprecated.

optional .google.cloud.compute.v1.LicenseResourceRequirements resource_requirements = 214292769;

Parameter
Name Description
value LicenseResourceRequirements
Returns
Type Description
License.Builder

setResourceRequirements(LicenseResourceRequirements.Builder builderForValue)

public License.Builder setResourceRequirements(LicenseResourceRequirements.Builder builderForValue)

[Input Only] Deprecated.

optional .google.cloud.compute.v1.LicenseResourceRequirements resource_requirements = 214292769;

Parameter
Name Description
builderForValue LicenseResourceRequirements.Builder
Returns
Type Description
License.Builder
public License.Builder setSelfLink(String value)

[Output Only] Server-defined URL for the resource.

optional string self_link = 456214797;

Parameter
Name Description
value String

The selfLink to set.

Returns
Type Description
License.Builder

This builder for chaining.

setSelfLinkBytes(ByteString value)

public License.Builder setSelfLinkBytes(ByteString value)

[Output Only] Server-defined URL for the resource.

optional string self_link = 456214797;

Parameter
Name Description
value ByteString

The bytes for selfLink to set.

Returns
Type Description
License.Builder

This builder for chaining.

setSelfLinkWithId(String value)

public License.Builder setSelfLinkWithId(String value)

[Output Only] Server-defined URL for this resource with the resource id.

optional string self_link_with_id = 44520962;

Parameter
Name Description
value String

The selfLinkWithId to set.

Returns
Type Description
License.Builder

This builder for chaining.

setSelfLinkWithIdBytes(ByteString value)

public License.Builder setSelfLinkWithIdBytes(ByteString value)

[Output Only] Server-defined URL for this resource with the resource id.

optional string self_link_with_id = 44520962;

Parameter
Name Description
value ByteString

The bytes for selfLinkWithId to set.

Returns
Type Description
License.Builder

This builder for chaining.

setSoleTenantOnly(boolean value)

public License.Builder setSoleTenantOnly(boolean value)

If true, this license can only be used on VMs on sole tenant nodes.

optional bool sole_tenant_only = 427525559;

Parameter
Name Description
value boolean

The soleTenantOnly to set.

Returns
Type Description
License.Builder

This builder for chaining.

setTransferable(boolean value)

public License.Builder setTransferable(boolean value)

If false, licenses will not be copied from the source resource when creating an image from a disk, disk from snapshot, or snapshot from disk.

optional bool transferable = 4349893;

Parameter
Name Description
value boolean

The transferable to set.

Returns
Type Description
License.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final License.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
License.Builder
Overrides

setUpdateTimestamp(String value)

public License.Builder setUpdateTimestamp(String value)

[Output Only] Last update timestamp in RFC3339 text format.

optional string update_timestamp = 120894752;

Parameter
Name Description
value String

The updateTimestamp to set.

Returns
Type Description
License.Builder

This builder for chaining.

setUpdateTimestampBytes(ByteString value)

public License.Builder setUpdateTimestampBytes(ByteString value)

[Output Only] Last update timestamp in RFC3339 text format.

optional string update_timestamp = 120894752;

Parameter
Name Description
value ByteString

The bytes for updateTimestamp to set.

Returns
Type Description
License.Builder

This builder for chaining.