public static final class ProtectedResource.Builder extends GeneratedMessageV3.Builder<ProtectedResource.Builder> implements ProtectedResourceOrBuilder
Metadata about a resource protected by a Cloud KMS key.
Protobuf type google.cloud.kms.inventory.v1.ProtectedResource
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > ProtectedResource.BuilderImplements
ProtectedResourceOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Type | Description |
Descriptor |
Methods
addAllCryptoKeyVersions(Iterable<String> values)
public ProtectedResource.Builder addAllCryptoKeyVersions(Iterable<String> values)
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) = { ... }
Name | Description |
values | Iterable<String> The cryptoKeyVersions to add. |
Type | Description |
ProtectedResource.Builder | This builder for chaining. |
addCryptoKeyVersions(String value)
public ProtectedResource.Builder addCryptoKeyVersions(String value)
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) = { ... }
Name | Description |
value | String The cryptoKeyVersions to add. |
Type | Description |
ProtectedResource.Builder | This builder for chaining. |
addCryptoKeyVersionsBytes(ByteString value)
public ProtectedResource.Builder addCryptoKeyVersionsBytes(ByteString value)
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) = { ... }
Name | Description |
value | ByteString The bytes of the cryptoKeyVersions to add. |
Type | Description |
ProtectedResource.Builder | This builder for chaining. |
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public ProtectedResource.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Name | Description |
field | FieldDescriptor |
value | Object |
Type | Description |
ProtectedResource.Builder |
build()
public ProtectedResource build()
Type | Description |
ProtectedResource |
buildPartial()
public ProtectedResource buildPartial()
Type | Description |
ProtectedResource |
clear()
public ProtectedResource.Builder clear()
Type | Description |
ProtectedResource.Builder |
clearCloudProduct()
public ProtectedResource.Builder clearCloudProduct()
The Cloud product that owns the resource.
Example: compute
string cloud_product = 8;
Type | Description |
ProtectedResource.Builder | This builder for chaining. |
clearCreateTime()
public ProtectedResource.Builder clearCreateTime()
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];
Type | Description |
ProtectedResource.Builder |
clearCryptoKeyVersion()
public ProtectedResource.Builder clearCryptoKeyVersion()
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) = { ... }
Type | Description |
ProtectedResource.Builder | This builder for chaining. |
clearCryptoKeyVersions()
public ProtectedResource.Builder clearCryptoKeyVersions()
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) = { ... }
Type | Description |
ProtectedResource.Builder | This builder for chaining. |
clearField(Descriptors.FieldDescriptor field)
public ProtectedResource.Builder clearField(Descriptors.FieldDescriptor field)
Name | Description |
field | FieldDescriptor |
Type | Description |
ProtectedResource.Builder |
clearLabels()
public ProtectedResource.Builder clearLabels()
Type | Description |
ProtectedResource.Builder |
clearLocation()
public ProtectedResource.Builder clearLocation()
Location can be global
, regional like us-east1
, or zonal like
us-west1-b
.
string location = 4;
Type | Description |
ProtectedResource.Builder | This builder for chaining. |
clearName()
public ProtectedResource.Builder clearName()
The full resource name of the resource.
Example:
//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1
.
string name = 1;
Type | Description |
ProtectedResource.Builder | This builder for chaining. |
clearOneof(Descriptors.OneofDescriptor oneof)
public ProtectedResource.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Name | Description |
oneof | OneofDescriptor |
Type | Description |
ProtectedResource.Builder |
clearProject()
public ProtectedResource.Builder clearProject()
Format: projects/{PROJECT_NUMBER}
.
string project = 2;
Type | Description |
ProtectedResource.Builder | This builder for chaining. |
clearProjectId()
public ProtectedResource.Builder clearProjectId()
The ID of the project that owns the resource.
string project_id = 9;
Type | Description |
ProtectedResource.Builder | This builder for chaining. |
clearResourceType()
public ProtectedResource.Builder clearResourceType()
Example: compute.googleapis.com/Disk
string resource_type = 3;
Type | Description |
ProtectedResource.Builder | This builder for chaining. |
clone()
public ProtectedResource.Builder clone()
Type | Description |
ProtectedResource.Builder |
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;
Name | Description |
key | String |
Type | Description |
boolean |
getCloudProduct()
public String getCloudProduct()
The Cloud product that owns the resource.
Example: compute
string cloud_product = 8;
Type | Description |
String | The cloudProduct. |
getCloudProductBytes()
public ByteString getCloudProductBytes()
The Cloud product that owns the resource.
Example: compute
string cloud_product = 8;
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];
Type | Description |
Timestamp | The createTime. |
getCreateTimeBuilder()
public Timestamp.Builder getCreateTimeBuilder()
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];
Type | Description |
Builder |
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];
Type | Description |
TimestampOrBuilder |
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) = { ... }
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) = { ... }
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) = { ... }
Name | Description |
index | int The index of the element to return. |
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) = { ... }
Name | Description |
index | int The index of the value to return. |
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) = { ... }
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) = { ... }
Type | Description |
ProtocolStringList | A list containing the cryptoKeyVersions. |
getDefaultInstanceForType()
public ProtectedResource getDefaultInstanceForType()
Type | Description |
ProtectedResource |
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Type | Description |
Descriptor |
getLabels()
public Map<String,String> getLabels()
Use #getLabelsMap() instead.
Type | Description |
Map<String,String> |
getLabelsCount()
public int getLabelsCount()
A key-value pair of the resource's labels (v1) to their values.
map<string, string> labels = 5;
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;
Type | Description |
Map<String,String> |
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;
Name | Description |
key | String |
defaultValue | String |
Type | Description |
String |
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;
Name | Description |
key | String |
Type | Description |
String |
getLocation()
public String getLocation()
Location can be global
, regional like us-east1
, or zonal like
us-west1-b
.
string location = 4;
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;
Type | Description |
ByteString | The bytes for location. |
getMutableLabels()
public Map<String,String> getMutableLabels()
Use alternate mutation accessors instead.
Type | Description |
Map<String,String> |
getName()
public String getName()
The full resource name of the resource.
Example:
//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1
.
string name = 1;
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;
Type | Description |
ByteString | The bytes for name. |
getProject()
public String getProject()
Format: projects/{PROJECT_NUMBER}
.
string project = 2;
Type | Description |
String | The project. |
getProjectBytes()
public ByteString getProjectBytes()
Format: projects/{PROJECT_NUMBER}
.
string project = 2;
Type | Description |
ByteString | The bytes for project. |
getProjectId()
public String getProjectId()
The ID of the project that owns the resource.
string project_id = 9;
Type | Description |
String | The projectId. |
getProjectIdBytes()
public ByteString getProjectIdBytes()
The ID of the project that owns the resource.
string project_id = 9;
Type | Description |
ByteString | The bytes for projectId. |
getResourceType()
public String getResourceType()
Example: compute.googleapis.com/Disk
string resource_type = 3;
Type | Description |
String | The resourceType. |
getResourceTypeBytes()
public ByteString getResourceTypeBytes()
Example: compute.googleapis.com/Disk
string resource_type = 3;
Type | Description |
ByteString | The bytes for resourceType. |
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];
Type | Description |
boolean | Whether the createTime field is set. |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Type | Description |
FieldAccessorTable |
internalGetMapField(int number)
protected MapField internalGetMapField(int number)
Name | Description |
number | int |
Type | Description |
MapField |
internalGetMutableMapField(int number)
protected MapField internalGetMutableMapField(int number)
Name | Description |
number | int |
Type | Description |
MapField |
isInitialized()
public final boolean isInitialized()
Type | Description |
boolean |
mergeCreateTime(Timestamp value)
public ProtectedResource.Builder mergeCreateTime(Timestamp value)
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];
Name | Description |
value | Timestamp |
Type | Description |
ProtectedResource.Builder |
mergeFrom(ProtectedResource other)
public ProtectedResource.Builder mergeFrom(ProtectedResource other)
Name | Description |
other | ProtectedResource |
Type | Description |
ProtectedResource.Builder |
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public ProtectedResource.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Name | Description |
input | CodedInputStream |
extensionRegistry | ExtensionRegistryLite |
Type | Description |
ProtectedResource.Builder |
Type | Description |
IOException |
mergeFrom(Message other)
public ProtectedResource.Builder mergeFrom(Message other)
Name | Description |
other | Message |
Type | Description |
ProtectedResource.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields)
public final ProtectedResource.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Name | Description |
unknownFields | UnknownFieldSet |
Type | Description |
ProtectedResource.Builder |
putAllLabels(Map<String,String> values)
public ProtectedResource.Builder putAllLabels(Map<String,String> values)
A key-value pair of the resource's labels (v1) to their values.
map<string, string> labels = 5;
Name | Description |
values | Map<String,String> |
Type | Description |
ProtectedResource.Builder |
putLabels(String key, String value)
public ProtectedResource.Builder putLabels(String key, String value)
A key-value pair of the resource's labels (v1) to their values.
map<string, string> labels = 5;
Name | Description |
key | String |
value | String |
Type | Description |
ProtectedResource.Builder |
removeLabels(String key)
public ProtectedResource.Builder removeLabels(String key)
A key-value pair of the resource's labels (v1) to their values.
map<string, string> labels = 5;
Name | Description |
key | String |
Type | Description |
ProtectedResource.Builder |
setCloudProduct(String value)
public ProtectedResource.Builder setCloudProduct(String value)
The Cloud product that owns the resource.
Example: compute
string cloud_product = 8;
Name | Description |
value | String The cloudProduct to set. |
Type | Description |
ProtectedResource.Builder | This builder for chaining. |
setCloudProductBytes(ByteString value)
public ProtectedResource.Builder setCloudProductBytes(ByteString value)
The Cloud product that owns the resource.
Example: compute
string cloud_product = 8;
Name | Description |
value | ByteString The bytes for cloudProduct to set. |
Type | Description |
ProtectedResource.Builder | This builder for chaining. |
setCreateTime(Timestamp value)
public ProtectedResource.Builder setCreateTime(Timestamp value)
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];
Name | Description |
value | Timestamp |
Type | Description |
ProtectedResource.Builder |
setCreateTime(Timestamp.Builder builderForValue)
public ProtectedResource.Builder setCreateTime(Timestamp.Builder builderForValue)
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];
Name | Description |
builderForValue | Builder |
Type | Description |
ProtectedResource.Builder |
setCryptoKeyVersion(String value)
public ProtectedResource.Builder setCryptoKeyVersion(String value)
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) = { ... }
Name | Description |
value | String The cryptoKeyVersion to set. |
Type | Description |
ProtectedResource.Builder | This builder for chaining. |
setCryptoKeyVersionBytes(ByteString value)
public ProtectedResource.Builder setCryptoKeyVersionBytes(ByteString value)
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) = { ... }
Name | Description |
value | ByteString The bytes for cryptoKeyVersion to set. |
Type | Description |
ProtectedResource.Builder | This builder for chaining. |
setCryptoKeyVersions(int index, String value)
public ProtectedResource.Builder setCryptoKeyVersions(int index, String value)
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) = { ... }
Name | Description |
index | int The index to set the value at. |
value | String The cryptoKeyVersions to set. |
Type | Description |
ProtectedResource.Builder | This builder for chaining. |
setField(Descriptors.FieldDescriptor field, Object value)
public ProtectedResource.Builder setField(Descriptors.FieldDescriptor field, Object value)
Name | Description |
field | FieldDescriptor |
value | Object |
Type | Description |
ProtectedResource.Builder |
setLocation(String value)
public ProtectedResource.Builder setLocation(String value)
Location can be global
, regional like us-east1
, or zonal like
us-west1-b
.
string location = 4;
Name | Description |
value | String The location to set. |
Type | Description |
ProtectedResource.Builder | This builder for chaining. |
setLocationBytes(ByteString value)
public ProtectedResource.Builder setLocationBytes(ByteString value)
Location can be global
, regional like us-east1
, or zonal like
us-west1-b
.
string location = 4;
Name | Description |
value | ByteString The bytes for location to set. |
Type | Description |
ProtectedResource.Builder | This builder for chaining. |
setName(String value)
public ProtectedResource.Builder setName(String value)
The full resource name of the resource.
Example:
//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1
.
string name = 1;
Name | Description |
value | String The name to set. |
Type | Description |
ProtectedResource.Builder | This builder for chaining. |
setNameBytes(ByteString value)
public ProtectedResource.Builder setNameBytes(ByteString value)
The full resource name of the resource.
Example:
//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1
.
string name = 1;
Name | Description |
value | ByteString The bytes for name to set. |
Type | Description |
ProtectedResource.Builder | This builder for chaining. |
setProject(String value)
public ProtectedResource.Builder setProject(String value)
Format: projects/{PROJECT_NUMBER}
.
string project = 2;
Name | Description |
value | String The project to set. |
Type | Description |
ProtectedResource.Builder | This builder for chaining. |
setProjectBytes(ByteString value)
public ProtectedResource.Builder setProjectBytes(ByteString value)
Format: projects/{PROJECT_NUMBER}
.
string project = 2;
Name | Description |
value | ByteString The bytes for project to set. |
Type | Description |
ProtectedResource.Builder | This builder for chaining. |
setProjectId(String value)
public ProtectedResource.Builder setProjectId(String value)
The ID of the project that owns the resource.
string project_id = 9;
Name | Description |
value | String The projectId to set. |
Type | Description |
ProtectedResource.Builder | This builder for chaining. |
setProjectIdBytes(ByteString value)
public ProtectedResource.Builder setProjectIdBytes(ByteString value)
The ID of the project that owns the resource.
string project_id = 9;
Name | Description |
value | ByteString The bytes for projectId to set. |
Type | Description |
ProtectedResource.Builder | This builder for chaining. |
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public ProtectedResource.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Name | Description |
field | FieldDescriptor |
index | int |
value | Object |
Type | Description |
ProtectedResource.Builder |
setResourceType(String value)
public ProtectedResource.Builder setResourceType(String value)
Example: compute.googleapis.com/Disk
string resource_type = 3;
Name | Description |
value | String The resourceType to set. |
Type | Description |
ProtectedResource.Builder | This builder for chaining. |
setResourceTypeBytes(ByteString value)
public ProtectedResource.Builder setResourceTypeBytes(ByteString value)
Example: compute.googleapis.com/Disk
string resource_type = 3;
Name | Description |
value | ByteString The bytes for resourceType to set. |
Type | Description |
ProtectedResource.Builder | This builder for chaining. |
setUnknownFields(UnknownFieldSet unknownFields)
public final ProtectedResource.Builder setUnknownFields(UnknownFieldSet unknownFields)
Name | Description |
unknownFields | UnknownFieldSet |
Type | Description |
ProtectedResource.Builder |