Class 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.GeneratedMessageV3.Builder<Resource.Builder>
    implements ResourceOrBuilder
     A representation of a Google Cloud resource.
     
    Protobuf type google.cloud.asset.v1p5beta1.Resource
    • Method Detail

      • getDescriptor

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

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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
      • clone

        public Resource.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<Resource.Builder>
      • setField

        public Resource.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                         Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<Resource.Builder>
      • clearField

        public Resource.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<Resource.Builder>
      • clearOneof

        public Resource.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<Resource.Builder>
      • setRepeatedField

        public Resource.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                 int index,
                                                 Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Resource.Builder>
      • addRepeatedField

        public Resource.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                 Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Resource.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>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.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`
        
         For third-party assets, this field may be set differently.
         
        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`
        
         For third-party assets, this field may be set differently.
         
        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`
        
         For third-party assets, this field may be set differently.
         
        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`
        
         For third-party assets, this field may be set differently.
         
        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`
        
         For third-party assets, this field may be set differently.
         
        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
      • setUnknownFields

        public final Resource.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Resource.Builder>
      • mergeUnknownFields

        public final Resource.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Resource.Builder>