Class Artifact.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderT>
-
- com.google.protobuf.GeneratedMessageV3.Builder<Artifact.Builder>
-
- com.google.cloud.apigeeregistry.v1.Artifact.Builder
-
- All Implemented Interfaces:
ArtifactOrBuilder
,com.google.protobuf.Message.Builder
,com.google.protobuf.MessageLite.Builder
,com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
,Cloneable
- Enclosing class:
- Artifact
public static final class Artifact.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Artifact.Builder> implements ArtifactOrBuilder
Artifacts of resources. Artifacts are unique (single-value) per resource and are used to store metadata that is too large or numerous to be stored directly on the resource. Since artifacts are stored separately from parent resources, they should generally be used for metadata that is needed infrequently, i.e., not for display in primary views of the resource but perhaps displayed or downloaded upon request. The `ListArtifacts` method allows artifacts to be quickly enumerated and checked for presence without downloading their (potentially-large) contents.
Protobuf typegoogle.cloud.apigeeregistry.v1.Artifact
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Artifact.Builder
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
Artifact
build()
Artifact
buildPartial()
Artifact.Builder
clear()
Artifact.Builder
clearContents()
Input only.Artifact.Builder
clearCreateTime()
Output only.Artifact.Builder
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
Artifact.Builder
clearHash()
Output only.Artifact.Builder
clearMimeType()
A content type specifier for the artifact.Artifact.Builder
clearName()
Resource name.Artifact.Builder
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
Artifact.Builder
clearSizeBytes()
Output only.Artifact.Builder
clearUpdateTime()
Output only.Artifact.Builder
clone()
com.google.protobuf.ByteString
getContents()
Input only.com.google.protobuf.Timestamp
getCreateTime()
Output only.com.google.protobuf.Timestamp.Builder
getCreateTimeBuilder()
Output only.com.google.protobuf.TimestampOrBuilder
getCreateTimeOrBuilder()
Output only.Artifact
getDefaultInstanceForType()
static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
com.google.protobuf.Descriptors.Descriptor
getDescriptorForType()
String
getHash()
Output only.com.google.protobuf.ByteString
getHashBytes()
Output only.String
getMimeType()
A content type specifier for the artifact.com.google.protobuf.ByteString
getMimeTypeBytes()
A content type specifier for the artifact.String
getName()
Resource name.com.google.protobuf.ByteString
getNameBytes()
Resource name.int
getSizeBytes()
Output only.com.google.protobuf.Timestamp
getUpdateTime()
Output only.com.google.protobuf.Timestamp.Builder
getUpdateTimeBuilder()
Output only.com.google.protobuf.TimestampOrBuilder
getUpdateTimeOrBuilder()
Output only.boolean
hasCreateTime()
Output only.boolean
hasUpdateTime()
Output only.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()
boolean
isInitialized()
Artifact.Builder
mergeCreateTime(com.google.protobuf.Timestamp value)
Output only.Artifact.Builder
mergeFrom(Artifact other)
Artifact.Builder
mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
Artifact.Builder
mergeFrom(com.google.protobuf.Message other)
Artifact.Builder
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
Artifact.Builder
mergeUpdateTime(com.google.protobuf.Timestamp value)
Output only.Artifact.Builder
setContents(com.google.protobuf.ByteString value)
Input only.Artifact.Builder
setCreateTime(com.google.protobuf.Timestamp value)
Output only.Artifact.Builder
setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue)
Output only.Artifact.Builder
setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
Artifact.Builder
setHash(String value)
Output only.Artifact.Builder
setHashBytes(com.google.protobuf.ByteString value)
Output only.Artifact.Builder
setMimeType(String value)
A content type specifier for the artifact.Artifact.Builder
setMimeTypeBytes(com.google.protobuf.ByteString value)
A content type specifier for the artifact.Artifact.Builder
setName(String value)
Resource name.Artifact.Builder
setNameBytes(com.google.protobuf.ByteString value)
Resource name.Artifact.Builder
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
Artifact.Builder
setSizeBytes(int value)
Output only.Artifact.Builder
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
Artifact.Builder
setUpdateTime(com.google.protobuf.Timestamp value)
Output only.Artifact.Builder
setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue)
Output only.-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3.Builder<Artifact.Builder>
-
clear
public Artifact.Builder clear()
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessageV3.Builder<Artifact.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessageV3.Builder<Artifact.Builder>
-
getDefaultInstanceForType
public Artifact getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
public Artifact build()
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public Artifact buildPartial()
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
clone
public Artifact.Builder clone()
- Specified by:
clone
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clone
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clone
in classcom.google.protobuf.GeneratedMessageV3.Builder<Artifact.Builder>
-
setField
public Artifact.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Artifact.Builder>
-
clearField
public Artifact.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Artifact.Builder>
-
clearOneof
public Artifact.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneof
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearOneof
in classcom.google.protobuf.GeneratedMessageV3.Builder<Artifact.Builder>
-
setRepeatedField
public Artifact.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Artifact.Builder>
-
addRepeatedField
public Artifact.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
addRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Artifact.Builder>
-
mergeFrom
public Artifact.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<Artifact.Builder>
-
mergeFrom
public Artifact.Builder mergeFrom(Artifact other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessageV3.Builder<Artifact.Builder>
-
mergeFrom
public Artifact.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<Artifact.Builder>
- Throws:
IOException
-
getName
public String getName()
Resource name.
string name = 1;
- Specified by:
getName
in interfaceArtifactOrBuilder
- Returns:
- The name.
-
getNameBytes
public com.google.protobuf.ByteString getNameBytes()
Resource name.
string name = 1;
- Specified by:
getNameBytes
in interfaceArtifactOrBuilder
- Returns:
- The bytes for name.
-
setName
public Artifact.Builder setName(String value)
Resource name.
string name = 1;
- Parameters:
value
- The name to set.- Returns:
- This builder for chaining.
-
clearName
public Artifact.Builder clearName()
Resource name.
string name = 1;
- Returns:
- This builder for chaining.
-
setNameBytes
public Artifact.Builder setNameBytes(com.google.protobuf.ByteString value)
Resource name.
string name = 1;
- Parameters:
value
- The bytes for name to set.- Returns:
- This builder for chaining.
-
hasCreateTime
public boolean hasCreateTime()
Output only. Creation timestamp.
.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
- Specified by:
hasCreateTime
in interfaceArtifactOrBuilder
- Returns:
- Whether the createTime field is set.
-
getCreateTime
public com.google.protobuf.Timestamp getCreateTime()
Output only. Creation timestamp.
.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
- Specified by:
getCreateTime
in interfaceArtifactOrBuilder
- Returns:
- The createTime.
-
setCreateTime
public Artifact.Builder setCreateTime(com.google.protobuf.Timestamp value)
Output only. Creation timestamp.
.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
-
setCreateTime
public Artifact.Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue)
Output only. Creation timestamp.
.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
-
mergeCreateTime
public Artifact.Builder mergeCreateTime(com.google.protobuf.Timestamp value)
Output only. Creation timestamp.
.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
-
clearCreateTime
public Artifact.Builder clearCreateTime()
Output only. Creation timestamp.
.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
-
getCreateTimeBuilder
public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder()
Output only. Creation timestamp.
.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
-
getCreateTimeOrBuilder
public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder()
Output only. Creation timestamp.
.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
- Specified by:
getCreateTimeOrBuilder
in interfaceArtifactOrBuilder
-
hasUpdateTime
public boolean hasUpdateTime()
Output only. Last update timestamp.
.google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
- Specified by:
hasUpdateTime
in interfaceArtifactOrBuilder
- Returns:
- Whether the updateTime field is set.
-
getUpdateTime
public com.google.protobuf.Timestamp getUpdateTime()
Output only. Last update timestamp.
.google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
- Specified by:
getUpdateTime
in interfaceArtifactOrBuilder
- Returns:
- The updateTime.
-
setUpdateTime
public Artifact.Builder setUpdateTime(com.google.protobuf.Timestamp value)
Output only. Last update timestamp.
.google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
-
setUpdateTime
public Artifact.Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue)
Output only. Last update timestamp.
.google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
-
mergeUpdateTime
public Artifact.Builder mergeUpdateTime(com.google.protobuf.Timestamp value)
Output only. Last update timestamp.
.google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
-
clearUpdateTime
public Artifact.Builder clearUpdateTime()
Output only. Last update timestamp.
.google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
-
getUpdateTimeBuilder
public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder()
Output only. Last update timestamp.
.google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
-
getUpdateTimeOrBuilder
public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder()
Output only. Last update timestamp.
.google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
- Specified by:
getUpdateTimeOrBuilder
in interfaceArtifactOrBuilder
-
getMimeType
public String getMimeType()
A content type specifier for the artifact. Content type specifiers are Media Types (https://en.wikipedia.org/wiki/Media_type) with a possible "schema" parameter that specifies a schema for the stored information. Content types can specify compression. Currently only GZip compression is supported (indicated with "+gzip").
string mime_type = 4;
- Specified by:
getMimeType
in interfaceArtifactOrBuilder
- Returns:
- The mimeType.
-
getMimeTypeBytes
public com.google.protobuf.ByteString getMimeTypeBytes()
A content type specifier for the artifact. Content type specifiers are Media Types (https://en.wikipedia.org/wiki/Media_type) with a possible "schema" parameter that specifies a schema for the stored information. Content types can specify compression. Currently only GZip compression is supported (indicated with "+gzip").
string mime_type = 4;
- Specified by:
getMimeTypeBytes
in interfaceArtifactOrBuilder
- Returns:
- The bytes for mimeType.
-
setMimeType
public Artifact.Builder setMimeType(String value)
A content type specifier for the artifact. Content type specifiers are Media Types (https://en.wikipedia.org/wiki/Media_type) with a possible "schema" parameter that specifies a schema for the stored information. Content types can specify compression. Currently only GZip compression is supported (indicated with "+gzip").
string mime_type = 4;
- Parameters:
value
- The mimeType to set.- Returns:
- This builder for chaining.
-
clearMimeType
public Artifact.Builder clearMimeType()
A content type specifier for the artifact. Content type specifiers are Media Types (https://en.wikipedia.org/wiki/Media_type) with a possible "schema" parameter that specifies a schema for the stored information. Content types can specify compression. Currently only GZip compression is supported (indicated with "+gzip").
string mime_type = 4;
- Returns:
- This builder for chaining.
-
setMimeTypeBytes
public Artifact.Builder setMimeTypeBytes(com.google.protobuf.ByteString value)
A content type specifier for the artifact. Content type specifiers are Media Types (https://en.wikipedia.org/wiki/Media_type) with a possible "schema" parameter that specifies a schema for the stored information. Content types can specify compression. Currently only GZip compression is supported (indicated with "+gzip").
string mime_type = 4;
- Parameters:
value
- The bytes for mimeType to set.- Returns:
- This builder for chaining.
-
getSizeBytes
public int getSizeBytes()
Output only. The size of the artifact in bytes. If the artifact is gzipped, this is the size of the uncompressed artifact.
int32 size_bytes = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
- Specified by:
getSizeBytes
in interfaceArtifactOrBuilder
- Returns:
- The sizeBytes.
-
setSizeBytes
public Artifact.Builder setSizeBytes(int value)
Output only. The size of the artifact in bytes. If the artifact is gzipped, this is the size of the uncompressed artifact.
int32 size_bytes = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
- Parameters:
value
- The sizeBytes to set.- Returns:
- This builder for chaining.
-
clearSizeBytes
public Artifact.Builder clearSizeBytes()
Output only. The size of the artifact in bytes. If the artifact is gzipped, this is the size of the uncompressed artifact.
int32 size_bytes = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
- Returns:
- This builder for chaining.
-
getHash
public String getHash()
Output only. A SHA-256 hash of the artifact's contents. If the artifact is gzipped, this is the hash of the uncompressed artifact.
string hash = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
- Specified by:
getHash
in interfaceArtifactOrBuilder
- Returns:
- The hash.
-
getHashBytes
public com.google.protobuf.ByteString getHashBytes()
Output only. A SHA-256 hash of the artifact's contents. If the artifact is gzipped, this is the hash of the uncompressed artifact.
string hash = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
- Specified by:
getHashBytes
in interfaceArtifactOrBuilder
- Returns:
- The bytes for hash.
-
setHash
public Artifact.Builder setHash(String value)
Output only. A SHA-256 hash of the artifact's contents. If the artifact is gzipped, this is the hash of the uncompressed artifact.
string hash = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
- Parameters:
value
- The hash to set.- Returns:
- This builder for chaining.
-
clearHash
public Artifact.Builder clearHash()
Output only. A SHA-256 hash of the artifact's contents. If the artifact is gzipped, this is the hash of the uncompressed artifact.
string hash = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
- Returns:
- This builder for chaining.
-
setHashBytes
public Artifact.Builder setHashBytes(com.google.protobuf.ByteString value)
Output only. A SHA-256 hash of the artifact's contents. If the artifact is gzipped, this is the hash of the uncompressed artifact.
string hash = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
- Parameters:
value
- The bytes for hash to set.- Returns:
- This builder for chaining.
-
getContents
public com.google.protobuf.ByteString getContents()
Input only. The contents of the artifact. Provided by API callers when artifacts are created or replaced. To access the contents of an artifact, use GetArtifactContents.
bytes contents = 7 [(.google.api.field_behavior) = INPUT_ONLY];
- Specified by:
getContents
in interfaceArtifactOrBuilder
- Returns:
- The contents.
-
setContents
public Artifact.Builder setContents(com.google.protobuf.ByteString value)
Input only. The contents of the artifact. Provided by API callers when artifacts are created or replaced. To access the contents of an artifact, use GetArtifactContents.
bytes contents = 7 [(.google.api.field_behavior) = INPUT_ONLY];
- Parameters:
value
- The contents to set.- Returns:
- This builder for chaining.
-
clearContents
public Artifact.Builder clearContents()
Input only. The contents of the artifact. Provided by API callers when artifacts are created or replaced. To access the contents of an artifact, use GetArtifactContents.
bytes contents = 7 [(.google.api.field_behavior) = INPUT_ONLY];
- Returns:
- This builder for chaining.
-
setUnknownFields
public final Artifact.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<Artifact.Builder>
-
mergeUnknownFields
public final Artifact.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<Artifact.Builder>
-
-