Class Artifact.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.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.GeneratedMessage.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 type google.cloud.apigeeregistry.v1.Artifact
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<Artifact.Builder>
    • clear

      public Artifact.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<Artifact.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<Artifact.Builder>
    • getDefaultInstanceForType

      public Artifact getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public Artifact build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public Artifact buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public Artifact.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Artifact.Builder>
    • mergeFrom

      public Artifact.Builder mergeFrom(Artifact other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<Artifact.Builder>
    • mergeFrom

      public Artifact.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Artifact.Builder>
      Throws:
      IOException
    • getName

      public String getName()
       Resource name.
       
      string name = 1;
      Specified by:
      getName in interface ArtifactOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       Resource name.
       
      string name = 1;
      Specified by:
      getNameBytes in interface ArtifactOrBuilder
      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 interface ArtifactOrBuilder
      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 interface ArtifactOrBuilder
      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 interface ArtifactOrBuilder
    • 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 interface ArtifactOrBuilder
      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 interface ArtifactOrBuilder
      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 interface ArtifactOrBuilder
    • 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 interface ArtifactOrBuilder
      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 interface ArtifactOrBuilder
      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 interface ArtifactOrBuilder
      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 interface ArtifactOrBuilder
      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 interface ArtifactOrBuilder
      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 interface ArtifactOrBuilder
      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.