Class Resource (3.31.0)

public final class Resource extends GeneratedMessageV3 implements ResourceOrBuilder

Representation of a cloud resource.

Protobuf type google.cloud.asset.v1p2beta1.Resource

Implements

ResourceOrBuilder

Static Fields

DATA_FIELD_NUMBER

public static final int DATA_FIELD_NUMBER
Field Value
Type Description
int

DISCOVERY_DOCUMENT_URI_FIELD_NUMBER

public static final int DISCOVERY_DOCUMENT_URI_FIELD_NUMBER
Field Value
Type Description
int

DISCOVERY_NAME_FIELD_NUMBER

public static final int DISCOVERY_NAME_FIELD_NUMBER
Field Value
Type Description
int

PARENT_FIELD_NUMBER

public static final int PARENT_FIELD_NUMBER
Field Value
Type Description
int

RESOURCE_URL_FIELD_NUMBER

public static final int RESOURCE_URL_FIELD_NUMBER
Field Value
Type Description
int

VERSION_FIELD_NUMBER

public static final int VERSION_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static Resource getDefaultInstance()
Returns
Type Description
Resource

getDescriptor()

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

newBuilder()

public static Resource.Builder newBuilder()
Returns
Type Description
Resource.Builder

newBuilder(Resource prototype)

public static Resource.Builder newBuilder(Resource prototype)
Parameter
Name Description
prototype Resource
Returns
Type Description
Resource.Builder

parseDelimitedFrom(InputStream input)

public static Resource parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Resource
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Resource parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Resource
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static Resource parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
Resource
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Resource parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Resource
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Resource parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
Resource
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Resource parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Resource
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Resource parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
Resource
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Resource parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Resource
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static Resource parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Resource
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Resource parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Resource
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static Resource parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
Resource
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Resource parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Resource
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<Resource> parser()
Returns
Type Description
Parser<Resource>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getData()

public Struct getData()

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

.google.protobuf.Struct data = 6;

Returns
Type Description
Struct

The data.

getDataOrBuilder()

public StructOrBuilder getDataOrBuilder()

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

.google.protobuf.Struct data = 6;

Returns
Type Description
StructOrBuilder

getDefaultInstanceForType()

public Resource getDefaultInstanceForType()
Returns
Type Description
Resource

getDiscoveryDocumentUri()

public String getDiscoveryDocumentUri()

The URL of the discovery document containing the resource's JSON schema. For example: "https://www.googleapis.com/discovery/v1/apis/compute/v1/rest". It will be left unspecified for resources without a discovery-based API, 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. For example: "https://www.googleapis.com/discovery/v1/apis/compute/v1/rest". It will be left unspecified for resources without a discovery-based API, 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". It will be left unspecified for resources (such as Cloud Bigtable) without a discovery-based API.

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". It will be left unspecified for resources (such as Cloud Bigtable) without a discovery-based API.

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 GCP assets, it is the parent resource defined in the Cloud IAM policy hierarchy. For example: "//cloudresourcemanager.googleapis.com/projects/my_project_123".

For third-party assets, it is up to the users to define.

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 GCP assets, it is the parent resource defined in the Cloud IAM policy hierarchy. For example: "//cloudresourcemanager.googleapis.com/projects/my_project_123".

For third-party assets, it is up to the users to define.

string parent = 5;

Returns
Type Description
ByteString

The bytes for parent.

getParserForType()

public Parser<Resource> getParserForType()
Returns
Type Description
Parser<Resource>
Overrides

getResourceUrl()

public String getResourceUrl()

The REST URL for accessing the resource. An HTTP GET operation using this URL returns the resource itself. Example: https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123. It will be left 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 operation using this URL returns the resource itself. Example: https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123. It will be left unspecified for resources without a REST API.

string resource_url = 4;

Returns
Type Description
ByteString

The bytes for resourceUrl.

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

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 scrubbed away and may not be present.

.google.protobuf.Struct data = 6;

Returns
Type Description
boolean

Whether the data field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public Resource.Builder newBuilderForType()
Returns
Type Description
Resource.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Resource.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
Resource.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public Resource.Builder toBuilder()
Returns
Type Description
Resource.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException