Class Tag.Builder (1.53.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
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public Tag build()
Returns
Type Description
Tag

buildPartial()

public Tag buildPartial()
Returns
Type Description
Tag

clear()

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

clearField(Descriptors.FieldDescriptor field)

public Tag.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
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
Type Description
Tag.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Tag.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
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
Type Description
Tag.Builder

This builder for chaining.

clone()

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

getDefaultInstanceForType()

public Tag getDefaultInstanceForType()
Returns
Type Description
Tag

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
ByteString

The bytes for version.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(Tag other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setField(Descriptors.FieldDescriptor field, Object value)

public Tag.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
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
Name Description
value String

The name to set.

Returns
Type Description
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
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
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
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
Tag.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final Tag.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
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
Name Description
value String

The version to set.

Returns
Type Description
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
Name Description
value ByteString

The bytes for version to set.

Returns
Type Description
Tag.Builder

This builder for chaining.