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
Inherited Members
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
Static Fields
CLOUD_PRODUCT_FIELD_NUMBER
public static final int CLOUD_PRODUCT_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
CREATE_TIME_FIELD_NUMBER
public static final int CREATE_TIME_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
CRYPTO_KEY_VERSIONS_FIELD_NUMBER
public static final int CRYPTO_KEY_VERSIONS_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
CRYPTO_KEY_VERSION_FIELD_NUMBER
public static final int CRYPTO_KEY_VERSION_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
LABELS_FIELD_NUMBER
public static final int LABELS_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
LOCATION_FIELD_NUMBER
public static final int LOCATION_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
NAME_FIELD_NUMBER
public static final int NAME_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
PROJECT_FIELD_NUMBER
public static final int PROJECT_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
PROJECT_ID_FIELD_NUMBER
public static final int PROJECT_ID_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
RESOURCE_TYPE_FIELD_NUMBER
public static final int RESOURCE_TYPE_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
Static Methods
getDefaultInstance()
public static ProtectedResource getDefaultInstance()
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
newBuilder()
public static ProtectedResource.Builder newBuilder()
newBuilder(ProtectedResource prototype)
public static ProtectedResource.Builder newBuilder(ProtectedResource prototype)
public static ProtectedResource parseDelimitedFrom(InputStream input)
public static ProtectedResource parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(byte[] data)
public static ProtectedResource parseFrom(byte[] data)
Parameter |
---|
Name | Description |
data | byte[]
|
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static ProtectedResource parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteString data)
public static ProtectedResource parseFrom(ByteString data)
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static ProtectedResource parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static ProtectedResource parseFrom(CodedInputStream input)
public static ProtectedResource parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public static ProtectedResource parseFrom(InputStream input)
public static ProtectedResource parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteBuffer data)
public static ProtectedResource parseFrom(ByteBuffer data)
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static ProtectedResource parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
parser()
public static Parser<ProtectedResource> parser()
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 |
---|
Name | Description |
key | String
|
equals(Object obj)
public boolean equals(Object obj)
Parameter |
---|
Name | Description |
obj | Object
|
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 |
---|
Type | Description |
Timestamp | The createTime.
|
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];
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) = { ... }
getDefaultInstanceForType()
public ProtectedResource getDefaultInstanceForType()
getLabels()
public Map<String,String> getLabels()
getLabelsCount()
public int getLabelsCount()
A key-value pair of the resource's labels (v1) to their values.
map<string, string> labels = 5;
Returns |
---|
Type | Description |
int | |
getLabelsMap()
public Map<String,String> getLabelsMap()
A key-value pair of the resource's labels (v1) to their values.
map<string, string> labels = 5;
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;
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 |
---|
Name | Description |
key | String
|
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 |
---|
Type | Description |
ByteString | The bytes for location.
|
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 |
---|
Type | Description |
ByteString | The bytes for name.
|
getParserForType()
public Parser<ProtectedResource> getParserForType()
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 |
---|
Type | Description |
ByteString | The bytes for project.
|
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 |
---|
Type | Description |
ByteString | The bytes for projectId.
|
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 |
---|
Type | Description |
int | |
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 |
---|
Type | Description |
int | |
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
internalGetMapField(int number)
protected MapField internalGetMapField(int number)
Parameter |
---|
Name | Description |
number | int
|
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
newBuilderForType()
public ProtectedResource.Builder newBuilderForType()
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected ProtectedResource.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Overrides
toBuilder()
public ProtectedResource.Builder toBuilder()
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Overrides