Class License.Builder (1.38.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
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public License.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
License.Builder
Overrides

build()

public License build()
Returns
TypeDescription
License

buildPartial()

public License buildPartial()
Returns
TypeDescription
License

clear()

public License.Builder clear()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
License.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public License.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
License.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public License.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
License.Builder
Overrides

clearResourceRequirements()

public License.Builder clearResourceRequirements()

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

Returns
TypeDescription
License.Builder
public License.Builder clearSelfLink()

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

optional string self_link = 456214797;

Returns
TypeDescription
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
TypeDescription
License.Builder

This builder for chaining.

clone()

public License.Builder clone()
Returns
TypeDescription
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
TypeDescription
boolean

The chargesUseFee.

getCreationTimestamp()

public String getCreationTimestamp()

[Output Only] Creation timestamp in RFC3339 text format.

optional string creation_timestamp = 30525366;

Returns
TypeDescription
String

The creationTimestamp.

getCreationTimestampBytes()

public ByteString getCreationTimestampBytes()

[Output Only] Creation timestamp in RFC3339 text format.

optional string creation_timestamp = 30525366;

Returns
TypeDescription
ByteString

The bytes for creationTimestamp.

getDefaultInstanceForType()

public License getDefaultInstanceForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for description.

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
TypeDescription
long

The id.

getKind()

public String getKind()

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

optional string kind = 3292052;

Returns
TypeDescription
String

The kind.

getKindBytes()

public ByteString getKindBytes()

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

optional string kind = 3292052;

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for name.

getResourceRequirements()

public LicenseResourceRequirements getResourceRequirements()

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

Returns
TypeDescription
LicenseResourceRequirements

The resourceRequirements.

getResourceRequirementsBuilder()

public LicenseResourceRequirements.Builder getResourceRequirementsBuilder()

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

Returns
TypeDescription
LicenseResourceRequirements.Builder

getResourceRequirementsOrBuilder()

public LicenseResourceRequirementsOrBuilder getResourceRequirementsOrBuilder()

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

Returns
TypeDescription
LicenseResourceRequirementsOrBuilder
public String getSelfLink()

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

optional string self_link = 456214797;

Returns
TypeDescription
String

The selfLink.

getSelfLinkBytes()

public ByteString getSelfLinkBytes()

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

optional string self_link = 456214797;

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

Whether the name field is set.

hasResourceRequirements()

public boolean hasResourceRequirements()

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

Returns
TypeDescription
boolean

Whether the resourceRequirements field is set.

public boolean hasSelfLink()

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

optional string self_link = 456214797;

Returns
TypeDescription
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
TypeDescription
boolean

Whether the transferable field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(License other)

public License.Builder mergeFrom(License other)
Parameter
NameDescription
otherLicense
Returns
TypeDescription
License.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public License.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
License.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public License.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
License.Builder
Overrides

mergeResourceRequirements(LicenseResourceRequirements value)

public License.Builder mergeResourceRequirements(LicenseResourceRequirements value)

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

Parameter
NameDescription
valueLicenseResourceRequirements
Returns
TypeDescription
License.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final License.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueboolean

The chargesUseFee to set.

Returns
TypeDescription
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
NameDescription
valueString

The creationTimestamp to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for creationTimestamp to set.

Returns
TypeDescription
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
NameDescription
valueString

The description to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for description to set.

Returns
TypeDescription
License.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public License.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valuelong

The id to set.

Returns
TypeDescription
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
NameDescription
valueString

The kind to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for kind to set.

Returns
TypeDescription
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
NameDescription
valuelong

The licenseCode to set.

Returns
TypeDescription
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
NameDescription
valueString

The name to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
License.Builder
Overrides

setResourceRequirements(LicenseResourceRequirements value)

public License.Builder setResourceRequirements(LicenseResourceRequirements value)

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

Parameter
NameDescription
valueLicenseResourceRequirements
Returns
TypeDescription
License.Builder

setResourceRequirements(LicenseResourceRequirements.Builder builderForValue)

public License.Builder setResourceRequirements(LicenseResourceRequirements.Builder builderForValue)

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

Parameter
NameDescription
builderForValueLicenseResourceRequirements.Builder
Returns
TypeDescription
License.Builder
public License.Builder setSelfLink(String value)

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

optional string self_link = 456214797;

Parameter
NameDescription
valueString

The selfLink to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for selfLink to set.

Returns
TypeDescription
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
NameDescription
valueboolean

The transferable to set.

Returns
TypeDescription
License.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final License.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
License.Builder
Overrides