Class Tag.Builder (1.28.0)

public static final class Tag.Builder extends GeneratedMessageV3.Builder<Tag.Builder> implements TagOrBuilder

Tags point to a version and represent an alternative name that can be used to access the version.

Protobuf type google.devtools.artifactregistry.v1.Tag

Implements

TagOrBuilder

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public Tag build()
Returns
TypeDescription
Tag

buildPartial()

public Tag buildPartial()
Returns
TypeDescription
Tag

clear()

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

clearField(Descriptors.FieldDescriptor field)

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

clearName()

public Tag.Builder clearName()

The name of the tag, for example: "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/tags/tag1". If the package part contains slashes, the slashes are escaped. The tag part can only have characters in [a-zA-Z0-9\-._~:@], anything else must be URL encoded.

string name = 1;

Returns
TypeDescription
Tag.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearVersion()

public Tag.Builder clearVersion()

The name of the version the tag refers to, for example: "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/sha256:5243811" If the package or version ID parts contain slashes, the slashes are escaped.

string version = 2;

Returns
TypeDescription
Tag.Builder

This builder for chaining.

clone()

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

getDefaultInstanceForType()

public Tag getDefaultInstanceForType()
Returns
TypeDescription
Tag

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getName()

public String getName()

The name of the tag, for example: "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/tags/tag1". If the package part contains slashes, the slashes are escaped. The tag part can only have characters in [a-zA-Z0-9\-._~:@], anything else must be URL encoded.

string name = 1;

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

The name of the tag, for example: "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/tags/tag1". If the package part contains slashes, the slashes are escaped. The tag part can only have characters in [a-zA-Z0-9\-._~:@], anything else must be URL encoded.

string name = 1;

Returns
TypeDescription
ByteString

The bytes for name.

getVersion()

public String getVersion()

The name of the version the tag refers to, for example: "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/sha256:5243811" If the package or version ID parts contain slashes, the slashes are escaped.

string version = 2;

Returns
TypeDescription
String

The version.

getVersionBytes()

public ByteString getVersionBytes()

The name of the version the tag refers to, for example: "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/sha256:5243811" If the package or version ID parts contain slashes, the slashes are escaped.

string version = 2;

Returns
TypeDescription
ByteString

The bytes for version.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(Tag other)

public Tag.Builder mergeFrom(Tag other)
Parameter
NameDescription
otherTag
Returns
TypeDescription
Tag.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setField(Descriptors.FieldDescriptor field, Object value)

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

setName(String value)

public Tag.Builder setName(String value)

The name of the tag, for example: "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/tags/tag1". If the package part contains slashes, the slashes are escaped. The tag part can only have characters in [a-zA-Z0-9\-._~:@], anything else must be URL encoded.

string name = 1;

Parameter
NameDescription
valueString

The name to set.

Returns
TypeDescription
Tag.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Tag.Builder setNameBytes(ByteString value)

The name of the tag, for example: "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/tags/tag1". If the package part contains slashes, the slashes are escaped. The tag part can only have characters in [a-zA-Z0-9\-._~:@], anything else must be URL encoded.

string name = 1;

Parameter
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
Tag.Builder

This builder for chaining.

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

public Tag.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
Tag.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

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

setVersion(String value)

public Tag.Builder setVersion(String value)

The name of the version the tag refers to, for example: "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/sha256:5243811" If the package or version ID parts contain slashes, the slashes are escaped.

string version = 2;

Parameter
NameDescription
valueString

The version to set.

Returns
TypeDescription
Tag.Builder

This builder for chaining.

setVersionBytes(ByteString value)

public Tag.Builder setVersionBytes(ByteString value)

The name of the version the tag refers to, for example: "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/sha256:5243811" If the package or version ID parts contain slashes, the slashes are escaped.

string version = 2;

Parameter
NameDescription
valueByteString

The bytes for version to set.

Returns
TypeDescription
Tag.Builder

This builder for chaining.