Send feedback
Class Tag.Builder
Stay organized with collections
Save and categorize content based on your preferences.
Version 0.4.0keyboard_arrow_down
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.v1beta2.Tag
Methods
public Tag . Builder addRepeatedField ( Descriptors . FieldDescriptor field , Object value )
Parameters
Returns
Overrides
Returns
public Tag buildPartial ()
Returns
public Tag . Builder clear ()
Returns
Overrides
public Tag . Builder clearField ( Descriptors . FieldDescriptor field )
Parameter
Returns
Overrides
public Tag . Builder clearName ()
The name of the tag, for example:
"projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/tags/tag1".
string name = 1;
Returns
Type
Description
Tag.Builder
This builder for chaining.
public Tag . Builder clearOneof ( Descriptors . OneofDescriptor oneof )
Parameter
Returns
Overrides
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"
string version = 2;
Returns
Type
Description
Tag.Builder
This builder for chaining.
public Tag . Builder clone ()
Returns
Overrides
public Tag getDefaultInstanceForType ()
Returns
public static final Descriptors . Descriptor getDescriptor ()
Returns
public Descriptors . Descriptor getDescriptorForType ()
Returns
Overrides
The name of the tag, for example:
"projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/tags/tag1".
string name = 1;
Returns
Type
Description
String
The name.
public ByteString getNameBytes ()
The name of the tag, for example:
"projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/tags/tag1".
string name = 1;
Returns
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"
string version = 2;
Returns
Type
Description
String
The version.
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"
string version = 2;
Returns
Type
Description
ByteString
The bytes for version.
protected GeneratedMessageV3 . FieldAccessorTable internalGetFieldAccessorTable ()
Returns
Overrides
public final boolean isInitialized ()
Returns
Overrides
public Tag . Builder mergeFrom ( Tag other )
Parameter
Name
Description
other
Tag
Returns
public Tag . Builder mergeFrom ( CodedInputStream input , ExtensionRegistryLite extensionRegistry )
Parameters
Returns
Overrides
Exceptions
public Tag . Builder mergeFrom ( Message other )
Parameter
Returns
Overrides
public final Tag . Builder mergeUnknownFields ( UnknownFieldSet unknownFields )
Parameter
Returns
Overrides
public Tag . Builder setField ( Descriptors . FieldDescriptor field , Object value )
Parameters
Returns
Overrides
public Tag . Builder setName ( String value )
The name of the tag, for example:
"projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/tags/tag1".
string name = 1;
Parameter
Name
Description
value
String
The name to set.
Returns
Type
Description
Tag.Builder
This builder for chaining.
public Tag . Builder setNameBytes ( ByteString value )
The name of the tag, for example:
"projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/tags/tag1".
string name = 1;
Parameter
Name
Description
value
ByteString
The bytes for name to set.
Returns
Type
Description
Tag.Builder
This builder for chaining.
public Tag . Builder setRepeatedField ( Descriptors . FieldDescriptor field , int index , Object value )
Parameters
Returns
Overrides
public final Tag . Builder setUnknownFields ( UnknownFieldSet unknownFields )
Parameter
Returns
Overrides
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"
string version = 2;
Parameter
Name
Description
value
String
The version to set.
Returns
Type
Description
Tag.Builder
This builder for chaining.
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"
string version = 2;
Parameter
Name
Description
value
ByteString
The bytes for version to set.
Returns
Type
Description
Tag.Builder
This builder for chaining.
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-06-14 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-06-14 UTC."],[],[]]