Class File.Builder (1.31.0)

public static final class File.Builder extends GeneratedMessageV3.Builder<File.Builder> implements FileOrBuilder

Files store content that is potentially associated with Packages or Versions.

Protobuf type google.devtools.artifactregistry.v1.File

Implements

FileOrBuilder

Static Methods

getDescriptor()

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

Methods

addAllHashes(Iterable<? extends Hash> values)

public File.Builder addAllHashes(Iterable<? extends Hash> values)

The hashes of the file content.

repeated .google.devtools.artifactregistry.v1.Hash hashes = 4;

Parameter
NameDescription
valuesIterable<? extends com.google.devtools.artifactregistry.v1.Hash>
Returns
TypeDescription
File.Builder

addHashes(Hash value)

public File.Builder addHashes(Hash value)

The hashes of the file content.

repeated .google.devtools.artifactregistry.v1.Hash hashes = 4;

Parameter
NameDescription
valueHash
Returns
TypeDescription
File.Builder

addHashes(Hash.Builder builderForValue)

public File.Builder addHashes(Hash.Builder builderForValue)

The hashes of the file content.

repeated .google.devtools.artifactregistry.v1.Hash hashes = 4;

Parameter
NameDescription
builderForValueHash.Builder
Returns
TypeDescription
File.Builder

addHashes(int index, Hash value)

public File.Builder addHashes(int index, Hash value)

The hashes of the file content.

repeated .google.devtools.artifactregistry.v1.Hash hashes = 4;

Parameters
NameDescription
indexint
valueHash
Returns
TypeDescription
File.Builder

addHashes(int index, Hash.Builder builderForValue)

public File.Builder addHashes(int index, Hash.Builder builderForValue)

The hashes of the file content.

repeated .google.devtools.artifactregistry.v1.Hash hashes = 4;

Parameters
NameDescription
indexint
builderForValueHash.Builder
Returns
TypeDescription
File.Builder

addHashesBuilder()

public Hash.Builder addHashesBuilder()

The hashes of the file content.

repeated .google.devtools.artifactregistry.v1.Hash hashes = 4;

Returns
TypeDescription
Hash.Builder

addHashesBuilder(int index)

public Hash.Builder addHashesBuilder(int index)

The hashes of the file content.

repeated .google.devtools.artifactregistry.v1.Hash hashes = 4;

Parameter
NameDescription
indexint
Returns
TypeDescription
Hash.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public File build()
Returns
TypeDescription
File

buildPartial()

public File buildPartial()
Returns
TypeDescription
File

clear()

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

clearCreateTime()

public File.Builder clearCreateTime()

Output only. The time when the File was created.

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

Returns
TypeDescription
File.Builder

clearFetchTime()

public File.Builder clearFetchTime()

Output only. The time when the last attempt to refresh the file's data was made. Only set when the repository is remote.

.google.protobuf.Timestamp fetch_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
File.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearHashes()

public File.Builder clearHashes()

The hashes of the file content.

repeated .google.devtools.artifactregistry.v1.Hash hashes = 4;

Returns
TypeDescription
File.Builder

clearName()

public File.Builder clearName()

The name of the file, for example: "projects/p1/locations/us-central1/repositories/repo1/files/a%2Fb%2Fc.txt". If the file ID part contains slashes, they are escaped.

string name = 1;

Returns
TypeDescription
File.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearOwner()

public File.Builder clearOwner()

The name of the Package or Version that owns this file, if any.

string owner = 7;

Returns
TypeDescription
File.Builder

This builder for chaining.

clearSizeBytes()

public File.Builder clearSizeBytes()

The size of the File in bytes.

int64 size_bytes = 3;

Returns
TypeDescription
File.Builder

This builder for chaining.

clearUpdateTime()

public File.Builder clearUpdateTime()

Output only. The time when the File was last updated.

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

Returns
TypeDescription
File.Builder

clone()

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

getCreateTime()

public Timestamp getCreateTime()

Output only. The time when the File was created.

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

Returns
TypeDescription
Timestamp

The createTime.

getCreateTimeBuilder()

public Timestamp.Builder getCreateTimeBuilder()

Output only. The time when the File was created.

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

Returns
TypeDescription
Builder

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

Output only. The time when the File was created.

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

Returns
TypeDescription
TimestampOrBuilder

getDefaultInstanceForType()

public File getDefaultInstanceForType()
Returns
TypeDescription
File

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getFetchTime()

public Timestamp getFetchTime()

Output only. The time when the last attempt to refresh the file's data was made. Only set when the repository is remote.

.google.protobuf.Timestamp fetch_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Timestamp

The fetchTime.

getFetchTimeBuilder()

public Timestamp.Builder getFetchTimeBuilder()

Output only. The time when the last attempt to refresh the file's data was made. Only set when the repository is remote.

.google.protobuf.Timestamp fetch_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Builder

getFetchTimeOrBuilder()

public TimestampOrBuilder getFetchTimeOrBuilder()

Output only. The time when the last attempt to refresh the file's data was made. Only set when the repository is remote.

.google.protobuf.Timestamp fetch_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
TimestampOrBuilder

getHashes(int index)

public Hash getHashes(int index)

The hashes of the file content.

repeated .google.devtools.artifactregistry.v1.Hash hashes = 4;

Parameter
NameDescription
indexint
Returns
TypeDescription
Hash

getHashesBuilder(int index)

public Hash.Builder getHashesBuilder(int index)

The hashes of the file content.

repeated .google.devtools.artifactregistry.v1.Hash hashes = 4;

Parameter
NameDescription
indexint
Returns
TypeDescription
Hash.Builder

getHashesBuilderList()

public List<Hash.Builder> getHashesBuilderList()

The hashes of the file content.

repeated .google.devtools.artifactregistry.v1.Hash hashes = 4;

Returns
TypeDescription
List<Builder>

getHashesCount()

public int getHashesCount()

The hashes of the file content.

repeated .google.devtools.artifactregistry.v1.Hash hashes = 4;

Returns
TypeDescription
int

getHashesList()

public List<Hash> getHashesList()

The hashes of the file content.

repeated .google.devtools.artifactregistry.v1.Hash hashes = 4;

Returns
TypeDescription
List<Hash>

getHashesOrBuilder(int index)

public HashOrBuilder getHashesOrBuilder(int index)

The hashes of the file content.

repeated .google.devtools.artifactregistry.v1.Hash hashes = 4;

Parameter
NameDescription
indexint
Returns
TypeDescription
HashOrBuilder

getHashesOrBuilderList()

public List<? extends HashOrBuilder> getHashesOrBuilderList()

The hashes of the file content.

repeated .google.devtools.artifactregistry.v1.Hash hashes = 4;

Returns
TypeDescription
List<? extends com.google.devtools.artifactregistry.v1.HashOrBuilder>

getName()

public String getName()

The name of the file, for example: "projects/p1/locations/us-central1/repositories/repo1/files/a%2Fb%2Fc.txt". If the file ID part contains slashes, they are escaped.

string name = 1;

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

The name of the file, for example: "projects/p1/locations/us-central1/repositories/repo1/files/a%2Fb%2Fc.txt". If the file ID part contains slashes, they are escaped.

string name = 1;

Returns
TypeDescription
ByteString

The bytes for name.

getOwner()

public String getOwner()

The name of the Package or Version that owns this file, if any.

string owner = 7;

Returns
TypeDescription
String

The owner.

getOwnerBytes()

public ByteString getOwnerBytes()

The name of the Package or Version that owns this file, if any.

string owner = 7;

Returns
TypeDescription
ByteString

The bytes for owner.

getSizeBytes()

public long getSizeBytes()

The size of the File in bytes.

int64 size_bytes = 3;

Returns
TypeDescription
long

The sizeBytes.

getUpdateTime()

public Timestamp getUpdateTime()

Output only. The time when the File was last updated.

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

Returns
TypeDescription
Timestamp

The updateTime.

getUpdateTimeBuilder()

public Timestamp.Builder getUpdateTimeBuilder()

Output only. The time when the File was last updated.

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

Returns
TypeDescription
Builder

getUpdateTimeOrBuilder()

public TimestampOrBuilder getUpdateTimeOrBuilder()

Output only. The time when the File was last updated.

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

Returns
TypeDescription
TimestampOrBuilder

hasCreateTime()

public boolean hasCreateTime()

Output only. The time when the File was created.

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

Returns
TypeDescription
boolean

Whether the createTime field is set.

hasFetchTime()

public boolean hasFetchTime()

Output only. The time when the last attempt to refresh the file's data was made. Only set when the repository is remote.

.google.protobuf.Timestamp fetch_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
boolean

Whether the fetchTime field is set.

hasUpdateTime()

public boolean hasUpdateTime()

Output only. The time when the File was last updated.

.google.protobuf.Timestamp update_time = 6 [(.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 File.Builder mergeCreateTime(Timestamp value)

Output only. The time when the File was created.

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

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
File.Builder

mergeFetchTime(Timestamp value)

public File.Builder mergeFetchTime(Timestamp value)

Output only. The time when the last attempt to refresh the file's data was made. Only set when the repository is remote.

.google.protobuf.Timestamp fetch_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
File.Builder

mergeFrom(File other)

public File.Builder mergeFrom(File other)
Parameter
NameDescription
otherFile
Returns
TypeDescription
File.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

mergeUpdateTime(Timestamp value)

public File.Builder mergeUpdateTime(Timestamp value)

Output only. The time when the File was last updated.

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

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
File.Builder

removeHashes(int index)

public File.Builder removeHashes(int index)

The hashes of the file content.

repeated .google.devtools.artifactregistry.v1.Hash hashes = 4;

Parameter
NameDescription
indexint
Returns
TypeDescription
File.Builder

setCreateTime(Timestamp value)

public File.Builder setCreateTime(Timestamp value)

Output only. The time when the File was created.

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

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
File.Builder

setCreateTime(Timestamp.Builder builderForValue)

public File.Builder setCreateTime(Timestamp.Builder builderForValue)

Output only. The time when the File was created.

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

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
File.Builder

setFetchTime(Timestamp value)

public File.Builder setFetchTime(Timestamp value)

Output only. The time when the last attempt to refresh the file's data was made. Only set when the repository is remote.

.google.protobuf.Timestamp fetch_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
File.Builder

setFetchTime(Timestamp.Builder builderForValue)

public File.Builder setFetchTime(Timestamp.Builder builderForValue)

Output only. The time when the last attempt to refresh the file's data was made. Only set when the repository is remote.

.google.protobuf.Timestamp fetch_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
File.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setHashes(int index, Hash value)

public File.Builder setHashes(int index, Hash value)

The hashes of the file content.

repeated .google.devtools.artifactregistry.v1.Hash hashes = 4;

Parameters
NameDescription
indexint
valueHash
Returns
TypeDescription
File.Builder

setHashes(int index, Hash.Builder builderForValue)

public File.Builder setHashes(int index, Hash.Builder builderForValue)

The hashes of the file content.

repeated .google.devtools.artifactregistry.v1.Hash hashes = 4;

Parameters
NameDescription
indexint
builderForValueHash.Builder
Returns
TypeDescription
File.Builder

setName(String value)

public File.Builder setName(String value)

The name of the file, for example: "projects/p1/locations/us-central1/repositories/repo1/files/a%2Fb%2Fc.txt". If the file ID part contains slashes, they are escaped.

string name = 1;

Parameter
NameDescription
valueString

The name to set.

Returns
TypeDescription
File.Builder

This builder for chaining.

setNameBytes(ByteString value)

public File.Builder setNameBytes(ByteString value)

The name of the file, for example: "projects/p1/locations/us-central1/repositories/repo1/files/a%2Fb%2Fc.txt". If the file ID part contains slashes, they are escaped.

string name = 1;

Parameter
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
File.Builder

This builder for chaining.

setOwner(String value)

public File.Builder setOwner(String value)

The name of the Package or Version that owns this file, if any.

string owner = 7;

Parameter
NameDescription
valueString

The owner to set.

Returns
TypeDescription
File.Builder

This builder for chaining.

setOwnerBytes(ByteString value)

public File.Builder setOwnerBytes(ByteString value)

The name of the Package or Version that owns this file, if any.

string owner = 7;

Parameter
NameDescription
valueByteString

The bytes for owner to set.

Returns
TypeDescription
File.Builder

This builder for chaining.

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

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

setSizeBytes(long value)

public File.Builder setSizeBytes(long value)

The size of the File in bytes.

int64 size_bytes = 3;

Parameter
NameDescription
valuelong

The sizeBytes to set.

Returns
TypeDescription
File.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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

setUpdateTime(Timestamp value)

public File.Builder setUpdateTime(Timestamp value)

Output only. The time when the File was last updated.

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

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
File.Builder

setUpdateTime(Timestamp.Builder builderForValue)

public File.Builder setUpdateTime(Timestamp.Builder builderForValue)

Output only. The time when the File was last updated.

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

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
File.Builder