Class Resource.Builder (3.58.0)

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.v1p5beta1.Resource

Implements

ResourceOrBuilder

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Resource.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Resource.Builder
Overrides

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.

clearField(Descriptors.FieldDescriptor field)

public Resource.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
Resource.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public Resource.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
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 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.

clone()

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

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Resource.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
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.

setField(Descriptors.FieldDescriptor field, Object value)

public Resource.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Resource.Builder
Overrides

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.

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

public Resource.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
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
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.

setUnknownFields(UnknownFieldSet unknownFields)

public final Resource.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Resource.Builder
Overrides

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.