Class VersionedResource (3.45.0)

public final class VersionedResource extends GeneratedMessageV3 implements VersionedResourceOrBuilder

Resource representation as defined by the corresponding service providing the resource for a given API version.

Protobuf type google.cloud.asset.v1.VersionedResource

Static Fields

RESOURCE_FIELD_NUMBER

public static final int RESOURCE_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 VersionedResource getDefaultInstance()
Returns
TypeDescription
VersionedResource

getDescriptor()

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

newBuilder()

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

newBuilder(VersionedResource prototype)

public static VersionedResource.Builder newBuilder(VersionedResource prototype)
Parameter
NameDescription
prototypeVersionedResource
Returns
TypeDescription
VersionedResource.Builder

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getDefaultInstanceForType()

public VersionedResource getDefaultInstanceForType()
Returns
TypeDescription
VersionedResource

getParserForType()

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

getResource()

public Struct getResource()

JSON representation of the resource as defined by the corresponding service providing this resource.

Example: If the resource is an instance provided by Compute Engine, this field will contain the JSON representation of the instance as defined by Compute Engine: https://cloud.google.com/compute/docs/reference/rest/v1/instances.

You can find the resource definition for each supported resource type in this table: https://cloud.google.com/asset-inventory/docs/supported-asset-types

.google.protobuf.Struct resource = 2;

Returns
TypeDescription
Struct

The resource.

getResourceOrBuilder()

public StructOrBuilder getResourceOrBuilder()

JSON representation of the resource as defined by the corresponding service providing this resource.

Example: If the resource is an instance provided by Compute Engine, this field will contain the JSON representation of the instance as defined by Compute Engine: https://cloud.google.com/compute/docs/reference/rest/v1/instances.

You can find the resource definition for each supported resource type in this table: https://cloud.google.com/asset-inventory/docs/supported-asset-types

.google.protobuf.Struct resource = 2;

Returns
TypeDescription
StructOrBuilder

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getVersion()

public String getVersion()

API version of the resource.

Example: If the resource is an instance provided by Compute Engine v1 API as defined in https://cloud.google.com/compute/docs/reference/rest/v1/instances, version will be "v1".

string version = 1;

Returns
TypeDescription
String

The version.

getVersionBytes()

public ByteString getVersionBytes()

API version of the resource.

Example: If the resource is an instance provided by Compute Engine v1 API as defined in https://cloud.google.com/compute/docs/reference/rest/v1/instances, version will be "v1".

string version = 1;

Returns
TypeDescription
ByteString

The bytes for version.

hasResource()

public boolean hasResource()

JSON representation of the resource as defined by the corresponding service providing this resource.

Example: If the resource is an instance provided by Compute Engine, this field will contain the JSON representation of the instance as defined by Compute Engine: https://cloud.google.com/compute/docs/reference/rest/v1/instances.

You can find the resource definition for each supported resource type in this table: https://cloud.google.com/asset-inventory/docs/supported-asset-types

.google.protobuf.Struct resource = 2;

Returns
TypeDescription
boolean

Whether the resource 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 VersionedResource.Builder newBuilderForType()
Returns
TypeDescription
VersionedResource.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

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

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

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

toBuilder()

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

writeTo(CodedOutputStream output)

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