Class Resource (3.45.0)

public final class Resource extends GeneratedMessageV3 implements ResourceOrBuilder

A representation of a Google Cloud resource.

Protobuf type google.cloud.asset.v1p7beta1.Resource

Implements

ResourceOrBuilder

Static Fields

DATA_FIELD_NUMBER

public static final int DATA_FIELD_NUMBER
Field Value
TypeDescription
int

DISCOVERY_DOCUMENT_URI_FIELD_NUMBER

public static final int DISCOVERY_DOCUMENT_URI_FIELD_NUMBER
Field Value
TypeDescription
int

DISCOVERY_NAME_FIELD_NUMBER

public static final int DISCOVERY_NAME_FIELD_NUMBER
Field Value
TypeDescription
int

LOCATION_FIELD_NUMBER

public static final int LOCATION_FIELD_NUMBER
Field Value
TypeDescription
int

PARENT_FIELD_NUMBER

public static final int PARENT_FIELD_NUMBER
Field Value
TypeDescription
int

RESOURCE_URL_FIELD_NUMBER

public static final int RESOURCE_URL_FIELD_NUMBER
Field Value
TypeDescription
int

VERSION_FIELD_NUMBER

public static final int VERSION_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static Resource getDefaultInstance()
Returns
TypeDescription
Resource

getDescriptor()

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

newBuilder()

public static Resource.Builder newBuilder()
Returns
TypeDescription
Resource.Builder

newBuilder(Resource prototype)

public static Resource.Builder newBuilder(Resource prototype)
Parameter
NameDescription
prototypeResource
Returns
TypeDescription
Resource.Builder

parseDelimitedFrom(InputStream input)

public static Resource parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Resource
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Resource parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Resource
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static Resource parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
Resource
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Resource parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Resource
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Resource parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
Resource
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Resource parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Resource
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Resource parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
Resource
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Resource parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Resource
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static Resource parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Resource
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Resource parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Resource
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static Resource parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
Resource
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Resource parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Resource
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<Resource> parser()
Returns
TypeDescription
Parser<Resource>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
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.

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

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

getParserForType()

public Parser<Resource> getParserForType()
Returns
TypeDescription
Parser<Resource>
Overrides

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.

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

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.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public Resource.Builder newBuilderForType()
Returns
TypeDescription
Resource.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Resource.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
Resource.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public Resource.Builder toBuilder()
Returns
TypeDescription
Resource.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException