Class NpmPackage.Builder (1.12.0)

public static final class NpmPackage.Builder extends GeneratedMessageV3.Builder<NpmPackage.Builder> implements NpmPackageOrBuilder

NpmPackage represents an npm artifact.

Protobuf type google.devtools.artifactregistry.v1.NpmPackage

Implements

NpmPackageOrBuilder

Static Methods

getDescriptor()

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

Methods

addAllTags(Iterable<String> values)

public NpmPackage.Builder addAllTags(Iterable<String> values)

Tags attached to this package.

repeated string tags = 5;

Parameter
NameDescription
valuesIterable<String>

The tags to add.

Returns
TypeDescription
NpmPackage.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

addTags(String value)

public NpmPackage.Builder addTags(String value)

Tags attached to this package.

repeated string tags = 5;

Parameter
NameDescription
valueString

The tags to add.

Returns
TypeDescription
NpmPackage.Builder

This builder for chaining.

addTagsBytes(ByteString value)

public NpmPackage.Builder addTagsBytes(ByteString value)

Tags attached to this package.

repeated string tags = 5;

Parameter
NameDescription
valueByteString

The bytes of the tags to add.

Returns
TypeDescription
NpmPackage.Builder

This builder for chaining.

build()

public NpmPackage build()
Returns
TypeDescription
NpmPackage

buildPartial()

public NpmPackage buildPartial()
Returns
TypeDescription
NpmPackage

clear()

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

clearCreateTime()

public NpmPackage.Builder clearCreateTime()

Output only. Time the package was created.

.google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
NpmPackage.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearName()

public NpmPackage.Builder clearName()

Required. registry_location, project_id, repository_name and npm_package forms a unique package For example, "projects/test-project/locations/us-west4/repositories/test-repo/npmPackages/ npm_test:1.0.0", where "us-west4" is the registry_location, "test-project" is the project_id, "test-repo" is the repository_name and npm_test:1.0.0" is the npm package.

string name = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
NpmPackage.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearPackageName()

public NpmPackage.Builder clearPackageName()

Package for the artifact.

string package_name = 3;

Returns
TypeDescription
NpmPackage.Builder

This builder for chaining.

clearTags()

public NpmPackage.Builder clearTags()

Tags attached to this package.

repeated string tags = 5;

Returns
TypeDescription
NpmPackage.Builder

This builder for chaining.

clearUpdateTime()

public NpmPackage.Builder clearUpdateTime()

Output only. Time the package was updated.

.google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
NpmPackage.Builder

clearVersion()

public NpmPackage.Builder clearVersion()

Version of this package.

string version = 4;

Returns
TypeDescription
NpmPackage.Builder

This builder for chaining.

clone()

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

getCreateTime()

public Timestamp getCreateTime()

Output only. Time the package was created.

.google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Timestamp

The createTime.

getCreateTimeBuilder()

public Timestamp.Builder getCreateTimeBuilder()

Output only. Time the package was created.

.google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Builder

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

Output only. Time the package was created.

.google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
TimestampOrBuilder

getDefaultInstanceForType()

public NpmPackage getDefaultInstanceForType()
Returns
TypeDescription
NpmPackage

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getName()

public String getName()

Required. registry_location, project_id, repository_name and npm_package forms a unique package For example, "projects/test-project/locations/us-west4/repositories/test-repo/npmPackages/ npm_test:1.0.0", where "us-west4" is the registry_location, "test-project" is the project_id, "test-repo" is the repository_name and npm_test:1.0.0" is the npm package.

string name = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

Required. registry_location, project_id, repository_name and npm_package forms a unique package For example, "projects/test-project/locations/us-west4/repositories/test-repo/npmPackages/ npm_test:1.0.0", where "us-west4" is the registry_location, "test-project" is the project_id, "test-repo" is the repository_name and npm_test:1.0.0" is the npm package.

string name = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
ByteString

The bytes for name.

getPackageName()

public String getPackageName()

Package for the artifact.

string package_name = 3;

Returns
TypeDescription
String

The packageName.

getPackageNameBytes()

public ByteString getPackageNameBytes()

Package for the artifact.

string package_name = 3;

Returns
TypeDescription
ByteString

The bytes for packageName.

getTags(int index)

public String getTags(int index)

Tags attached to this package.

repeated string tags = 5;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The tags at the given index.

getTagsBytes(int index)

public ByteString getTagsBytes(int index)

Tags attached to this package.

repeated string tags = 5;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the tags at the given index.

getTagsCount()

public int getTagsCount()

Tags attached to this package.

repeated string tags = 5;

Returns
TypeDescription
int

The count of tags.

getTagsList()

public ProtocolStringList getTagsList()

Tags attached to this package.

repeated string tags = 5;

Returns
TypeDescription
ProtocolStringList

A list containing the tags.

getUpdateTime()

public Timestamp getUpdateTime()

Output only. Time the package was updated.

.google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Timestamp

The updateTime.

getUpdateTimeBuilder()

public Timestamp.Builder getUpdateTimeBuilder()

Output only. Time the package was updated.

.google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Builder

getUpdateTimeOrBuilder()

public TimestampOrBuilder getUpdateTimeOrBuilder()

Output only. Time the package was updated.

.google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
TimestampOrBuilder

getVersion()

public String getVersion()

Version of this package.

string version = 4;

Returns
TypeDescription
String

The version.

getVersionBytes()

public ByteString getVersionBytes()

Version of this package.

string version = 4;

Returns
TypeDescription
ByteString

The bytes for version.

hasCreateTime()

public boolean hasCreateTime()

Output only. Time the package was created.

.google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
boolean

Whether the createTime field is set.

hasUpdateTime()

public boolean hasUpdateTime()

Output only. Time the package was updated.

.google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

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 NpmPackage.Builder mergeCreateTime(Timestamp value)

Output only. Time the package was created.

.google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
NpmPackage.Builder

mergeFrom(NpmPackage other)

public NpmPackage.Builder mergeFrom(NpmPackage other)
Parameter
NameDescription
otherNpmPackage
Returns
TypeDescription
NpmPackage.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

mergeUpdateTime(Timestamp value)

public NpmPackage.Builder mergeUpdateTime(Timestamp value)

Output only. Time the package was updated.

.google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
NpmPackage.Builder

setCreateTime(Timestamp value)

public NpmPackage.Builder setCreateTime(Timestamp value)

Output only. Time the package was created.

.google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
NpmPackage.Builder

setCreateTime(Timestamp.Builder builderForValue)

public NpmPackage.Builder setCreateTime(Timestamp.Builder builderForValue)

Output only. Time the package was created.

.google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
NpmPackage.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setName(String value)

public NpmPackage.Builder setName(String value)

Required. registry_location, project_id, repository_name and npm_package forms a unique package For example, "projects/test-project/locations/us-west4/repositories/test-repo/npmPackages/ npm_test:1.0.0", where "us-west4" is the registry_location, "test-project" is the project_id, "test-repo" is the repository_name and npm_test:1.0.0" is the npm package.

string name = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valueString

The name to set.

Returns
TypeDescription
NpmPackage.Builder

This builder for chaining.

setNameBytes(ByteString value)

public NpmPackage.Builder setNameBytes(ByteString value)

Required. registry_location, project_id, repository_name and npm_package forms a unique package For example, "projects/test-project/locations/us-west4/repositories/test-repo/npmPackages/ npm_test:1.0.0", where "us-west4" is the registry_location, "test-project" is the project_id, "test-repo" is the repository_name and npm_test:1.0.0" is the npm package.

string name = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
NpmPackage.Builder

This builder for chaining.

setPackageName(String value)

public NpmPackage.Builder setPackageName(String value)

Package for the artifact.

string package_name = 3;

Parameter
NameDescription
valueString

The packageName to set.

Returns
TypeDescription
NpmPackage.Builder

This builder for chaining.

setPackageNameBytes(ByteString value)

public NpmPackage.Builder setPackageNameBytes(ByteString value)

Package for the artifact.

string package_name = 3;

Parameter
NameDescription
valueByteString

The bytes for packageName to set.

Returns
TypeDescription
NpmPackage.Builder

This builder for chaining.

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

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

setTags(int index, String value)

public NpmPackage.Builder setTags(int index, String value)

Tags attached to this package.

repeated string tags = 5;

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The tags to set.

Returns
TypeDescription
NpmPackage.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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

setUpdateTime(Timestamp value)

public NpmPackage.Builder setUpdateTime(Timestamp value)

Output only. Time the package was updated.

.google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
NpmPackage.Builder

setUpdateTime(Timestamp.Builder builderForValue)

public NpmPackage.Builder setUpdateTime(Timestamp.Builder builderForValue)

Output only. Time the package was updated.

.google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
NpmPackage.Builder

setVersion(String value)

public NpmPackage.Builder setVersion(String value)

Version of this package.

string version = 4;

Parameter
NameDescription
valueString

The version to set.

Returns
TypeDescription
NpmPackage.Builder

This builder for chaining.

setVersionBytes(ByteString value)

public NpmPackage.Builder setVersionBytes(ByteString value)

Version of this package.

string version = 4;

Parameter
NameDescription
valueByteString

The bytes for version to set.

Returns
TypeDescription
NpmPackage.Builder

This builder for chaining.