public final class ResourceContext extends GeneratedMessage implements ResourceContextOrBuilder
ResourceContext provides the context we know about a resource.
It is similar in concept to google.cloud.asset.v1.Resource, but focuses
on the information specifically used by Simulator.
Protobuf type google.cloud.policysimulator.v1.ResourceContext
Inherited Members
com.google.protobuf.GeneratedMessage.<ContainingT,T>newFileScopedGeneratedExtension(java.lang.Class<?>,com.google.protobuf.Message)
com.google.protobuf.GeneratedMessage.<ContainingT,T>newMessageScopedGeneratedExtension(com.google.protobuf.Message,int,java.lang.Class<?>,com.google.protobuf.Message)
com.google.protobuf.GeneratedMessage.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessage.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessage.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessage.<V>serializeBooleanMapTo(com.google.protobuf.CodedOutputStream,com.google.protobuf.MapField<java.lang.Boolean,V>,com.google.protobuf.MapEntry<java.lang.Boolean,V>,int)
com.google.protobuf.GeneratedMessage.<V>serializeIntegerMapTo(com.google.protobuf.CodedOutputStream,com.google.protobuf.MapField<java.lang.Integer,V>,com.google.protobuf.MapEntry<java.lang.Integer,V>,int)
com.google.protobuf.GeneratedMessage.<V>serializeLongMapTo(com.google.protobuf.CodedOutputStream,com.google.protobuf.MapField<java.lang.Long,V>,com.google.protobuf.MapEntry<java.lang.Long,V>,int)
com.google.protobuf.GeneratedMessage.<V>serializeStringMapTo(com.google.protobuf.CodedOutputStream,com.google.protobuf.MapField<java.lang.String,V>,com.google.protobuf.MapEntry<java.lang.String,V>,int)
com.google.protobuf.GeneratedMessage.canUseUnsafe()
com.google.protobuf.GeneratedMessage.emptyBooleanList()
com.google.protobuf.GeneratedMessage.emptyDoubleList()
com.google.protobuf.GeneratedMessage.emptyFloatList()
com.google.protobuf.GeneratedMessage.emptyIntList()
com.google.protobuf.GeneratedMessage.emptyLongList()
com.google.protobuf.GeneratedMessage.internalGetMapFieldReflection(int)
com.google.protobuf.GeneratedMessage.isStringEmpty(java.lang.Object)
com.google.protobuf.GeneratedMessage.mergeFromAndMakeImmutableInternal(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite)
com.google.protobuf.GeneratedMessage.newInstance(com.google.protobuf.GeneratedMessage.UnusedPrivateParameter)
com.google.protobuf.GeneratedMessage.parseUnknownFieldProto3(com.google.protobuf.CodedInputStream,com.google.protobuf.UnknownFieldSet.Builder,com.google.protobuf.ExtensionRegistryLite,int)
Static Fields
ANCESTORS_FIELD_NUMBER
public static final int ANCESTORS_FIELD_NUMBER
| Field Value |
| Type |
Description |
int |
|
ASSET_TYPE_FIELD_NUMBER
public static final int ASSET_TYPE_FIELD_NUMBER
| Field Value |
| Type |
Description |
int |
|
RESOURCE_FIELD_NUMBER
public static final int RESOURCE_FIELD_NUMBER
| Field Value |
| Type |
Description |
int |
|
Static Methods
getDefaultInstance()
public static ResourceContext getDefaultInstance()
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
newBuilder()
public static ResourceContext.Builder newBuilder()
newBuilder(ResourceContext prototype)
public static ResourceContext.Builder newBuilder(ResourceContext prototype)
parseDelimitedFrom(InputStream input)
public static ResourceContext parseDelimitedFrom(InputStream input)
parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static ResourceContext parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(byte[] data)
public static ResourceContext parseFrom(byte[] data)
| Parameter |
| Name |
Description |
data |
byte[]
|
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static ResourceContext parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteString data)
public static ResourceContext parseFrom(ByteString data)
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static ResourceContext parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
parseFrom(CodedInputStream input)
public static ResourceContext parseFrom(CodedInputStream input)
parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public static ResourceContext parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(InputStream input)
public static ResourceContext parseFrom(InputStream input)
parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static ResourceContext parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteBuffer data)
public static ResourceContext parseFrom(ByteBuffer data)
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static ResourceContext parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
parser()
public static Parser<ResourceContext> parser()
Methods
equals(Object obj)
public boolean equals(Object obj)
| Parameter |
| Name |
Description |
obj |
Object
|
Overrides
getAncestors(int index)
public String getAncestors(int index)
The ancestry path of the resource in Google Cloud resource
hierarchy,
represented as a list of relative resource names. An ancestry path starts
with the closest ancestor in the hierarchy and ends at root. If the
resource is a project, folder, or organization, the ancestry path starts
from the resource itself.
Example: ["projects/123456789", "folders/5432", "organizations/1234"]
repeated string ancestors = 3;
| Parameter |
| Name |
Description |
index |
int
The index of the element to return.
|
| Returns |
| Type |
Description |
String |
The ancestors at the given index.
|
getAncestorsBytes(int index)
public ByteString getAncestorsBytes(int index)
The ancestry path of the resource in Google Cloud resource
hierarchy,
represented as a list of relative resource names. An ancestry path starts
with the closest ancestor in the hierarchy and ends at root. If the
resource is a project, folder, or organization, the ancestry path starts
from the resource itself.
Example: ["projects/123456789", "folders/5432", "organizations/1234"]
repeated string ancestors = 3;
| Parameter |
| Name |
Description |
index |
int
The index of the value to return.
|
| Returns |
| Type |
Description |
ByteString |
The bytes of the ancestors at the given index.
|
getAncestorsCount()
public int getAncestorsCount()
The ancestry path of the resource in Google Cloud resource
hierarchy,
represented as a list of relative resource names. An ancestry path starts
with the closest ancestor in the hierarchy and ends at root. If the
resource is a project, folder, or organization, the ancestry path starts
from the resource itself.
Example: ["projects/123456789", "folders/5432", "organizations/1234"]
repeated string ancestors = 3;
| Returns |
| Type |
Description |
int |
The count of ancestors.
|
getAncestorsList()
public ProtocolStringList getAncestorsList()
The ancestry path of the resource in Google Cloud resource
hierarchy,
represented as a list of relative resource names. An ancestry path starts
with the closest ancestor in the hierarchy and ends at root. If the
resource is a project, folder, or organization, the ancestry path starts
from the resource itself.
Example: ["projects/123456789", "folders/5432", "organizations/1234"]
repeated string ancestors = 3;
getAssetType()
public String getAssetType()
The asset type of the resource as defined by CAIS.
Example: compute.googleapis.com/Firewall
See Supported asset
types
for more information.
string asset_type = 2;
| Returns |
| Type |
Description |
String |
The assetType.
|
getAssetTypeBytes()
public ByteString getAssetTypeBytes()
The asset type of the resource as defined by CAIS.
Example: compute.googleapis.com/Firewall
See Supported asset
types
for more information.
string asset_type = 2;
| Returns |
| Type |
Description |
ByteString |
The bytes for assetType.
|
getDefaultInstanceForType()
public ResourceContext getDefaultInstanceForType()
getParserForType()
public Parser<ResourceContext> getParserForType()
Overrides
getResource()
public String getResource()
The full name of the resource. Example:
//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1
See Resource
names
for more information.
string resource = 1;
| Returns |
| Type |
Description |
String |
The resource.
|
getResourceBytes()
public ByteString getResourceBytes()
The full name of the resource. Example:
//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1
See Resource
names
for more information.
string resource = 1;
| Returns |
| Type |
Description |
ByteString |
The bytes for resource.
|
getSerializedSize()
public int getSerializedSize()
| Returns |
| Type |
Description |
int |
|
Overrides
hashCode()
| Returns |
| Type |
Description |
int |
|
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
newBuilderForType()
public ResourceContext.Builder newBuilderForType()
newBuilderForType(AbstractMessage.BuilderParent parent)
protected ResourceContext.Builder newBuilderForType(AbstractMessage.BuilderParent parent)
Overrides
toBuilder()
public ResourceContext.Builder toBuilder()
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Overrides