Class Version.Builder (1.28.0)

public static final class Version.Builder extends GeneratedMessageV3.Builder<Version.Builder> implements VersionOrBuilder

The body of a version resource. A version resource represents a collection of components, such as files and other data. This may correspond to a version in many package management schemes.

Protobuf type google.devtools.artifactregistry.v1beta2.Version

Implements

VersionOrBuilder

Static Methods

getDescriptor()

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

Methods

addAllRelatedTags(Iterable<? extends Tag> values)

public Version.Builder addAllRelatedTags(Iterable<? extends Tag> values)

Output only. A list of related tags. Will contain up to 100 tags that reference this version.

repeated .google.devtools.artifactregistry.v1beta2.Tag related_tags = 7;

Parameter
NameDescription
valuesIterable<? extends com.google.devtools.artifactregistry.v1beta2.Tag>
Returns
TypeDescription
Version.Builder

addRelatedTags(Tag value)

public Version.Builder addRelatedTags(Tag value)

Output only. A list of related tags. Will contain up to 100 tags that reference this version.

repeated .google.devtools.artifactregistry.v1beta2.Tag related_tags = 7;

Parameter
NameDescription
valueTag
Returns
TypeDescription
Version.Builder

addRelatedTags(Tag.Builder builderForValue)

public Version.Builder addRelatedTags(Tag.Builder builderForValue)

Output only. A list of related tags. Will contain up to 100 tags that reference this version.

repeated .google.devtools.artifactregistry.v1beta2.Tag related_tags = 7;

Parameter
NameDescription
builderForValueTag.Builder
Returns
TypeDescription
Version.Builder

addRelatedTags(int index, Tag value)

public Version.Builder addRelatedTags(int index, Tag value)

Output only. A list of related tags. Will contain up to 100 tags that reference this version.

repeated .google.devtools.artifactregistry.v1beta2.Tag related_tags = 7;

Parameters
NameDescription
indexint
valueTag
Returns
TypeDescription
Version.Builder

addRelatedTags(int index, Tag.Builder builderForValue)

public Version.Builder addRelatedTags(int index, Tag.Builder builderForValue)

Output only. A list of related tags. Will contain up to 100 tags that reference this version.

repeated .google.devtools.artifactregistry.v1beta2.Tag related_tags = 7;

Parameters
NameDescription
indexint
builderForValueTag.Builder
Returns
TypeDescription
Version.Builder

addRelatedTagsBuilder()

public Tag.Builder addRelatedTagsBuilder()

Output only. A list of related tags. Will contain up to 100 tags that reference this version.

repeated .google.devtools.artifactregistry.v1beta2.Tag related_tags = 7;

Returns
TypeDescription
Tag.Builder

addRelatedTagsBuilder(int index)

public Tag.Builder addRelatedTagsBuilder(int index)

Output only. A list of related tags. Will contain up to 100 tags that reference this version.

repeated .google.devtools.artifactregistry.v1beta2.Tag related_tags = 7;

Parameter
NameDescription
indexint
Returns
TypeDescription
Tag.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public Version build()
Returns
TypeDescription
Version

buildPartial()

public Version buildPartial()
Returns
TypeDescription
Version

clear()

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

clearCreateTime()

public Version.Builder clearCreateTime()

The time when the version was created.

.google.protobuf.Timestamp create_time = 5;

Returns
TypeDescription
Version.Builder

clearDescription()

public Version.Builder clearDescription()

Optional. Description of the version, as specified in its metadata.

string description = 3;

Returns
TypeDescription
Version.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearMetadata()

public Version.Builder clearMetadata()

Output only. Repository-specific Metadata stored against this version. The fields returned are defined by the underlying repository-specific resource. Currently, the only resource in use is DockerImage

.google.protobuf.Struct metadata = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Version.Builder

clearName()

public Version.Builder clearName()

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

string name = 1;

Returns
TypeDescription
Version.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearRelatedTags()

public Version.Builder clearRelatedTags()

Output only. A list of related tags. Will contain up to 100 tags that reference this version.

repeated .google.devtools.artifactregistry.v1beta2.Tag related_tags = 7;

Returns
TypeDescription
Version.Builder

clearUpdateTime()

public Version.Builder clearUpdateTime()

The time when the version was last updated.

.google.protobuf.Timestamp update_time = 6;

Returns
TypeDescription
Version.Builder

clone()

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

getCreateTime()

public Timestamp getCreateTime()

The time when the version was created.

.google.protobuf.Timestamp create_time = 5;

Returns
TypeDescription
Timestamp

The createTime.

getCreateTimeBuilder()

public Timestamp.Builder getCreateTimeBuilder()

The time when the version was created.

.google.protobuf.Timestamp create_time = 5;

Returns
TypeDescription
Builder

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

The time when the version was created.

.google.protobuf.Timestamp create_time = 5;

Returns
TypeDescription
TimestampOrBuilder

getDefaultInstanceForType()

public Version getDefaultInstanceForType()
Returns
TypeDescription
Version

getDescription()

public String getDescription()

Optional. Description of the version, as specified in its metadata.

string description = 3;

Returns
TypeDescription
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

Optional. Description of the version, as specified in its metadata.

string description = 3;

Returns
TypeDescription
ByteString

The bytes for description.

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getMetadata()

public Struct getMetadata()

Output only. Repository-specific Metadata stored against this version. The fields returned are defined by the underlying repository-specific resource. Currently, the only resource in use is DockerImage

.google.protobuf.Struct metadata = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Struct

The metadata.

getMetadataBuilder()

public Struct.Builder getMetadataBuilder()

Output only. Repository-specific Metadata stored against this version. The fields returned are defined by the underlying repository-specific resource. Currently, the only resource in use is DockerImage

.google.protobuf.Struct metadata = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Builder

getMetadataOrBuilder()

public StructOrBuilder getMetadataOrBuilder()

Output only. Repository-specific Metadata stored against this version. The fields returned are defined by the underlying repository-specific resource. Currently, the only resource in use is DockerImage

.google.protobuf.Struct metadata = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
StructOrBuilder

getName()

public String getName()

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

string name = 1;

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

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

string name = 1;

Returns
TypeDescription
ByteString

The bytes for name.

getRelatedTags(int index)

public Tag getRelatedTags(int index)

Output only. A list of related tags. Will contain up to 100 tags that reference this version.

repeated .google.devtools.artifactregistry.v1beta2.Tag related_tags = 7;

Parameter
NameDescription
indexint
Returns
TypeDescription
Tag

getRelatedTagsBuilder(int index)

public Tag.Builder getRelatedTagsBuilder(int index)

Output only. A list of related tags. Will contain up to 100 tags that reference this version.

repeated .google.devtools.artifactregistry.v1beta2.Tag related_tags = 7;

Parameter
NameDescription
indexint
Returns
TypeDescription
Tag.Builder

getRelatedTagsBuilderList()

public List<Tag.Builder> getRelatedTagsBuilderList()

Output only. A list of related tags. Will contain up to 100 tags that reference this version.

repeated .google.devtools.artifactregistry.v1beta2.Tag related_tags = 7;

Returns
TypeDescription
List<Builder>

getRelatedTagsCount()

public int getRelatedTagsCount()

Output only. A list of related tags. Will contain up to 100 tags that reference this version.

repeated .google.devtools.artifactregistry.v1beta2.Tag related_tags = 7;

Returns
TypeDescription
int

getRelatedTagsList()

public List<Tag> getRelatedTagsList()

Output only. A list of related tags. Will contain up to 100 tags that reference this version.

repeated .google.devtools.artifactregistry.v1beta2.Tag related_tags = 7;

Returns
TypeDescription
List<Tag>

getRelatedTagsOrBuilder(int index)

public TagOrBuilder getRelatedTagsOrBuilder(int index)

Output only. A list of related tags. Will contain up to 100 tags that reference this version.

repeated .google.devtools.artifactregistry.v1beta2.Tag related_tags = 7;

Parameter
NameDescription
indexint
Returns
TypeDescription
TagOrBuilder

getRelatedTagsOrBuilderList()

public List<? extends TagOrBuilder> getRelatedTagsOrBuilderList()

Output only. A list of related tags. Will contain up to 100 tags that reference this version.

repeated .google.devtools.artifactregistry.v1beta2.Tag related_tags = 7;

Returns
TypeDescription
List<? extends com.google.devtools.artifactregistry.v1beta2.TagOrBuilder>

getUpdateTime()

public Timestamp getUpdateTime()

The time when the version was last updated.

.google.protobuf.Timestamp update_time = 6;

Returns
TypeDescription
Timestamp

The updateTime.

getUpdateTimeBuilder()

public Timestamp.Builder getUpdateTimeBuilder()

The time when the version was last updated.

.google.protobuf.Timestamp update_time = 6;

Returns
TypeDescription
Builder

getUpdateTimeOrBuilder()

public TimestampOrBuilder getUpdateTimeOrBuilder()

The time when the version was last updated.

.google.protobuf.Timestamp update_time = 6;

Returns
TypeDescription
TimestampOrBuilder

hasCreateTime()

public boolean hasCreateTime()

The time when the version was created.

.google.protobuf.Timestamp create_time = 5;

Returns
TypeDescription
boolean

Whether the createTime field is set.

hasMetadata()

public boolean hasMetadata()

Output only. Repository-specific Metadata stored against this version. The fields returned are defined by the underlying repository-specific resource. Currently, the only resource in use is DockerImage

.google.protobuf.Struct metadata = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
boolean

Whether the metadata field is set.

hasUpdateTime()

public boolean hasUpdateTime()

The time when the version was last updated.

.google.protobuf.Timestamp update_time = 6;

Returns
TypeDescription
boolean

Whether the updateTime field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeCreateTime(Timestamp value)

public Version.Builder mergeCreateTime(Timestamp value)

The time when the version was created.

.google.protobuf.Timestamp create_time = 5;

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
Version.Builder

mergeFrom(Version other)

public Version.Builder mergeFrom(Version other)
Parameter
NameDescription
otherVersion
Returns
TypeDescription
Version.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeMetadata(Struct value)

public Version.Builder mergeMetadata(Struct value)

Output only. Repository-specific Metadata stored against this version. The fields returned are defined by the underlying repository-specific resource. Currently, the only resource in use is DockerImage

.google.protobuf.Struct metadata = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueStruct
Returns
TypeDescription
Version.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

mergeUpdateTime(Timestamp value)

public Version.Builder mergeUpdateTime(Timestamp value)

The time when the version was last updated.

.google.protobuf.Timestamp update_time = 6;

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
Version.Builder

removeRelatedTags(int index)

public Version.Builder removeRelatedTags(int index)

Output only. A list of related tags. Will contain up to 100 tags that reference this version.

repeated .google.devtools.artifactregistry.v1beta2.Tag related_tags = 7;

Parameter
NameDescription
indexint
Returns
TypeDescription
Version.Builder

setCreateTime(Timestamp value)

public Version.Builder setCreateTime(Timestamp value)

The time when the version was created.

.google.protobuf.Timestamp create_time = 5;

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
Version.Builder

setCreateTime(Timestamp.Builder builderForValue)

public Version.Builder setCreateTime(Timestamp.Builder builderForValue)

The time when the version was created.

.google.protobuf.Timestamp create_time = 5;

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
Version.Builder

setDescription(String value)

public Version.Builder setDescription(String value)

Optional. Description of the version, as specified in its metadata.

string description = 3;

Parameter
NameDescription
valueString

The description to set.

Returns
TypeDescription
Version.Builder

This builder for chaining.

setDescriptionBytes(ByteString value)

public Version.Builder setDescriptionBytes(ByteString value)

Optional. Description of the version, as specified in its metadata.

string description = 3;

Parameter
NameDescription
valueByteString

The bytes for description to set.

Returns
TypeDescription
Version.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setMetadata(Struct value)

public Version.Builder setMetadata(Struct value)

Output only. Repository-specific Metadata stored against this version. The fields returned are defined by the underlying repository-specific resource. Currently, the only resource in use is DockerImage

.google.protobuf.Struct metadata = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueStruct
Returns
TypeDescription
Version.Builder

setMetadata(Struct.Builder builderForValue)

public Version.Builder setMetadata(Struct.Builder builderForValue)

Output only. Repository-specific Metadata stored against this version. The fields returned are defined by the underlying repository-specific resource. Currently, the only resource in use is DockerImage

.google.protobuf.Struct metadata = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
Version.Builder

setName(String value)

public Version.Builder setName(String value)

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

string name = 1;

Parameter
NameDescription
valueString

The name to set.

Returns
TypeDescription
Version.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Version.Builder setNameBytes(ByteString value)

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

string name = 1;

Parameter
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
Version.Builder

This builder for chaining.

setRelatedTags(int index, Tag value)

public Version.Builder setRelatedTags(int index, Tag value)

Output only. A list of related tags. Will contain up to 100 tags that reference this version.

repeated .google.devtools.artifactregistry.v1beta2.Tag related_tags = 7;

Parameters
NameDescription
indexint
valueTag
Returns
TypeDescription
Version.Builder

setRelatedTags(int index, Tag.Builder builderForValue)

public Version.Builder setRelatedTags(int index, Tag.Builder builderForValue)

Output only. A list of related tags. Will contain up to 100 tags that reference this version.

repeated .google.devtools.artifactregistry.v1beta2.Tag related_tags = 7;

Parameters
NameDescription
indexint
builderForValueTag.Builder
Returns
TypeDescription
Version.Builder

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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

setUpdateTime(Timestamp value)

public Version.Builder setUpdateTime(Timestamp value)

The time when the version was last updated.

.google.protobuf.Timestamp update_time = 6;

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
Version.Builder

setUpdateTime(Timestamp.Builder builderForValue)

public Version.Builder setUpdateTime(Timestamp.Builder builderForValue)

The time when the version was last updated.

.google.protobuf.Timestamp update_time = 6;

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
Version.Builder