Class File.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<File.Builder>
com.google.devtools.artifactregistry.v1.File.Builder
- All Implemented Interfaces:
FileOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- File
public static final class File.Builder
extends com.google.protobuf.GeneratedMessage.Builder<File.Builder>
implements FileOrBuilder
Files store content that is potentially associated with Packages or Versions.Protobuf type
google.devtools.artifactregistry.v1.File-
Method Summary
Modifier and TypeMethodDescriptionaddAllHashes(Iterable<? extends Hash> values) The hashes of the file content.The hashes of the file content.addHashes(int index, Hash.Builder builderForValue) The hashes of the file content.The hashes of the file content.addHashes(Hash.Builder builderForValue) The hashes of the file content.The hashes of the file content.addHashesBuilder(int index) The hashes of the file content.build()clear()Output only.Output only.The hashes of the file content.The name of the file, for example: `projects/p1/locations/us-central1/repositories/repo1/files/a%2Fb%2Fc.txt`.The name of the Package or Version that owns this file, if any.The size of the File in bytes.Output only.booleanOptional.Deprecated.intOptional.Optional.getAnnotationsOrDefault(String key, String defaultValue) Optional.Optional.com.google.protobuf.TimestampOutput only.com.google.protobuf.Timestamp.BuilderOutput only.com.google.protobuf.TimestampOrBuilderOutput only.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.Descriptorcom.google.protobuf.TimestampOutput only.com.google.protobuf.Timestamp.BuilderOutput only.com.google.protobuf.TimestampOrBuilderOutput only.getHashes(int index) The hashes of the file content.getHashesBuilder(int index) The hashes of the file content.The hashes of the file content.intThe hashes of the file content.The hashes of the file content.getHashesOrBuilder(int index) The hashes of the file content.List<? extends HashOrBuilder>The hashes of the file content.Deprecated.getName()The name of the file, for example: `projects/p1/locations/us-central1/repositories/repo1/files/a%2Fb%2Fc.txt`.com.google.protobuf.ByteStringThe name of the file, for example: `projects/p1/locations/us-central1/repositories/repo1/files/a%2Fb%2Fc.txt`.getOwner()The name of the Package or Version that owns this file, if any.com.google.protobuf.ByteStringThe name of the Package or Version that owns this file, if any.longThe size of the File in bytes.com.google.protobuf.TimestampOutput only.com.google.protobuf.Timestamp.BuilderOutput only.com.google.protobuf.TimestampOrBuilderOutput only.booleanOutput only.booleanOutput only.booleanOutput only.protected com.google.protobuf.GeneratedMessage.FieldAccessorTableprotected com.google.protobuf.MapFieldReflectionAccessorinternalGetMapFieldReflection(int number) protected com.google.protobuf.MapFieldReflectionAccessorinternalGetMutableMapFieldReflection(int number) final booleanmergeCreateTime(com.google.protobuf.Timestamp value) Output only.mergeFetchTime(com.google.protobuf.Timestamp value) Output only.mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) mergeUpdateTime(com.google.protobuf.Timestamp value) Output only.putAllAnnotations(Map<String, String> values) Optional.putAnnotations(String key, String value) Optional.removeAnnotations(String key) Optional.removeHashes(int index) The hashes of the file content.setCreateTime(com.google.protobuf.Timestamp value) Output only.setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) Output only.setFetchTime(com.google.protobuf.Timestamp value) Output only.setFetchTime(com.google.protobuf.Timestamp.Builder builderForValue) Output only.The hashes of the file content.setHashes(int index, Hash.Builder builderForValue) The hashes of the file content.The name of the file, for example: `projects/p1/locations/us-central1/repositories/repo1/files/a%2Fb%2Fc.txt`.setNameBytes(com.google.protobuf.ByteString value) The name of the file, for example: `projects/p1/locations/us-central1/repositories/repo1/files/a%2Fb%2Fc.txt`.The name of the Package or Version that owns this file, if any.setOwnerBytes(com.google.protobuf.ByteString value) The name of the Package or Version that owns this file, if any.setSizeBytes(long value) The size of the File in bytes.setUpdateTime(com.google.protobuf.Timestamp value) Output only.setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) Output only.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetMapFieldReflection
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number) - Overrides:
internalGetMapFieldReflectionin classcom.google.protobuf.GeneratedMessage.Builder<File.Builder>
-
internalGetMutableMapFieldReflection
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number) - Overrides:
internalGetMutableMapFieldReflectionin classcom.google.protobuf.GeneratedMessage.Builder<File.Builder>
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<File.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<File.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<File.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<File.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<File.Builder>
-
mergeFrom
public File.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<File.Builder>- Throws:
IOException
-
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;- Specified by:
getNamein interfaceFileOrBuilder- Returns:
- The name.
-
getNameBytes
public com.google.protobuf.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;- Specified by:
getNameBytesin interfaceFileOrBuilder- Returns:
- The bytes for name.
-
setName
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;- Parameters:
value- The name to set.- Returns:
- This builder for chaining.
-
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:
- This builder for chaining.
-
setNameBytes
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;- Parameters:
value- The bytes for name to set.- Returns:
- This builder for chaining.
-
getSizeBytes
public long getSizeBytes()The size of the File in bytes.
int64 size_bytes = 3;- Specified by:
getSizeBytesin interfaceFileOrBuilder- Returns:
- The sizeBytes.
-
setSizeBytes
The size of the File in bytes.
int64 size_bytes = 3;- Parameters:
value- The sizeBytes to set.- Returns:
- This builder for chaining.
-
clearSizeBytes
The size of the File in bytes.
int64 size_bytes = 3;- Returns:
- This builder for chaining.
-
getHashesList
The hashes of the file content.
repeated .google.devtools.artifactregistry.v1.Hash hashes = 4;- Specified by:
getHashesListin interfaceFileOrBuilder
-
getHashesCount
public int getHashesCount()The hashes of the file content.
repeated .google.devtools.artifactregistry.v1.Hash hashes = 4;- Specified by:
getHashesCountin interfaceFileOrBuilder
-
getHashes
The hashes of the file content.
repeated .google.devtools.artifactregistry.v1.Hash hashes = 4;- Specified by:
getHashesin interfaceFileOrBuilder
-
setHashes
The hashes of the file content.
repeated .google.devtools.artifactregistry.v1.Hash hashes = 4; -
setHashes
The hashes of the file content.
repeated .google.devtools.artifactregistry.v1.Hash hashes = 4; -
addHashes
The hashes of the file content.
repeated .google.devtools.artifactregistry.v1.Hash hashes = 4; -
addHashes
The hashes of the file content.
repeated .google.devtools.artifactregistry.v1.Hash hashes = 4; -
addHashes
The hashes of the file content.
repeated .google.devtools.artifactregistry.v1.Hash hashes = 4; -
addHashes
The hashes of the file content.
repeated .google.devtools.artifactregistry.v1.Hash hashes = 4; -
addAllHashes
The hashes of the file content.
repeated .google.devtools.artifactregistry.v1.Hash hashes = 4; -
clearHashes
The hashes of the file content.
repeated .google.devtools.artifactregistry.v1.Hash hashes = 4; -
removeHashes
The hashes of the file content.
repeated .google.devtools.artifactregistry.v1.Hash hashes = 4; -
getHashesBuilder
The hashes of the file content.
repeated .google.devtools.artifactregistry.v1.Hash hashes = 4; -
getHashesOrBuilder
The hashes of the file content.
repeated .google.devtools.artifactregistry.v1.Hash hashes = 4;- Specified by:
getHashesOrBuilderin interfaceFileOrBuilder
-
getHashesOrBuilderList
The hashes of the file content.
repeated .google.devtools.artifactregistry.v1.Hash hashes = 4;- Specified by:
getHashesOrBuilderListin interfaceFileOrBuilder
-
addHashesBuilder
The hashes of the file content.
repeated .google.devtools.artifactregistry.v1.Hash hashes = 4; -
addHashesBuilder
The hashes of the file content.
repeated .google.devtools.artifactregistry.v1.Hash hashes = 4; -
getHashesBuilderList
The hashes of the file content.
repeated .google.devtools.artifactregistry.v1.Hash hashes = 4; -
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];- Specified by:
hasCreateTimein interfaceFileOrBuilder- Returns:
- Whether the createTime field is set.
-
getCreateTime
public com.google.protobuf.Timestamp getCreateTime()Output only. The time when the File was created.
.google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getCreateTimein interfaceFileOrBuilder- Returns:
- The createTime.
-
setCreateTime
Output only. The time when the File was created.
.google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
setCreateTime
Output only. The time when the File was created.
.google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
mergeCreateTime
Output only. The time when the File was created.
.google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
clearCreateTime
Output only. The time when the File was created.
.google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
getCreateTimeBuilder
public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder()Output only. The time when the File was created.
.google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
getCreateTimeOrBuilder
public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder()Output only. The time when the File was created.
.google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getCreateTimeOrBuilderin interfaceFileOrBuilder
-
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];- Specified by:
hasUpdateTimein interfaceFileOrBuilder- Returns:
- Whether the updateTime field is set.
-
getUpdateTime
public com.google.protobuf.Timestamp getUpdateTime()Output only. The time when the File was last updated.
.google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getUpdateTimein interfaceFileOrBuilder- Returns:
- The updateTime.
-
setUpdateTime
Output only. The time when the File was last updated.
.google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
setUpdateTime
Output only. The time when the File was last updated.
.google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
mergeUpdateTime
Output only. The time when the File was last updated.
.google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
clearUpdateTime
Output only. The time when the File was last updated.
.google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
getUpdateTimeBuilder
public com.google.protobuf.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]; -
getUpdateTimeOrBuilder
public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder()Output only. The time when the File was last updated.
.google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getUpdateTimeOrBuilderin interfaceFileOrBuilder
-
getOwner
The name of the Package or Version that owns this file, if any.
string owner = 7;- Specified by:
getOwnerin interfaceFileOrBuilder- Returns:
- The owner.
-
getOwnerBytes
public com.google.protobuf.ByteString getOwnerBytes()The name of the Package or Version that owns this file, if any.
string owner = 7;- Specified by:
getOwnerBytesin interfaceFileOrBuilder- Returns:
- The bytes for owner.
-
setOwner
The name of the Package or Version that owns this file, if any.
string owner = 7;- Parameters:
value- The owner to set.- Returns:
- This builder for chaining.
-
clearOwner
The name of the Package or Version that owns this file, if any.
string owner = 7;- Returns:
- This builder for chaining.
-
setOwnerBytes
The name of the Package or Version that owns this file, if any.
string owner = 7;- Parameters:
value- The bytes for owner to set.- Returns:
- This builder for chaining.
-
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];- Specified by:
hasFetchTimein interfaceFileOrBuilder- Returns:
- Whether the fetchTime field is set.
-
getFetchTime
public com.google.protobuf.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];- Specified by:
getFetchTimein interfaceFileOrBuilder- Returns:
- The fetchTime.
-
setFetchTime
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]; -
setFetchTime
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]; -
mergeFetchTime
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]; -
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]; -
getFetchTimeBuilder
public com.google.protobuf.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]; -
getFetchTimeOrBuilder
public com.google.protobuf.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];- Specified by:
getFetchTimeOrBuilderin interfaceFileOrBuilder
-
getAnnotationsCount
public int getAnnotationsCount()Description copied from interface:FileOrBuilderOptional. Client specified annotations.
map<string, string> annotations = 9 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getAnnotationsCountin interfaceFileOrBuilder
-
containsAnnotations
Optional. Client specified annotations.
map<string, string> annotations = 9 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
containsAnnotationsin interfaceFileOrBuilder
-
getAnnotations
Deprecated.UsegetAnnotationsMap()instead.- Specified by:
getAnnotationsin interfaceFileOrBuilder
-
getAnnotationsMap
Optional. Client specified annotations.
map<string, string> annotations = 9 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getAnnotationsMapin interfaceFileOrBuilder
-
getAnnotationsOrDefault
Optional. Client specified annotations.
map<string, string> annotations = 9 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getAnnotationsOrDefaultin interfaceFileOrBuilder
-
getAnnotationsOrThrow
Optional. Client specified annotations.
map<string, string> annotations = 9 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getAnnotationsOrThrowin interfaceFileOrBuilder
-
clearAnnotations
-
removeAnnotations
Optional. Client specified annotations.
map<string, string> annotations = 9 [(.google.api.field_behavior) = OPTIONAL]; -
getMutableAnnotations
Deprecated.Use alternate mutation accessors instead. -
putAnnotations
Optional. Client specified annotations.
map<string, string> annotations = 9 [(.google.api.field_behavior) = OPTIONAL]; -
putAllAnnotations
Optional. Client specified annotations.
map<string, string> annotations = 9 [(.google.api.field_behavior) = OPTIONAL];
-