Class Resource.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Resource.Builder>
io.grafeas.v1beta1.Resource.Builder
All Implemented Interfaces:
com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, ResourceOrBuilder, Cloneable
Enclosing class:
Resource

public static final class Resource.Builder extends com.google.protobuf.GeneratedMessage.Builder<Resource.Builder> implements ResourceOrBuilder
 An entity that can have metadata. For example, a Docker image.
 
Protobuf type grafeas.v1beta1.Resource
  • 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<Resource.Builder>
    • clear

      public Resource.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<Resource.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<Resource.Builder>
    • getDefaultInstanceForType

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

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

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

      public Resource.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<Resource.Builder>
    • mergeFrom

      public Resource.Builder mergeFrom(Resource other)
    • isInitialized

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

      public Resource.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<Resource.Builder>
      Throws:
      IOException
    • getName

      public String getName()
       The name of the resource. For example, the name of a Docker image -
       "Debian".
       
      string name = 1;
      Specified by:
      getName in interface ResourceOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       The name of the resource. For example, the name of a Docker image -
       "Debian".
       
      string name = 1;
      Specified by:
      getNameBytes in interface ResourceOrBuilder
      Returns:
      The bytes for name.
    • setName

      public Resource.Builder setName(String value)
       The name of the resource. For example, the name of a Docker image -
       "Debian".
       
      string name = 1;
      Parameters:
      value - The name to set.
      Returns:
      This builder for chaining.
    • clearName

      public Resource.Builder clearName()
       The name of the resource. For example, the name of a Docker image -
       "Debian".
       
      string name = 1;
      Returns:
      This builder for chaining.
    • setNameBytes

      public Resource.Builder setNameBytes(com.google.protobuf.ByteString value)
       The name of the resource. For example, the name of a Docker image -
       "Debian".
       
      string name = 1;
      Parameters:
      value - The bytes for name to set.
      Returns:
      This builder for chaining.
    • getUri

      public String getUri()
       Required. The unique URI of the resource. For example,
       `https://gcr.io/project/image@sha256:foo` for a Docker image.
       
      string uri = 2;
      Specified by:
      getUri in interface ResourceOrBuilder
      Returns:
      The uri.
    • getUriBytes

      public com.google.protobuf.ByteString getUriBytes()
       Required. The unique URI of the resource. For example,
       `https://gcr.io/project/image@sha256:foo` for a Docker image.
       
      string uri = 2;
      Specified by:
      getUriBytes in interface ResourceOrBuilder
      Returns:
      The bytes for uri.
    • setUri

      public Resource.Builder setUri(String value)
       Required. The unique URI of the resource. For example,
       `https://gcr.io/project/image@sha256:foo` for a Docker image.
       
      string uri = 2;
      Parameters:
      value - The uri to set.
      Returns:
      This builder for chaining.
    • clearUri

      public Resource.Builder clearUri()
       Required. The unique URI of the resource. For example,
       `https://gcr.io/project/image@sha256:foo` for a Docker image.
       
      string uri = 2;
      Returns:
      This builder for chaining.
    • setUriBytes

      public Resource.Builder setUriBytes(com.google.protobuf.ByteString value)
       Required. The unique URI of the resource. For example,
       `https://gcr.io/project/image@sha256:foo` for a Docker image.
       
      string uri = 2;
      Parameters:
      value - The bytes for uri to set.
      Returns:
      This builder for chaining.
    • hasContentHash

      public boolean hasContentHash()
       The hash of the resource content. For example, the Docker digest.
       
      .grafeas.v1beta1.provenance.Hash content_hash = 3;
      Specified by:
      hasContentHash in interface ResourceOrBuilder
      Returns:
      Whether the contentHash field is set.
    • getContentHash

      public Hash getContentHash()
       The hash of the resource content. For example, the Docker digest.
       
      .grafeas.v1beta1.provenance.Hash content_hash = 3;
      Specified by:
      getContentHash in interface ResourceOrBuilder
      Returns:
      The contentHash.
    • setContentHash

      public Resource.Builder setContentHash(Hash value)
       The hash of the resource content. For example, the Docker digest.
       
      .grafeas.v1beta1.provenance.Hash content_hash = 3;
    • setContentHash

      public Resource.Builder setContentHash(Hash.Builder builderForValue)
       The hash of the resource content. For example, the Docker digest.
       
      .grafeas.v1beta1.provenance.Hash content_hash = 3;
    • mergeContentHash

      public Resource.Builder mergeContentHash(Hash value)
       The hash of the resource content. For example, the Docker digest.
       
      .grafeas.v1beta1.provenance.Hash content_hash = 3;
    • clearContentHash

      public Resource.Builder clearContentHash()
       The hash of the resource content. For example, the Docker digest.
       
      .grafeas.v1beta1.provenance.Hash content_hash = 3;
    • getContentHashBuilder

      public Hash.Builder getContentHashBuilder()
       The hash of the resource content. For example, the Docker digest.
       
      .grafeas.v1beta1.provenance.Hash content_hash = 3;
    • getContentHashOrBuilder

      public HashOrBuilder getContentHashOrBuilder()
       The hash of the resource content. For example, the Docker digest.
       
      .grafeas.v1beta1.provenance.Hash content_hash = 3;
      Specified by:
      getContentHashOrBuilder in interface ResourceOrBuilder