Class Resource.Builder (3.6.0)

Stay organized with collections Save and categorize content based on your preferences.
public static final class Resource.Builder extends GeneratedMessageV3.Builder<Resource.Builder> implements ResourceOrBuilder

A representation of a Google Cloud resource.

Protobuf type google.cloud.asset.v1.Resource

Implements

ResourceOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Resource.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Resource.Builder
Overrides

build()

public Resource build()
Returns
TypeDescription
Resource

buildPartial()

public Resource buildPartial()
Returns
TypeDescription
Resource

clear()

public Resource.Builder clear()
Returns
TypeDescription
Resource.Builder
Overrides

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;

Returns
TypeDescription
Resource.Builder

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
TypeDescription
Resource.Builder

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
TypeDescription
Resource.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public Resource.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
Resource.Builder
Overrides

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
TypeDescription
Resource.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Resource.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
Resource.Builder
Overrides

clearParent()

public Resource.Builder clearParent()

The full name of the immediate parent of this resource. See Resource Names for more information. For Google Cloud assets, this value is the parent resource defined in the Cloud IAM policy hierarchy. Example: //cloudresourcemanager.googleapis.com/projects/my_project_123 For third-party assets, this field may be set differently.

string parent = 5;

Returns
TypeDescription
Resource.Builder

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
TypeDescription
Resource.Builder

This builder for chaining.

clearVersion()

public Resource.Builder clearVersion()

The API version. Example: v1

string version = 1;

Returns
TypeDescription
Resource.Builder

This builder for chaining.

clone()

public Resource.Builder clone()
Returns
TypeDescription
Resource.Builder
Overrides

getData()

public Struct getData()

The content of the resource, in which some sensitive fields are removed and may not be present.

.google.protobuf.Struct data = 6;

Returns
TypeDescription
Struct

The data.

getDataBuilder()

public 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;

Returns
TypeDescription
Builder

getDataOrBuilder()

public StructOrBuilder getDataOrBuilder()

The content of the resource, in which some sensitive fields are removed and may not be present.

.google.protobuf.Struct data = 6;

Returns
TypeDescription
StructOrBuilder

getDefaultInstanceForType()

public Resource getDefaultInstanceForType()
Returns
TypeDescription
Resource

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

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;

Returns
TypeDescription
String

The discoveryDocumentUri.

getDiscoveryDocumentUriBytes()

public 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;

Returns
TypeDescription
ByteString

The bytes for discoveryDocumentUri.

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;

Returns
TypeDescription
String

The discoveryName.

getDiscoveryNameBytes()

public 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;

Returns
TypeDescription
ByteString

The bytes for discoveryName.

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;

Returns
TypeDescription
String

The location.

getLocationBytes()

public 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;

Returns
TypeDescription
ByteString

The bytes for location.

getParent()

public String getParent()

The full name of the immediate parent of this resource. See Resource Names for more information. For Google Cloud assets, this value is the parent resource defined in the Cloud IAM policy hierarchy. Example: //cloudresourcemanager.googleapis.com/projects/my_project_123 For third-party assets, this field may be set differently.

string parent = 5;

Returns
TypeDescription
String

The parent.

getParentBytes()

public ByteString getParentBytes()

The full name of the immediate parent of this resource. See Resource Names for more information. For Google Cloud assets, this value is the parent resource defined in the Cloud IAM policy hierarchy. Example: //cloudresourcemanager.googleapis.com/projects/my_project_123 For third-party assets, this field may be set differently.

string parent = 5;

Returns
TypeDescription
ByteString

The bytes for parent.

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;

Returns
TypeDescription
String

The resourceUrl.

getResourceUrlBytes()

public 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;

Returns
TypeDescription
ByteString

The bytes for resourceUrl.

getVersion()

public String getVersion()

The API version. Example: v1

string version = 1;

Returns
TypeDescription
String

The version.

getVersionBytes()

public ByteString getVersionBytes()

The API version. Example: v1

string version = 1;

Returns
TypeDescription
ByteString

The bytes for version.

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;

Returns
TypeDescription
boolean

Whether the data field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeData(Struct value)

public Resource.Builder mergeData(Struct value)

The content of the resource, in which some sensitive fields are removed and may not be present.

.google.protobuf.Struct data = 6;

Parameter
NameDescription
valueStruct
Returns
TypeDescription
Resource.Builder

mergeFrom(Resource other)

public Resource.Builder mergeFrom(Resource other)
Parameter
NameDescription
otherResource
Returns
TypeDescription
Resource.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Resource.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Resource.Builder
Overrides Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public Resource.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
Resource.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Resource.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Resource.Builder
Overrides

setData(Struct value)

public Resource.Builder setData(Struct value)

The content of the resource, in which some sensitive fields are removed and may not be present.

.google.protobuf.Struct data = 6;

Parameter
NameDescription
valueStruct
Returns
TypeDescription
Resource.Builder

setData(Struct.Builder builderForValue)

public Resource.Builder setData(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;

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
Resource.Builder

setDiscoveryDocumentUri(String value)

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;

Parameter
NameDescription
valueString

The discoveryDocumentUri to set.

Returns
TypeDescription
Resource.Builder

This builder for chaining.

setDiscoveryDocumentUriBytes(ByteString value)

public Resource.Builder setDiscoveryDocumentUriBytes(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;

Parameter
NameDescription
valueByteString

The bytes for discoveryDocumentUri to set.

Returns
TypeDescription
Resource.Builder

This builder for chaining.

setDiscoveryName(String value)

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;

Parameter
NameDescription
valueString

The discoveryName to set.

Returns
TypeDescription
Resource.Builder

This builder for chaining.

setDiscoveryNameBytes(ByteString value)

public Resource.Builder setDiscoveryNameBytes(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;

Parameter
NameDescription
valueByteString

The bytes for discoveryName to set.

Returns
TypeDescription
Resource.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public Resource.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Resource.Builder
Overrides

setLocation(String value)

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;

Parameter
NameDescription
valueString

The location to set.

Returns
TypeDescription
Resource.Builder

This builder for chaining.

setLocationBytes(ByteString value)

public Resource.Builder setLocationBytes(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;

Parameter
NameDescription
valueByteString

The bytes for location to set.

Returns
TypeDescription
Resource.Builder

This builder for chaining.

setParent(String value)

public Resource.Builder setParent(String value)

The full name of the immediate parent of this resource. See Resource Names for more information. For Google Cloud assets, this value is the parent resource defined in the Cloud IAM policy hierarchy. Example: //cloudresourcemanager.googleapis.com/projects/my_project_123 For third-party assets, this field may be set differently.

string parent = 5;

Parameter
NameDescription
valueString

The parent to set.

Returns
TypeDescription
Resource.Builder

This builder for chaining.

setParentBytes(ByteString value)

public Resource.Builder setParentBytes(ByteString value)

The full name of the immediate parent of this resource. See Resource Names for more information. For Google Cloud assets, this value is the parent resource defined in the Cloud IAM policy hierarchy. Example: //cloudresourcemanager.googleapis.com/projects/my_project_123 For third-party assets, this field may be set differently.

string parent = 5;

Parameter
NameDescription
valueByteString

The bytes for parent to set.

Returns
TypeDescription
Resource.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public Resource.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
Resource.Builder
Overrides

setResourceUrl(String value)

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;

Parameter
NameDescription
valueString

The resourceUrl to set.

Returns
TypeDescription
Resource.Builder

This builder for chaining.

setResourceUrlBytes(ByteString value)

public Resource.Builder setResourceUrlBytes(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;

Parameter
NameDescription
valueByteString

The bytes for resourceUrl to set.

Returns
TypeDescription
Resource.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final Resource.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Resource.Builder
Overrides

setVersion(String value)

public Resource.Builder setVersion(String value)

The API version. Example: v1

string version = 1;

Parameter
NameDescription
valueString

The version to set.

Returns
TypeDescription
Resource.Builder

This builder for chaining.

setVersionBytes(ByteString value)

public Resource.Builder setVersionBytes(ByteString value)

The API version. Example: v1

string version = 1;

Parameter
NameDescription
valueByteString

The bytes for version to set.

Returns
TypeDescription
Resource.Builder

This builder for chaining.