Class Resource.Builder

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

public static final class Resource.Builder extends com.google.protobuf.GeneratedMessage.Builder<Resource.Builder> implements ResourceOrBuilder
 A representation of a Google Cloud resource.
 
Protobuf type google.cloud.asset.v1.Resource
  • Method Summary

    Modifier and Type
    Method
    Description
     
     
     
    The content of the resource, in which some sensitive fields are removed and may not be present.
    The URL of the discovery document containing the resource's JSON schema.
    The JSON schema name listed in the discovery document.
    The location of the resource in Google Cloud, such as its zone and region.
    The full name of the immediate parent of this resource.
    The REST URL for accessing the resource.
    The API version.
    com.google.protobuf.Struct
    The content of the resource, in which some sensitive fields are removed and may not be present.
    com.google.protobuf.Struct.Builder
    The content of the resource, in which some sensitive fields are removed and may not be present.
    com.google.protobuf.StructOrBuilder
    The content of the resource, in which some sensitive fields are removed and may not be present.
     
    static final com.google.protobuf.Descriptors.Descriptor
     
    com.google.protobuf.Descriptors.Descriptor
     
    The URL of the discovery document containing the resource's JSON schema.
    com.google.protobuf.ByteString
    The URL of the discovery document containing the resource's JSON schema.
    The JSON schema name listed in the discovery document.
    com.google.protobuf.ByteString
    The JSON schema name listed in the discovery document.
    The location of the resource in Google Cloud, such as its zone and region.
    com.google.protobuf.ByteString
    The location of the resource in Google Cloud, such as its zone and region.
    The full name of the immediate parent of this resource.
    com.google.protobuf.ByteString
    The full name of the immediate parent of this resource.
    The REST URL for accessing the resource.
    com.google.protobuf.ByteString
    The REST URL for accessing the resource.
    The API version.
    com.google.protobuf.ByteString
    The API version.
    boolean
    The content of the resource, in which some sensitive fields are removed and may not be present.
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
     
    final boolean
     
    mergeData(com.google.protobuf.Struct value)
    The content of the resource, in which some sensitive fields are removed and may not be present.
     
    mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    mergeFrom(com.google.protobuf.Message other)
     
    setData(com.google.protobuf.Struct value)
    The content of the resource, in which some sensitive fields are removed and may not be present.
    setData(com.google.protobuf.Struct.Builder builderForValue)
    The content of the resource, in which some sensitive fields are removed and may not be present.
    The URL of the discovery document containing the resource's JSON schema.
    setDiscoveryDocumentUriBytes(com.google.protobuf.ByteString value)
    The URL of the discovery document containing the resource's JSON schema.
    The JSON schema name listed in the discovery document.
    setDiscoveryNameBytes(com.google.protobuf.ByteString value)
    The JSON schema name listed in the discovery document.
    The location of the resource in Google Cloud, such as its zone and region.
    setLocationBytes(com.google.protobuf.ByteString value)
    The location of the resource in Google Cloud, such as its zone and region.
    The full name of the immediate parent of this resource.
    setParentBytes(com.google.protobuf.ByteString value)
    The full name of the immediate parent of this resource.
    The REST URL for accessing the resource.
    setResourceUrlBytes(com.google.protobuf.ByteString value)
    The REST URL for accessing the resource.
    The API version.
    setVersionBytes(com.google.protobuf.ByteString value)
    The API version.

    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, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, 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

    Methods inherited from interface com.google.protobuf.Message.Builder

    mergeDelimitedFrom, mergeDelimitedFrom

    Methods inherited from interface com.google.protobuf.MessageLite.Builder

    mergeFrom

    Methods 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()
    • 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
    • getVersion

      public String getVersion()
       The API version. Example: `v1`
       
      string version = 1;
      Specified by:
      getVersion in interface ResourceOrBuilder
      Returns:
      The version.
    • getVersionBytes

      public com.google.protobuf.ByteString getVersionBytes()
       The API version. Example: `v1`
       
      string version = 1;
      Specified by:
      getVersionBytes in interface ResourceOrBuilder
      Returns:
      The bytes for version.
    • setVersion

      public Resource.Builder setVersion(String value)
       The API version. Example: `v1`
       
      string version = 1;
      Parameters:
      value - The version to set.
      Returns:
      This builder for chaining.
    • clearVersion

      public Resource.Builder clearVersion()
       The API version. Example: `v1`
       
      string version = 1;
      Returns:
      This builder for chaining.
    • setVersionBytes

      public Resource.Builder setVersionBytes(com.google.protobuf.ByteString value)
       The API version. Example: `v1`
       
      string version = 1;
      Parameters:
      value - The bytes for version to set.
      Returns:
      This builder for chaining.
    • getDiscoveryDocumentUri

      public String getDiscoveryDocumentUri()
       The URL of the discovery document containing the resource's JSON schema.
       Example:
       `https://www.googleapis.com/discovery/v1/apis/compute/v1/rest`
      
       This value is unspecified for resources that do not have an API based on a
       discovery document, such as Cloud Bigtable.
       
      string discovery_document_uri = 2;
      Specified by:
      getDiscoveryDocumentUri in interface ResourceOrBuilder
      Returns:
      The discoveryDocumentUri.
    • getDiscoveryDocumentUriBytes

      public com.google.protobuf.ByteString getDiscoveryDocumentUriBytes()
       The URL of the discovery document containing the resource's JSON schema.
       Example:
       `https://www.googleapis.com/discovery/v1/apis/compute/v1/rest`
      
       This value is unspecified for resources that do not have an API based on a
       discovery document, such as Cloud Bigtable.
       
      string discovery_document_uri = 2;
      Specified by:
      getDiscoveryDocumentUriBytes in interface ResourceOrBuilder
      Returns:
      The bytes for discoveryDocumentUri.
    • setDiscoveryDocumentUri

      public Resource.Builder setDiscoveryDocumentUri(String value)
       The URL of the discovery document containing the resource's JSON schema.
       Example:
       `https://www.googleapis.com/discovery/v1/apis/compute/v1/rest`
      
       This value is unspecified for resources that do not have an API based on a
       discovery document, such as Cloud Bigtable.
       
      string discovery_document_uri = 2;
      Parameters:
      value - The discoveryDocumentUri to set.
      Returns:
      This builder for chaining.
    • clearDiscoveryDocumentUri

      public Resource.Builder clearDiscoveryDocumentUri()
       The URL of the discovery document containing the resource's JSON schema.
       Example:
       `https://www.googleapis.com/discovery/v1/apis/compute/v1/rest`
      
       This value is unspecified for resources that do not have an API based on a
       discovery document, such as Cloud Bigtable.
       
      string discovery_document_uri = 2;
      Returns:
      This builder for chaining.
    • setDiscoveryDocumentUriBytes

      public Resource.Builder setDiscoveryDocumentUriBytes(com.google.protobuf.ByteString value)
       The URL of the discovery document containing the resource's JSON schema.
       Example:
       `https://www.googleapis.com/discovery/v1/apis/compute/v1/rest`
      
       This value is unspecified for resources that do not have an API based on a
       discovery document, such as Cloud Bigtable.
       
      string discovery_document_uri = 2;
      Parameters:
      value - The bytes for discoveryDocumentUri to set.
      Returns:
      This builder for chaining.
    • getDiscoveryName

      public String getDiscoveryName()
       The JSON schema name listed in the discovery document. Example:
       `Project`
      
       This value is unspecified for resources that do not have an API based on a
       discovery document, such as Cloud Bigtable.
       
      string discovery_name = 3;
      Specified by:
      getDiscoveryName in interface ResourceOrBuilder
      Returns:
      The discoveryName.
    • getDiscoveryNameBytes

      public com.google.protobuf.ByteString getDiscoveryNameBytes()
       The JSON schema name listed in the discovery document. Example:
       `Project`
      
       This value is unspecified for resources that do not have an API based on a
       discovery document, such as Cloud Bigtable.
       
      string discovery_name = 3;
      Specified by:
      getDiscoveryNameBytes in interface ResourceOrBuilder
      Returns:
      The bytes for discoveryName.
    • setDiscoveryName

      public Resource.Builder setDiscoveryName(String value)
       The JSON schema name listed in the discovery document. Example:
       `Project`
      
       This value is unspecified for resources that do not have an API based on a
       discovery document, such as Cloud Bigtable.
       
      string discovery_name = 3;
      Parameters:
      value - The discoveryName to set.
      Returns:
      This builder for chaining.
    • clearDiscoveryName

      public Resource.Builder clearDiscoveryName()
       The JSON schema name listed in the discovery document. Example:
       `Project`
      
       This value is unspecified for resources that do not have an API based on a
       discovery document, such as Cloud Bigtable.
       
      string discovery_name = 3;
      Returns:
      This builder for chaining.
    • setDiscoveryNameBytes

      public Resource.Builder setDiscoveryNameBytes(com.google.protobuf.ByteString value)
       The JSON schema name listed in the discovery document. Example:
       `Project`
      
       This value is unspecified for resources that do not have an API based on a
       discovery document, such as Cloud Bigtable.
       
      string discovery_name = 3;
      Parameters:
      value - The bytes for discoveryName to set.
      Returns:
      This builder for chaining.
    • getResourceUrl

      public String getResourceUrl()
       The REST URL for accessing the resource. An HTTP `GET` request using this
       URL returns the resource itself. Example:
       `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`
      
       This value is unspecified for resources without a REST API.
       
      string resource_url = 4;
      Specified by:
      getResourceUrl in interface ResourceOrBuilder
      Returns:
      The resourceUrl.
    • getResourceUrlBytes

      public com.google.protobuf.ByteString getResourceUrlBytes()
       The REST URL for accessing the resource. An HTTP `GET` request using this
       URL returns the resource itself. Example:
       `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`
      
       This value is unspecified for resources without a REST API.
       
      string resource_url = 4;
      Specified by:
      getResourceUrlBytes in interface ResourceOrBuilder
      Returns:
      The bytes for resourceUrl.
    • setResourceUrl

      public Resource.Builder setResourceUrl(String value)
       The REST URL for accessing the resource. An HTTP `GET` request using this
       URL returns the resource itself. Example:
       `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`
      
       This value is unspecified for resources without a REST API.
       
      string resource_url = 4;
      Parameters:
      value - The resourceUrl to set.
      Returns:
      This builder for chaining.
    • clearResourceUrl

      public Resource.Builder clearResourceUrl()
       The REST URL for accessing the resource. An HTTP `GET` request using this
       URL returns the resource itself. Example:
       `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`
      
       This value is unspecified for resources without a REST API.
       
      string resource_url = 4;
      Returns:
      This builder for chaining.
    • setResourceUrlBytes

      public Resource.Builder setResourceUrlBytes(com.google.protobuf.ByteString value)
       The REST URL for accessing the resource. An HTTP `GET` request using this
       URL returns the resource itself. Example:
       `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`
      
       This value is unspecified for resources without a REST API.
       
      string resource_url = 4;
      Parameters:
      value - The bytes for resourceUrl to set.
      Returns:
      This builder for chaining.
    • getParent

      public String getParent()
       The full name of the immediate parent of this resource. See
       [Resource
       Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
       for more information.
      
       For Google Cloud assets, this value is the parent resource defined in the
       [IAM policy
       hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
       Example:
       `//cloudresourcemanager.googleapis.com/projects/my_project_123`
       
      string parent = 5;
      Specified by:
      getParent in interface ResourceOrBuilder
      Returns:
      The parent.
    • getParentBytes

      public com.google.protobuf.ByteString getParentBytes()
       The full name of the immediate parent of this resource. See
       [Resource
       Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
       for more information.
      
       For Google Cloud assets, this value is the parent resource defined in the
       [IAM policy
       hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
       Example:
       `//cloudresourcemanager.googleapis.com/projects/my_project_123`
       
      string parent = 5;
      Specified by:
      getParentBytes in interface ResourceOrBuilder
      Returns:
      The bytes for parent.
    • setParent

      public Resource.Builder setParent(String value)
       The full name of the immediate parent of this resource. See
       [Resource
       Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
       for more information.
      
       For Google Cloud assets, this value is the parent resource defined in the
       [IAM policy
       hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
       Example:
       `//cloudresourcemanager.googleapis.com/projects/my_project_123`
       
      string parent = 5;
      Parameters:
      value - The parent to set.
      Returns:
      This builder for chaining.
    • clearParent

      public Resource.Builder clearParent()
       The full name of the immediate parent of this resource. See
       [Resource
       Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
       for more information.
      
       For Google Cloud assets, this value is the parent resource defined in the
       [IAM policy
       hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
       Example:
       `//cloudresourcemanager.googleapis.com/projects/my_project_123`
       
      string parent = 5;
      Returns:
      This builder for chaining.
    • setParentBytes

      public Resource.Builder setParentBytes(com.google.protobuf.ByteString value)
       The full name of the immediate parent of this resource. See
       [Resource
       Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
       for more information.
      
       For Google Cloud assets, this value is the parent resource defined in the
       [IAM policy
       hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
       Example:
       `//cloudresourcemanager.googleapis.com/projects/my_project_123`
       
      string parent = 5;
      Parameters:
      value - The bytes for parent to set.
      Returns:
      This builder for chaining.
    • hasData

      public boolean hasData()
       The content of the resource, in which some sensitive fields are removed
       and may not be present.
       
      .google.protobuf.Struct data = 6;
      Specified by:
      hasData in interface ResourceOrBuilder
      Returns:
      Whether the data field is set.
    • getData

      public com.google.protobuf.Struct getData()
       The content of the resource, in which some sensitive fields are removed
       and may not be present.
       
      .google.protobuf.Struct data = 6;
      Specified by:
      getData in interface ResourceOrBuilder
      Returns:
      The data.
    • setData

      public Resource.Builder setData(com.google.protobuf.Struct value)
       The content of the resource, in which some sensitive fields are removed
       and may not be present.
       
      .google.protobuf.Struct data = 6;
    • setData

      public Resource.Builder setData(com.google.protobuf.Struct.Builder builderForValue)
       The content of the resource, in which some sensitive fields are removed
       and may not be present.
       
      .google.protobuf.Struct data = 6;
    • mergeData

      public Resource.Builder mergeData(com.google.protobuf.Struct value)
       The content of the resource, in which some sensitive fields are removed
       and may not be present.
       
      .google.protobuf.Struct data = 6;
    • clearData

      public Resource.Builder clearData()
       The content of the resource, in which some sensitive fields are removed
       and may not be present.
       
      .google.protobuf.Struct data = 6;
    • getDataBuilder

      public com.google.protobuf.Struct.Builder getDataBuilder()
       The content of the resource, in which some sensitive fields are removed
       and may not be present.
       
      .google.protobuf.Struct data = 6;
    • getDataOrBuilder

      public com.google.protobuf.StructOrBuilder getDataOrBuilder()
       The content of the resource, in which some sensitive fields are removed
       and may not be present.
       
      .google.protobuf.Struct data = 6;
      Specified by:
      getDataOrBuilder in interface ResourceOrBuilder
    • getLocation

      public String getLocation()
       The location of the resource in Google Cloud, such as its zone and region.
       For more information, see https://cloud.google.com/about/locations/.
       
      string location = 8;
      Specified by:
      getLocation in interface ResourceOrBuilder
      Returns:
      The location.
    • getLocationBytes

      public com.google.protobuf.ByteString getLocationBytes()
       The location of the resource in Google Cloud, such as its zone and region.
       For more information, see https://cloud.google.com/about/locations/.
       
      string location = 8;
      Specified by:
      getLocationBytes in interface ResourceOrBuilder
      Returns:
      The bytes for location.
    • setLocation

      public Resource.Builder setLocation(String value)
       The location of the resource in Google Cloud, such as its zone and region.
       For more information, see https://cloud.google.com/about/locations/.
       
      string location = 8;
      Parameters:
      value - The location to set.
      Returns:
      This builder for chaining.
    • clearLocation

      public Resource.Builder clearLocation()
       The location of the resource in Google Cloud, such as its zone and region.
       For more information, see https://cloud.google.com/about/locations/.
       
      string location = 8;
      Returns:
      This builder for chaining.
    • setLocationBytes

      public Resource.Builder setLocationBytes(com.google.protobuf.ByteString value)
       The location of the resource in Google Cloud, such as its zone and region.
       For more information, see https://cloud.google.com/about/locations/.
       
      string location = 8;
      Parameters:
      value - The bytes for location to set.
      Returns:
      This builder for chaining.