Class License.Builder (1.64.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

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

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

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.

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.

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

clearResourceRequirements()

public License.Builder clearResourceRequirements()

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.

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.

clone()

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

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.

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.

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.

getResourceRequirements()

public LicenseResourceRequirements getResourceRequirements()

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

Returns
Type Description
LicenseResourceRequirements

The resourceRequirements.

getResourceRequirementsBuilder()

public LicenseResourceRequirements.Builder getResourceRequirementsBuilder()

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

Returns
Type Description
LicenseResourceRequirements.Builder

getResourceRequirementsOrBuilder()

public LicenseResourceRequirementsOrBuilder getResourceRequirementsOrBuilder()

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.

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.

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.

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.

hasResourceRequirements()

public boolean hasResourceRequirements()

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.

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.

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

mergeResourceRequirements(LicenseResourceRequirements value)

public License.Builder mergeResourceRequirements(LicenseResourceRequirements value)

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

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.

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.

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.

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

setResourceRequirements(LicenseResourceRequirements value)

public License.Builder setResourceRequirements(LicenseResourceRequirements value)

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)

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.

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