Class Package.Builder (1.53.0)

public static final class Package.Builder extends GeneratedMessageV3.Builder<Package.Builder> implements PackageOrBuilder

Packages are named collections of versions.

Protobuf type google.devtools.artifactregistry.v1.Package

Implements

PackageOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public Package build()
Returns
Type Description
Package

buildPartial()

public Package buildPartial()
Returns
Type Description
Package

clear()

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

clearAnnotations()

public Package.Builder clearAnnotations()
Returns
Type Description
Package.Builder

clearCreateTime()

public Package.Builder clearCreateTime()

The time when the package was created.

.google.protobuf.Timestamp create_time = 5;

Returns
Type Description
Package.Builder

clearDisplayName()

public Package.Builder clearDisplayName()

The display name of the package.

string display_name = 2;

Returns
Type Description
Package.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public Package.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
Package.Builder
Overrides

clearName()

public Package.Builder clearName()

The name of the package, for example: projects/p1/locations/us-central1/repositories/repo1/packages/pkg1. If the package ID part contains slashes, the slashes are escaped.

string name = 1;

Returns
Type Description
Package.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Package.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
Package.Builder
Overrides

clearUpdateTime()

public Package.Builder clearUpdateTime()

The time when the package was last updated. This includes publishing a new version of the package.

.google.protobuf.Timestamp update_time = 6;

Returns
Type Description
Package.Builder

clone()

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

containsAnnotations(String key)

public boolean containsAnnotations(String key)

Optional. Client specified annotations.

map<string, string> annotations = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
boolean

getAnnotations() (deprecated)

public Map<String,String> getAnnotations()

Use #getAnnotationsMap() instead.

Returns
Type Description
Map<String,String>

getAnnotationsCount()

public int getAnnotationsCount()

Optional. Client specified annotations.

map<string, string> annotations = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

getAnnotationsMap()

public Map<String,String> getAnnotationsMap()

Optional. Client specified annotations.

map<string, string> annotations = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Map<String,String>

getAnnotationsOrDefault(String key, String defaultValue)

public String getAnnotationsOrDefault(String key, String defaultValue)

Optional. Client specified annotations.

map<string, string> annotations = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
key String
defaultValue String
Returns
Type Description
String

getAnnotationsOrThrow(String key)

public String getAnnotationsOrThrow(String key)

Optional. Client specified annotations.

map<string, string> annotations = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
String

getCreateTime()

public Timestamp getCreateTime()

The time when the package was created.

.google.protobuf.Timestamp create_time = 5;

Returns
Type Description
Timestamp

The createTime.

getCreateTimeBuilder()

public Timestamp.Builder getCreateTimeBuilder()

The time when the package was created.

.google.protobuf.Timestamp create_time = 5;

Returns
Type Description
Builder

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

The time when the package was created.

.google.protobuf.Timestamp create_time = 5;

Returns
Type Description
TimestampOrBuilder

getDefaultInstanceForType()

public Package getDefaultInstanceForType()
Returns
Type Description
Package

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getDisplayName()

public String getDisplayName()

The display name of the package.

string display_name = 2;

Returns
Type Description
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

The display name of the package.

string display_name = 2;

Returns
Type Description
ByteString

The bytes for displayName.

getMutableAnnotations() (deprecated)

public Map<String,String> getMutableAnnotations()

Use alternate mutation accessors instead.

Returns
Type Description
Map<String,String>

getName()

public String getName()

The name of the package, for example: projects/p1/locations/us-central1/repositories/repo1/packages/pkg1. If the package ID part contains slashes, the slashes are escaped.

string name = 1;

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

The name of the package, for example: projects/p1/locations/us-central1/repositories/repo1/packages/pkg1. If the package ID part contains slashes, the slashes are escaped.

string name = 1;

Returns
Type Description
ByteString

The bytes for name.

getUpdateTime()

public Timestamp getUpdateTime()

The time when the package was last updated. This includes publishing a new version of the package.

.google.protobuf.Timestamp update_time = 6;

Returns
Type Description
Timestamp

The updateTime.

getUpdateTimeBuilder()

public Timestamp.Builder getUpdateTimeBuilder()

The time when the package was last updated. This includes publishing a new version of the package.

.google.protobuf.Timestamp update_time = 6;

Returns
Type Description
Builder

getUpdateTimeOrBuilder()

public TimestampOrBuilder getUpdateTimeOrBuilder()

The time when the package was last updated. This includes publishing a new version of the package.

.google.protobuf.Timestamp update_time = 6;

Returns
Type Description
TimestampOrBuilder

hasCreateTime()

public boolean hasCreateTime()

The time when the package was created.

.google.protobuf.Timestamp create_time = 5;

Returns
Type Description
boolean

Whether the createTime field is set.

hasUpdateTime()

public boolean hasUpdateTime()

The time when the package was last updated. This includes publishing a new version of the package.

.google.protobuf.Timestamp update_time = 6;

Returns
Type Description
boolean

Whether the updateTime field is set.

internalGetFieldAccessorTable()

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

internalGetMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)

internalGetMutableMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeCreateTime(Timestamp value)

public Package.Builder mergeCreateTime(Timestamp value)

The time when the package was created.

.google.protobuf.Timestamp create_time = 5;

Parameter
Name Description
value Timestamp
Returns
Type Description
Package.Builder

mergeFrom(Package other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

mergeUpdateTime(Timestamp value)

public Package.Builder mergeUpdateTime(Timestamp value)

The time when the package was last updated. This includes publishing a new version of the package.

.google.protobuf.Timestamp update_time = 6;

Parameter
Name Description
value Timestamp
Returns
Type Description
Package.Builder

putAllAnnotations(Map<String,String> values)

public Package.Builder putAllAnnotations(Map<String,String> values)

Optional. Client specified annotations.

map<string, string> annotations = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Map<String,String>
Returns
Type Description
Package.Builder

putAnnotations(String key, String value)

public Package.Builder putAnnotations(String key, String value)

Optional. Client specified annotations.

map<string, string> annotations = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
key String
value String
Returns
Type Description
Package.Builder

removeAnnotations(String key)

public Package.Builder removeAnnotations(String key)

Optional. Client specified annotations.

map<string, string> annotations = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
Package.Builder

setCreateTime(Timestamp value)

public Package.Builder setCreateTime(Timestamp value)

The time when the package was created.

.google.protobuf.Timestamp create_time = 5;

Parameter
Name Description
value Timestamp
Returns
Type Description
Package.Builder

setCreateTime(Timestamp.Builder builderForValue)

public Package.Builder setCreateTime(Timestamp.Builder builderForValue)

The time when the package was created.

.google.protobuf.Timestamp create_time = 5;

Parameter
Name Description
builderForValue Builder
Returns
Type Description
Package.Builder

setDisplayName(String value)

public Package.Builder setDisplayName(String value)

The display name of the package.

string display_name = 2;

Parameter
Name Description
value String

The displayName to set.

Returns
Type Description
Package.Builder

This builder for chaining.

setDisplayNameBytes(ByteString value)

public Package.Builder setDisplayNameBytes(ByteString value)

The display name of the package.

string display_name = 2;

Parameter
Name Description
value ByteString

The bytes for displayName to set.

Returns
Type Description
Package.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setName(String value)

public Package.Builder setName(String value)

The name of the package, for example: projects/p1/locations/us-central1/repositories/repo1/packages/pkg1. If the package ID part contains slashes, the slashes are escaped.

string name = 1;

Parameter
Name Description
value String

The name to set.

Returns
Type Description
Package.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Package.Builder setNameBytes(ByteString value)

The name of the package, for example: projects/p1/locations/us-central1/repositories/repo1/packages/pkg1. If the package ID part contains slashes, the slashes are escaped.

string name = 1;

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
Package.Builder

This builder for chaining.

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

public Package.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
Package.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final Package.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Package.Builder
Overrides

setUpdateTime(Timestamp value)

public Package.Builder setUpdateTime(Timestamp value)

The time when the package was last updated. This includes publishing a new version of the package.

.google.protobuf.Timestamp update_time = 6;

Parameter
Name Description
value Timestamp
Returns
Type Description
Package.Builder

setUpdateTime(Timestamp.Builder builderForValue)

public Package.Builder setUpdateTime(Timestamp.Builder builderForValue)

The time when the package was last updated. This includes publishing a new version of the package.

.google.protobuf.Timestamp update_time = 6;

Parameter
Name Description
builderForValue Builder
Returns
Type Description
Package.Builder