Class Resource.Builder (3.87.0)

public static final class Resource.Builder extends GeneratedMessage.Builder<Resource.Builder> implements ResourceOrBuilder

A representation of a Google Cloud resource.

Protobuf type google.cloud.asset.v1p2beta1.Resource

Implements

ResourceOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

build()

public Resource build()
Returns
Type Description
Resource

buildPartial()

public Resource buildPartial()
Returns
Type Description
Resource

clear()

public Resource.Builder clear()
Returns
Type Description
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
Type Description
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
Type Description
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
Type Description
Resource.Builder

This builder for chaining.

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 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
Type Description
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
Type Description
Resource.Builder

This builder for chaining.

clearVersion()

public Resource.Builder clearVersion()

The API version. Example: v1

string version = 1;

Returns
Type Description
Resource.Builder

This builder for chaining.

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
Type Description
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
Type Description
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
Type Description
StructOrBuilder

getDefaultInstanceForType()

public Resource getDefaultInstanceForType()
Returns
Type Description
Resource

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
ByteString

The bytes for discoveryName.

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 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
Type Description
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 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
Type Description
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
Type Description
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
Type Description
ByteString

The bytes for resourceUrl.

getVersion()

public String getVersion()

The API version. Example: v1

string version = 1;

Returns
Type Description
String

The version.

getVersionBytes()

public ByteString getVersionBytes()

The API version. Example: v1

string version = 1;

Returns
Type Description
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
Type Description
boolean

Whether the data field is set.

internalGetFieldAccessorTable()

protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
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
Name Description
value Struct
Returns
Type Description
Resource.Builder

mergeFrom(Resource other)

public Resource.Builder mergeFrom(Resource other)
Parameter
Name Description
other Resource
Returns
Type Description
Resource.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Resource.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Resource.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public Resource.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
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
Name Description
value Struct
Returns
Type Description
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
Name Description
builderForValue Builder
Returns
Type Description
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
Name Description
value String

The discoveryDocumentUri to set.

Returns
Type Description
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
Name Description
value ByteString

The bytes for discoveryDocumentUri to set.

Returns
Type Description
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
Name Description
value String

The discoveryName to set.

Returns
Type Description
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
Name Description
value ByteString

The bytes for discoveryName to set.

Returns
Type Description
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 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
Name Description
value String

The parent to set.

Returns
Type Description
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 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
Name Description
value ByteString

The bytes for parent to set.

Returns
Type Description
Resource.Builder

This builder for chaining.

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
Name Description
value String

The resourceUrl to set.

Returns
Type Description
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
Name Description
value ByteString

The bytes for resourceUrl to set.

Returns
Type Description
Resource.Builder

This builder for chaining.

setVersion(String value)

public Resource.Builder setVersion(String value)

The API version. Example: v1

string version = 1;

Parameter
Name Description
value String

The version to set.

Returns
Type Description
Resource.Builder

This builder for chaining.

setVersionBytes(ByteString value)

public Resource.Builder setVersionBytes(ByteString value)

The API version. Example: v1

string version = 1;

Parameter
Name Description
value ByteString

The bytes for version to set.

Returns
Type Description
Resource.Builder

This builder for chaining.