Class LicenseCode.Builder (1.23.0)

public static final class LicenseCode.Builder extends GeneratedMessageV3.Builder<LicenseCode.Builder> implements LicenseCodeOrBuilder

Represents a License Code resource. A License Code is a unique identifier used to represent a license resource. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images.

Protobuf type google.cloud.compute.v1.LicenseCode

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addAllLicenseAlias(Iterable<? extends LicenseCodeLicenseAlias> values)

public LicenseCode.Builder addAllLicenseAlias(Iterable<? extends LicenseCodeLicenseAlias> values)

[Output Only] URL and description aliases of Licenses with the same License Code.

repeated .google.cloud.compute.v1.LicenseCodeLicenseAlias license_alias = 43550930;

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.compute.v1.LicenseCodeLicenseAlias>
Returns
TypeDescription
LicenseCode.Builder

addLicenseAlias(LicenseCodeLicenseAlias value)

public LicenseCode.Builder addLicenseAlias(LicenseCodeLicenseAlias value)

[Output Only] URL and description aliases of Licenses with the same License Code.

repeated .google.cloud.compute.v1.LicenseCodeLicenseAlias license_alias = 43550930;

Parameter
NameDescription
valueLicenseCodeLicenseAlias
Returns
TypeDescription
LicenseCode.Builder

addLicenseAlias(LicenseCodeLicenseAlias.Builder builderForValue)

public LicenseCode.Builder addLicenseAlias(LicenseCodeLicenseAlias.Builder builderForValue)

[Output Only] URL and description aliases of Licenses with the same License Code.

repeated .google.cloud.compute.v1.LicenseCodeLicenseAlias license_alias = 43550930;

Parameter
NameDescription
builderForValueLicenseCodeLicenseAlias.Builder
Returns
TypeDescription
LicenseCode.Builder

addLicenseAlias(int index, LicenseCodeLicenseAlias value)

public LicenseCode.Builder addLicenseAlias(int index, LicenseCodeLicenseAlias value)

[Output Only] URL and description aliases of Licenses with the same License Code.

repeated .google.cloud.compute.v1.LicenseCodeLicenseAlias license_alias = 43550930;

Parameters
NameDescription
indexint
valueLicenseCodeLicenseAlias
Returns
TypeDescription
LicenseCode.Builder

addLicenseAlias(int index, LicenseCodeLicenseAlias.Builder builderForValue)

public LicenseCode.Builder addLicenseAlias(int index, LicenseCodeLicenseAlias.Builder builderForValue)

[Output Only] URL and description aliases of Licenses with the same License Code.

repeated .google.cloud.compute.v1.LicenseCodeLicenseAlias license_alias = 43550930;

Parameters
NameDescription
indexint
builderForValueLicenseCodeLicenseAlias.Builder
Returns
TypeDescription
LicenseCode.Builder

addLicenseAliasBuilder()

public LicenseCodeLicenseAlias.Builder addLicenseAliasBuilder()

[Output Only] URL and description aliases of Licenses with the same License Code.

repeated .google.cloud.compute.v1.LicenseCodeLicenseAlias license_alias = 43550930;

Returns
TypeDescription
LicenseCodeLicenseAlias.Builder

addLicenseAliasBuilder(int index)

public LicenseCodeLicenseAlias.Builder addLicenseAliasBuilder(int index)

[Output Only] URL and description aliases of Licenses with the same License Code.

repeated .google.cloud.compute.v1.LicenseCodeLicenseAlias license_alias = 43550930;

Parameter
NameDescription
indexint
Returns
TypeDescription
LicenseCodeLicenseAlias.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public LicenseCode build()
Returns
TypeDescription
LicenseCode

buildPartial()

public LicenseCode buildPartial()
Returns
TypeDescription
LicenseCode

clear()

public LicenseCode.Builder clear()
Returns
TypeDescription
LicenseCode.Builder
Overrides

clearCreationTimestamp()

public LicenseCode.Builder clearCreationTimestamp()

[Output Only] Creation timestamp in RFC3339 text format.

optional string creation_timestamp = 30525366;

Returns
TypeDescription
LicenseCode.Builder

This builder for chaining.

clearDescription()

public LicenseCode.Builder clearDescription()

[Output Only] Description of this License Code.

optional string description = 422937596;

Returns
TypeDescription
LicenseCode.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public LicenseCode.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
LicenseCode.Builder
Overrides

clearId()

public LicenseCode.Builder clearId()

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

optional uint64 id = 3355;

Returns
TypeDescription
LicenseCode.Builder

This builder for chaining.

clearKind()

public LicenseCode.Builder clearKind()

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

optional string kind = 3292052;

Returns
TypeDescription
LicenseCode.Builder

This builder for chaining.

clearLicenseAlias()

public LicenseCode.Builder clearLicenseAlias()

[Output Only] URL and description aliases of Licenses with the same License Code.

repeated .google.cloud.compute.v1.LicenseCodeLicenseAlias license_alias = 43550930;

Returns
TypeDescription
LicenseCode.Builder

clearName()

public LicenseCode.Builder clearName()

[Output Only] Name of the resource. The name is 1-20 characters long and must be a valid 64 bit integer.

optional string name = 3373707;

Returns
TypeDescription
LicenseCode.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

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

optional string self_link = 456214797;

Returns
TypeDescription
LicenseCode.Builder

This builder for chaining.

clearState()

public LicenseCode.Builder clearState()

[Output Only] Current state of this License Code. Check the State enum for the list of possible values.

optional string state = 109757585;

Returns
TypeDescription
LicenseCode.Builder

This builder for chaining.

clearTransferable()

public LicenseCode.Builder clearTransferable()

[Output Only] If true, the license will remain attached when creating images or snapshots from disks. Otherwise, the license is not transferred.

optional bool transferable = 4349893;

Returns
TypeDescription
LicenseCode.Builder

This builder for chaining.

clone()

public LicenseCode.Builder clone()
Returns
TypeDescription
LicenseCode.Builder
Overrides

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 LicenseCode getDefaultInstanceForType()
Returns
TypeDescription
LicenseCode

getDescription()

public String getDescription()

[Output Only] Description of this License Code.

optional string description = 422937596;

Returns
TypeDescription
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

[Output Only] Description of this License Code.

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#licenseCode for licenses.

optional string kind = 3292052;

Returns
TypeDescription
String

The kind.

getKindBytes()

public ByteString getKindBytes()

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

optional string kind = 3292052;

Returns
TypeDescription
ByteString

The bytes for kind.

getLicenseAlias(int index)

public LicenseCodeLicenseAlias getLicenseAlias(int index)

[Output Only] URL and description aliases of Licenses with the same License Code.

repeated .google.cloud.compute.v1.LicenseCodeLicenseAlias license_alias = 43550930;

Parameter
NameDescription
indexint
Returns
TypeDescription
LicenseCodeLicenseAlias

getLicenseAliasBuilder(int index)

public LicenseCodeLicenseAlias.Builder getLicenseAliasBuilder(int index)

[Output Only] URL and description aliases of Licenses with the same License Code.

repeated .google.cloud.compute.v1.LicenseCodeLicenseAlias license_alias = 43550930;

Parameter
NameDescription
indexint
Returns
TypeDescription
LicenseCodeLicenseAlias.Builder

getLicenseAliasBuilderList()

public List<LicenseCodeLicenseAlias.Builder> getLicenseAliasBuilderList()

[Output Only] URL and description aliases of Licenses with the same License Code.

repeated .google.cloud.compute.v1.LicenseCodeLicenseAlias license_alias = 43550930;

Returns
TypeDescription
List<Builder>

getLicenseAliasCount()

public int getLicenseAliasCount()

[Output Only] URL and description aliases of Licenses with the same License Code.

repeated .google.cloud.compute.v1.LicenseCodeLicenseAlias license_alias = 43550930;

Returns
TypeDescription
int

getLicenseAliasList()

public List<LicenseCodeLicenseAlias> getLicenseAliasList()

[Output Only] URL and description aliases of Licenses with the same License Code.

repeated .google.cloud.compute.v1.LicenseCodeLicenseAlias license_alias = 43550930;

Returns
TypeDescription
List<LicenseCodeLicenseAlias>

getLicenseAliasOrBuilder(int index)

public LicenseCodeLicenseAliasOrBuilder getLicenseAliasOrBuilder(int index)

[Output Only] URL and description aliases of Licenses with the same License Code.

repeated .google.cloud.compute.v1.LicenseCodeLicenseAlias license_alias = 43550930;

Parameter
NameDescription
indexint
Returns
TypeDescription
LicenseCodeLicenseAliasOrBuilder

getLicenseAliasOrBuilderList()

public List<? extends LicenseCodeLicenseAliasOrBuilder> getLicenseAliasOrBuilderList()

[Output Only] URL and description aliases of Licenses with the same License Code.

repeated .google.cloud.compute.v1.LicenseCodeLicenseAlias license_alias = 43550930;

Returns
TypeDescription
List<? extends com.google.cloud.compute.v1.LicenseCodeLicenseAliasOrBuilder>

getName()

public String getName()

[Output Only] Name of the resource. The name is 1-20 characters long and must be a valid 64 bit integer.

optional string name = 3373707;

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

[Output Only] Name of the resource. The name is 1-20 characters long and must be a valid 64 bit integer.

optional string name = 3373707;

Returns
TypeDescription
ByteString

The bytes for name.

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.

getState()

public String getState()

[Output Only] Current state of this License Code. Check the State enum for the list of possible values.

optional string state = 109757585;

Returns
TypeDescription
String

The state.

getStateBytes()

public ByteString getStateBytes()

[Output Only] Current state of this License Code. Check the State enum for the list of possible values.

optional string state = 109757585;

Returns
TypeDescription
ByteString

The bytes for state.

getTransferable()

public boolean getTransferable()

[Output Only] If true, the license will remain attached when creating images or snapshots from disks. Otherwise, the license is not transferred.

optional bool transferable = 4349893;

Returns
TypeDescription
boolean

The transferable.

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()

[Output Only] Description of this License Code.

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#licenseCode for licenses.

optional string kind = 3292052;

Returns
TypeDescription
boolean

Whether the kind field is set.

hasName()

public boolean hasName()

[Output Only] Name of the resource. The name is 1-20 characters long and must be a valid 64 bit integer.

optional string name = 3373707;

Returns
TypeDescription
boolean

Whether the name 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.

hasState()

public boolean hasState()

[Output Only] Current state of this License Code. Check the State enum for the list of possible values.

optional string state = 109757585;

Returns
TypeDescription
boolean

Whether the state field is set.

hasTransferable()

public boolean hasTransferable()

[Output Only] If true, the license will remain attached when creating images or snapshots from disks. Otherwise, the license is not transferred.

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(LicenseCode other)

public LicenseCode.Builder mergeFrom(LicenseCode other)
Parameter
NameDescription
otherLicenseCode
Returns
TypeDescription
LicenseCode.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

public final LicenseCode.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
LicenseCode.Builder
Overrides

removeLicenseAlias(int index)

public LicenseCode.Builder removeLicenseAlias(int index)

[Output Only] URL and description aliases of Licenses with the same License Code.

repeated .google.cloud.compute.v1.LicenseCodeLicenseAlias license_alias = 43550930;

Parameter
NameDescription
indexint
Returns
TypeDescription
LicenseCode.Builder

setCreationTimestamp(String value)

public LicenseCode.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
LicenseCode.Builder

This builder for chaining.

setCreationTimestampBytes(ByteString value)

public LicenseCode.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
LicenseCode.Builder

This builder for chaining.

setDescription(String value)

public LicenseCode.Builder setDescription(String value)

[Output Only] Description of this License Code.

optional string description = 422937596;

Parameter
NameDescription
valueString

The description to set.

Returns
TypeDescription
LicenseCode.Builder

This builder for chaining.

setDescriptionBytes(ByteString value)

public LicenseCode.Builder setDescriptionBytes(ByteString value)

[Output Only] Description of this License Code.

optional string description = 422937596;

Parameter
NameDescription
valueByteString

The bytes for description to set.

Returns
TypeDescription
LicenseCode.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setId(long value)

public LicenseCode.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
LicenseCode.Builder

This builder for chaining.

setKind(String value)

public LicenseCode.Builder setKind(String value)

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

optional string kind = 3292052;

Parameter
NameDescription
valueString

The kind to set.

Returns
TypeDescription
LicenseCode.Builder

This builder for chaining.

setKindBytes(ByteString value)

public LicenseCode.Builder setKindBytes(ByteString value)

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

optional string kind = 3292052;

Parameter
NameDescription
valueByteString

The bytes for kind to set.

Returns
TypeDescription
LicenseCode.Builder

This builder for chaining.

setLicenseAlias(int index, LicenseCodeLicenseAlias value)

public LicenseCode.Builder setLicenseAlias(int index, LicenseCodeLicenseAlias value)

[Output Only] URL and description aliases of Licenses with the same License Code.

repeated .google.cloud.compute.v1.LicenseCodeLicenseAlias license_alias = 43550930;

Parameters
NameDescription
indexint
valueLicenseCodeLicenseAlias
Returns
TypeDescription
LicenseCode.Builder

setLicenseAlias(int index, LicenseCodeLicenseAlias.Builder builderForValue)

public LicenseCode.Builder setLicenseAlias(int index, LicenseCodeLicenseAlias.Builder builderForValue)

[Output Only] URL and description aliases of Licenses with the same License Code.

repeated .google.cloud.compute.v1.LicenseCodeLicenseAlias license_alias = 43550930;

Parameters
NameDescription
indexint
builderForValueLicenseCodeLicenseAlias.Builder
Returns
TypeDescription
LicenseCode.Builder

setName(String value)

public LicenseCode.Builder setName(String value)

[Output Only] Name of the resource. The name is 1-20 characters long and must be a valid 64 bit integer.

optional string name = 3373707;

Parameter
NameDescription
valueString

The name to set.

Returns
TypeDescription
LicenseCode.Builder

This builder for chaining.

setNameBytes(ByteString value)

public LicenseCode.Builder setNameBytes(ByteString value)

[Output Only] Name of the resource. The name is 1-20 characters long and must be a valid 64 bit integer.

optional string name = 3373707;

Parameter
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
LicenseCode.Builder

This builder for chaining.

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

public LicenseCode.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
LicenseCode.Builder
Overrides
public LicenseCode.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
LicenseCode.Builder

This builder for chaining.

setSelfLinkBytes(ByteString value)

public LicenseCode.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
LicenseCode.Builder

This builder for chaining.

setState(String value)

public LicenseCode.Builder setState(String value)

[Output Only] Current state of this License Code. Check the State enum for the list of possible values.

optional string state = 109757585;

Parameter
NameDescription
valueString

The state to set.

Returns
TypeDescription
LicenseCode.Builder

This builder for chaining.

setStateBytes(ByteString value)

public LicenseCode.Builder setStateBytes(ByteString value)

[Output Only] Current state of this License Code. Check the State enum for the list of possible values.

optional string state = 109757585;

Parameter
NameDescription
valueByteString

The bytes for state to set.

Returns
TypeDescription
LicenseCode.Builder

This builder for chaining.

setTransferable(boolean value)

public LicenseCode.Builder setTransferable(boolean value)

[Output Only] If true, the license will remain attached when creating images or snapshots from disks. Otherwise, the license is not transferred.

optional bool transferable = 4349893;

Parameter
NameDescription
valueboolean

The transferable to set.

Returns
TypeDescription
LicenseCode.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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