public final class ProtectedResource extends GeneratedMessageV3 implements ProtectedResourceOrBuilder
Metadata about a resource protected by a Cloud KMS key.
Protobuf type google.cloud.kms.inventory.v1.ProtectedResource
Static Fields
CLOUD_PRODUCT_FIELD_NUMBER
public static final int CLOUD_PRODUCT_FIELD_NUMBER
Field Value
CREATE_TIME_FIELD_NUMBER
public static final int CREATE_TIME_FIELD_NUMBER
Field Value
CRYPTO_KEY_VERSIONS_FIELD_NUMBER
public static final int CRYPTO_KEY_VERSIONS_FIELD_NUMBER
Field Value
CRYPTO_KEY_VERSION_FIELD_NUMBER
public static final int CRYPTO_KEY_VERSION_FIELD_NUMBER
Field Value
LABELS_FIELD_NUMBER
public static final int LABELS_FIELD_NUMBER
Field Value
LOCATION_FIELD_NUMBER
public static final int LOCATION_FIELD_NUMBER
Field Value
NAME_FIELD_NUMBER
public static final int NAME_FIELD_NUMBER
Field Value
PROJECT_FIELD_NUMBER
public static final int PROJECT_FIELD_NUMBER
Field Value
PROJECT_ID_FIELD_NUMBER
public static final int PROJECT_ID_FIELD_NUMBER
Field Value
RESOURCE_TYPE_FIELD_NUMBER
public static final int RESOURCE_TYPE_FIELD_NUMBER
Field Value
Static Methods
getDefaultInstance()
public static ProtectedResource getDefaultInstance()
Returns
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
newBuilder()
public static ProtectedResource.Builder newBuilder()
Returns
newBuilder(ProtectedResource prototype)
public static ProtectedResource.Builder newBuilder(ProtectedResource prototype)
Parameter
Returns
public static ProtectedResource parseDelimitedFrom(InputStream input)
Parameter
Returns
Exceptions
public static ProtectedResource parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(byte[] data)
public static ProtectedResource parseFrom(byte[] data)
Parameter
Name | Description |
data | byte[]
|
Returns
Exceptions
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static ProtectedResource parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteString data)
public static ProtectedResource parseFrom(ByteString data)
Parameter
Returns
Exceptions
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static ProtectedResource parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static ProtectedResource parseFrom(CodedInputStream input)
Parameter
Returns
Exceptions
public static ProtectedResource parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static ProtectedResource parseFrom(InputStream input)
Parameter
Returns
Exceptions
public static ProtectedResource parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteBuffer data)
public static ProtectedResource parseFrom(ByteBuffer data)
Parameter
Returns
Exceptions
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static ProtectedResource parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parser()
public static Parser<ProtectedResource> parser()
Returns
Methods
containsLabels(String key)
public boolean containsLabels(String key)
A key-value pair of the resource's labels (v1) to their values.
map<string, string> labels = 5;
Parameter
Returns
equals(Object obj)
public boolean equals(Object obj)
Parameter
Returns
Overrides
getCloudProduct()
public String getCloudProduct()
The Cloud product that owns the resource.
Example: compute
string cloud_product = 8;
Returns
Type | Description |
String | The cloudProduct.
|
getCloudProductBytes()
public ByteString getCloudProductBytes()
The Cloud product that owns the resource.
Example: compute
string cloud_product = 8;
Returns
Type | Description |
ByteString | The bytes for cloudProduct.
|
getCreateTime()
public Timestamp getCreateTime()
Output only. The time at which this resource was created. The granularity
is in seconds. Timestamp.nanos will always be 0.
.google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns
getCreateTimeOrBuilder()
public TimestampOrBuilder getCreateTimeOrBuilder()
Output only. The time at which this resource was created. The granularity
is in seconds. Timestamp.nanos will always be 0.
.google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns
getCryptoKeyVersion()
public String getCryptoKeyVersion()
The name of the Cloud KMS
CryptoKeyVersion
used to protect this resource via CMEK. This field is empty if the
Google Cloud product owning the resource does not provide key version data
to Asset Inventory. If there are multiple key versions protecting the
resource, then this is same value as the first element of
crypto_key_versions.
string crypto_key_version = 6 [(.google.api.resource_reference) = { ... }
Returns
Type | Description |
String | The cryptoKeyVersion.
|
getCryptoKeyVersionBytes()
public ByteString getCryptoKeyVersionBytes()
The name of the Cloud KMS
CryptoKeyVersion
used to protect this resource via CMEK. This field is empty if the
Google Cloud product owning the resource does not provide key version data
to Asset Inventory. If there are multiple key versions protecting the
resource, then this is same value as the first element of
crypto_key_versions.
string crypto_key_version = 6 [(.google.api.resource_reference) = { ... }
Returns
Type | Description |
ByteString | The bytes for cryptoKeyVersion.
|
getCryptoKeyVersions(int index)
public String getCryptoKeyVersions(int index)
The names of the Cloud KMS
CryptoKeyVersion
used to protect this resource via CMEK. This field is empty if the
Google Cloud product owning the resource does not provide key versions data
to Asset Inventory. The first element of this field is stored in
crypto_key_version.
repeated string crypto_key_versions = 10 [(.google.api.resource_reference) = { ... }
Parameter
Name | Description |
index | int
The index of the element to return.
|
Returns
Type | Description |
String | The cryptoKeyVersions at the given index.
|
getCryptoKeyVersionsBytes(int index)
public ByteString getCryptoKeyVersionsBytes(int index)
The names of the Cloud KMS
CryptoKeyVersion
used to protect this resource via CMEK. This field is empty if the
Google Cloud product owning the resource does not provide key versions data
to Asset Inventory. The first element of this field is stored in
crypto_key_version.
repeated string crypto_key_versions = 10 [(.google.api.resource_reference) = { ... }
Parameter
Name | Description |
index | int
The index of the value to return.
|
Returns
Type | Description |
ByteString | The bytes of the cryptoKeyVersions at the given index.
|
getCryptoKeyVersionsCount()
public int getCryptoKeyVersionsCount()
The names of the Cloud KMS
CryptoKeyVersion
used to protect this resource via CMEK. This field is empty if the
Google Cloud product owning the resource does not provide key versions data
to Asset Inventory. The first element of this field is stored in
crypto_key_version.
repeated string crypto_key_versions = 10 [(.google.api.resource_reference) = { ... }
Returns
Type | Description |
int | The count of cryptoKeyVersions.
|
getCryptoKeyVersionsList()
public ProtocolStringList getCryptoKeyVersionsList()
The names of the Cloud KMS
CryptoKeyVersion
used to protect this resource via CMEK. This field is empty if the
Google Cloud product owning the resource does not provide key versions data
to Asset Inventory. The first element of this field is stored in
crypto_key_version.
repeated string crypto_key_versions = 10 [(.google.api.resource_reference) = { ... }
Returns
getDefaultInstanceForType()
public ProtectedResource getDefaultInstanceForType()
Returns
getLabels()
public Map<String,String> getLabels()
Returns
getLabelsCount()
public int getLabelsCount()
A key-value pair of the resource's labels (v1) to their values.
map<string, string> labels = 5;
Returns
getLabelsMap()
public Map<String,String> getLabelsMap()
A key-value pair of the resource's labels (v1) to their values.
map<string, string> labels = 5;
Returns
getLabelsOrDefault(String key, String defaultValue)
public String getLabelsOrDefault(String key, String defaultValue)
A key-value pair of the resource's labels (v1) to their values.
map<string, string> labels = 5;
Parameters
Returns
getLabelsOrThrow(String key)
public String getLabelsOrThrow(String key)
A key-value pair of the resource's labels (v1) to their values.
map<string, string> labels = 5;
Parameter
Returns
getLocation()
public String getLocation()
Location can be global
, regional like us-east1
, or zonal like
us-west1-b
.
string location = 4;
Returns
Type | Description |
String | The location.
|
getLocationBytes()
public ByteString getLocationBytes()
Location can be global
, regional like us-east1
, or zonal like
us-west1-b
.
string location = 4;
Returns
getName()
The full resource name of the resource.
Example:
//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1
.
string name = 1;
Returns
Type | Description |
String | The name.
|
getNameBytes()
public ByteString getNameBytes()
The full resource name of the resource.
Example:
//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1
.
string name = 1;
Returns
getParserForType()
public Parser<ProtectedResource> getParserForType()
Returns
Overrides
getProject()
public String getProject()
Format: projects/{PROJECT_NUMBER}
.
string project = 2;
Returns
Type | Description |
String | The project.
|
getProjectBytes()
public ByteString getProjectBytes()
Format: projects/{PROJECT_NUMBER}
.
string project = 2;
Returns
getProjectId()
public String getProjectId()
The ID of the project that owns the resource.
string project_id = 9;
Returns
Type | Description |
String | The projectId.
|
getProjectIdBytes()
public ByteString getProjectIdBytes()
The ID of the project that owns the resource.
string project_id = 9;
Returns
getResourceType()
public String getResourceType()
Example: compute.googleapis.com/Disk
string resource_type = 3;
Returns
Type | Description |
String | The resourceType.
|
getResourceTypeBytes()
public ByteString getResourceTypeBytes()
Example: compute.googleapis.com/Disk
string resource_type = 3;
Returns
Type | Description |
ByteString | The bytes for resourceType.
|
getSerializedSize()
public int getSerializedSize()
Returns
Overrides
getUnknownFields()
public final UnknownFieldSet getUnknownFields()
Returns
Overrides
hasCreateTime()
public boolean hasCreateTime()
Output only. The time at which this resource was created. The granularity
is in seconds. Timestamp.nanos will always be 0.
.google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns
Type | Description |
boolean | Whether the createTime field is set.
|
hashCode()
Returns
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
internalGetMapField(int number)
protected MapField internalGetMapField(int number)
Parameter
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
newBuilderForType()
public ProtectedResource.Builder newBuilderForType()
Returns
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected ProtectedResource.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Returns
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Returns
Overrides
toBuilder()
public ProtectedResource.Builder toBuilder()
Returns
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Parameter
Overrides
Exceptions