Class ProtectedResource.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderT>
-
- com.google.protobuf.GeneratedMessageV3.Builder<ProtectedResource.Builder>
-
- com.google.cloud.kms.inventory.v1.ProtectedResource.Builder
-
- All Implemented Interfaces:
ProtectedResourceOrBuilder
,com.google.protobuf.Message.Builder
,com.google.protobuf.MessageLite.Builder
,com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
,Cloneable
- Enclosing class:
- ProtectedResource
public static final class ProtectedResource.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<ProtectedResource.Builder> implements ProtectedResourceOrBuilder
Metadata about a resource protected by a Cloud KMS key.
Protobuf typegoogle.cloud.kms.inventory.v1.ProtectedResource
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description ProtectedResource.Builder
addAllCryptoKeyVersions(Iterable<String> values)
The names of the Cloud KMS [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions?hl=en) used to protect this resource via CMEK.ProtectedResource.Builder
addCryptoKeyVersions(String value)
The names of the Cloud KMS [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions?hl=en) used to protect this resource via CMEK.ProtectedResource.Builder
addCryptoKeyVersionsBytes(com.google.protobuf.ByteString value)
The names of the Cloud KMS [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions?hl=en) used to protect this resource via CMEK.ProtectedResource.Builder
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
ProtectedResource
build()
ProtectedResource
buildPartial()
ProtectedResource.Builder
clear()
ProtectedResource.Builder
clearCloudProduct()
The Cloud product that owns the resource.ProtectedResource.Builder
clearCreateTime()
Output only.ProtectedResource.Builder
clearCryptoKeyVersion()
The name of the Cloud KMS [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions?hl=en) used to protect this resource via CMEK.ProtectedResource.Builder
clearCryptoKeyVersions()
The names of the Cloud KMS [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions?hl=en) used to protect this resource via CMEK.ProtectedResource.Builder
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
ProtectedResource.Builder
clearLabels()
ProtectedResource.Builder
clearLocation()
Location can be `global`, regional like `us-east1`, or zonal like `us-west1-b`.ProtectedResource.Builder
clearName()
The full resource name of the resource.ProtectedResource.Builder
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
ProtectedResource.Builder
clearProject()
Format: `projects/{PROJECT_NUMBER}`.ProtectedResource.Builder
clearProjectId()
The ID of the project that owns the resource.ProtectedResource.Builder
clearResourceType()
Example: `compute.googleapis.com/Disk`ProtectedResource.Builder
clone()
boolean
containsLabels(String key)
A key-value pair of the resource's labels (v1) to their values.String
getCloudProduct()
The Cloud product that owns the resource.com.google.protobuf.ByteString
getCloudProductBytes()
The Cloud product that owns the resource.com.google.protobuf.Timestamp
getCreateTime()
Output only.com.google.protobuf.Timestamp.Builder
getCreateTimeBuilder()
Output only.com.google.protobuf.TimestampOrBuilder
getCreateTimeOrBuilder()
Output only.String
getCryptoKeyVersion()
The name of the Cloud KMS [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions?hl=en) used to protect this resource via CMEK.com.google.protobuf.ByteString
getCryptoKeyVersionBytes()
The name of the Cloud KMS [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions?hl=en) used to protect this resource via CMEK.String
getCryptoKeyVersions(int index)
The names of the Cloud KMS [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions?hl=en) used to protect this resource via CMEK.com.google.protobuf.ByteString
getCryptoKeyVersionsBytes(int index)
The names of the Cloud KMS [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions?hl=en) used to protect this resource via CMEK.int
getCryptoKeyVersionsCount()
The names of the Cloud KMS [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions?hl=en) used to protect this resource via CMEK.com.google.protobuf.ProtocolStringList
getCryptoKeyVersionsList()
The names of the Cloud KMS [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions?hl=en) used to protect this resource via CMEK.ProtectedResource
getDefaultInstanceForType()
static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
com.google.protobuf.Descriptors.Descriptor
getDescriptorForType()
Map<String,String>
getLabels()
Deprecated.int
getLabelsCount()
A key-value pair of the resource's labels (v1) to their values.Map<String,String>
getLabelsMap()
A key-value pair of the resource's labels (v1) to their values.String
getLabelsOrDefault(String key, String defaultValue)
A key-value pair of the resource's labels (v1) to their values.String
getLabelsOrThrow(String key)
A key-value pair of the resource's labels (v1) to their values.String
getLocation()
Location can be `global`, regional like `us-east1`, or zonal like `us-west1-b`.com.google.protobuf.ByteString
getLocationBytes()
Location can be `global`, regional like `us-east1`, or zonal like `us-west1-b`.Map<String,String>
getMutableLabels()
Deprecated.String
getName()
The full resource name of the resource.com.google.protobuf.ByteString
getNameBytes()
The full resource name of the resource.String
getProject()
Format: `projects/{PROJECT_NUMBER}`.com.google.protobuf.ByteString
getProjectBytes()
Format: `projects/{PROJECT_NUMBER}`.String
getProjectId()
The ID of the project that owns the resource.com.google.protobuf.ByteString
getProjectIdBytes()
The ID of the project that owns the resource.String
getResourceType()
Example: `compute.googleapis.com/Disk`com.google.protobuf.ByteString
getResourceTypeBytes()
Example: `compute.googleapis.com/Disk`boolean
hasCreateTime()
Output only.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()
protected com.google.protobuf.MapField
internalGetMapField(int number)
protected com.google.protobuf.MapField
internalGetMutableMapField(int number)
boolean
isInitialized()
ProtectedResource.Builder
mergeCreateTime(com.google.protobuf.Timestamp value)
Output only.ProtectedResource.Builder
mergeFrom(ProtectedResource other)
ProtectedResource.Builder
mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
ProtectedResource.Builder
mergeFrom(com.google.protobuf.Message other)
ProtectedResource.Builder
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
ProtectedResource.Builder
putAllLabels(Map<String,String> values)
A key-value pair of the resource's labels (v1) to their values.ProtectedResource.Builder
putLabels(String key, String value)
A key-value pair of the resource's labels (v1) to their values.ProtectedResource.Builder
removeLabels(String key)
A key-value pair of the resource's labels (v1) to their values.ProtectedResource.Builder
setCloudProduct(String value)
The Cloud product that owns the resource.ProtectedResource.Builder
setCloudProductBytes(com.google.protobuf.ByteString value)
The Cloud product that owns the resource.ProtectedResource.Builder
setCreateTime(com.google.protobuf.Timestamp value)
Output only.ProtectedResource.Builder
setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue)
Output only.ProtectedResource.Builder
setCryptoKeyVersion(String value)
The name of the Cloud KMS [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions?hl=en) used to protect this resource via CMEK.ProtectedResource.Builder
setCryptoKeyVersionBytes(com.google.protobuf.ByteString value)
The name of the Cloud KMS [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions?hl=en) used to protect this resource via CMEK.ProtectedResource.Builder
setCryptoKeyVersions(int index, String value)
The names of the Cloud KMS [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions?hl=en) used to protect this resource via CMEK.ProtectedResource.Builder
setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
ProtectedResource.Builder
setLocation(String value)
Location can be `global`, regional like `us-east1`, or zonal like `us-west1-b`.ProtectedResource.Builder
setLocationBytes(com.google.protobuf.ByteString value)
Location can be `global`, regional like `us-east1`, or zonal like `us-west1-b`.ProtectedResource.Builder
setName(String value)
The full resource name of the resource.ProtectedResource.Builder
setNameBytes(com.google.protobuf.ByteString value)
The full resource name of the resource.ProtectedResource.Builder
setProject(String value)
Format: `projects/{PROJECT_NUMBER}`.ProtectedResource.Builder
setProjectBytes(com.google.protobuf.ByteString value)
Format: `projects/{PROJECT_NUMBER}`.ProtectedResource.Builder
setProjectId(String value)
The ID of the project that owns the resource.ProtectedResource.Builder
setProjectIdBytes(com.google.protobuf.ByteString value)
The ID of the project that owns the resource.ProtectedResource.Builder
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
ProtectedResource.Builder
setResourceType(String value)
Example: `compute.googleapis.com/Disk`ProtectedResource.Builder
setResourceTypeBytes(com.google.protobuf.ByteString value)
Example: `compute.googleapis.com/Disk`ProtectedResource.Builder
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetMapField
protected com.google.protobuf.MapField internalGetMapField(int number)
- Overrides:
internalGetMapField
in classcom.google.protobuf.GeneratedMessageV3.Builder<ProtectedResource.Builder>
-
internalGetMutableMapField
protected com.google.protobuf.MapField internalGetMutableMapField(int number)
- Overrides:
internalGetMutableMapField
in classcom.google.protobuf.GeneratedMessageV3.Builder<ProtectedResource.Builder>
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3.Builder<ProtectedResource.Builder>
-
clear
public ProtectedResource.Builder clear()
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessageV3.Builder<ProtectedResource.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessageV3.Builder<ProtectedResource.Builder>
-
getDefaultInstanceForType
public ProtectedResource getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
public ProtectedResource build()
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public ProtectedResource buildPartial()
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
clone
public ProtectedResource.Builder clone()
- Specified by:
clone
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clone
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clone
in classcom.google.protobuf.GeneratedMessageV3.Builder<ProtectedResource.Builder>
-
setField
public ProtectedResource.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setField
in classcom.google.protobuf.GeneratedMessageV3.Builder<ProtectedResource.Builder>
-
clearField
public ProtectedResource.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearField
in classcom.google.protobuf.GeneratedMessageV3.Builder<ProtectedResource.Builder>
-
clearOneof
public ProtectedResource.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneof
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearOneof
in classcom.google.protobuf.GeneratedMessageV3.Builder<ProtectedResource.Builder>
-
setRepeatedField
public ProtectedResource.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<ProtectedResource.Builder>
-
addRepeatedField
public ProtectedResource.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
addRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<ProtectedResource.Builder>
-
mergeFrom
public ProtectedResource.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<ProtectedResource.Builder>
-
mergeFrom
public ProtectedResource.Builder mergeFrom(ProtectedResource other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessageV3.Builder<ProtectedResource.Builder>
-
mergeFrom
public ProtectedResource.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<ProtectedResource.Builder>
- Throws:
IOException
-
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;
- Specified by:
getName
in interfaceProtectedResourceOrBuilder
- Returns:
- The name.
-
getNameBytes
public com.google.protobuf.ByteString getNameBytes()
The full resource name of the resource. Example: `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
string name = 1;
- Specified by:
getNameBytes
in interfaceProtectedResourceOrBuilder
- Returns:
- The bytes for name.
-
setName
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;
- Parameters:
value
- The name to set.- Returns:
- 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;
- Returns:
- This builder for chaining.
-
setNameBytes
public ProtectedResource.Builder setNameBytes(com.google.protobuf.ByteString value)
The full resource name of the resource. Example: `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
string name = 1;
- Parameters:
value
- The bytes for name to set.- Returns:
- This builder for chaining.
-
getProject
public String getProject()
Format: `projects/{PROJECT_NUMBER}`.
string project = 2;
- Specified by:
getProject
in interfaceProtectedResourceOrBuilder
- Returns:
- The project.
-
getProjectBytes
public com.google.protobuf.ByteString getProjectBytes()
Format: `projects/{PROJECT_NUMBER}`.
string project = 2;
- Specified by:
getProjectBytes
in interfaceProtectedResourceOrBuilder
- Returns:
- The bytes for project.
-
setProject
public ProtectedResource.Builder setProject(String value)
Format: `projects/{PROJECT_NUMBER}`.
string project = 2;
- Parameters:
value
- The project to set.- Returns:
- This builder for chaining.
-
clearProject
public ProtectedResource.Builder clearProject()
Format: `projects/{PROJECT_NUMBER}`.
string project = 2;
- Returns:
- This builder for chaining.
-
setProjectBytes
public ProtectedResource.Builder setProjectBytes(com.google.protobuf.ByteString value)
Format: `projects/{PROJECT_NUMBER}`.
string project = 2;
- Parameters:
value
- The bytes for project to set.- Returns:
- This builder for chaining.
-
getProjectId
public String getProjectId()
The ID of the project that owns the resource.
string project_id = 9;
- Specified by:
getProjectId
in interfaceProtectedResourceOrBuilder
- Returns:
- The projectId.
-
getProjectIdBytes
public com.google.protobuf.ByteString getProjectIdBytes()
The ID of the project that owns the resource.
string project_id = 9;
- Specified by:
getProjectIdBytes
in interfaceProtectedResourceOrBuilder
- Returns:
- The bytes for projectId.
-
setProjectId
public ProtectedResource.Builder setProjectId(String value)
The ID of the project that owns the resource.
string project_id = 9;
- Parameters:
value
- The projectId to set.- Returns:
- This builder for chaining.
-
clearProjectId
public ProtectedResource.Builder clearProjectId()
The ID of the project that owns the resource.
string project_id = 9;
- Returns:
- This builder for chaining.
-
setProjectIdBytes
public ProtectedResource.Builder setProjectIdBytes(com.google.protobuf.ByteString value)
The ID of the project that owns the resource.
string project_id = 9;
- Parameters:
value
- The bytes for projectId to set.- Returns:
- This builder for chaining.
-
getCloudProduct
public String getCloudProduct()
The Cloud product that owns the resource. Example: `compute`
string cloud_product = 8;
- Specified by:
getCloudProduct
in interfaceProtectedResourceOrBuilder
- Returns:
- The cloudProduct.
-
getCloudProductBytes
public com.google.protobuf.ByteString getCloudProductBytes()
The Cloud product that owns the resource. Example: `compute`
string cloud_product = 8;
- Specified by:
getCloudProductBytes
in interfaceProtectedResourceOrBuilder
- Returns:
- The bytes for cloudProduct.
-
setCloudProduct
public ProtectedResource.Builder setCloudProduct(String value)
The Cloud product that owns the resource. Example: `compute`
string cloud_product = 8;
- Parameters:
value
- The cloudProduct to set.- Returns:
- This builder for chaining.
-
clearCloudProduct
public ProtectedResource.Builder clearCloudProduct()
The Cloud product that owns the resource. Example: `compute`
string cloud_product = 8;
- Returns:
- This builder for chaining.
-
setCloudProductBytes
public ProtectedResource.Builder setCloudProductBytes(com.google.protobuf.ByteString value)
The Cloud product that owns the resource. Example: `compute`
string cloud_product = 8;
- Parameters:
value
- The bytes for cloudProduct to set.- Returns:
- This builder for chaining.
-
getResourceType
public String getResourceType()
Example: `compute.googleapis.com/Disk`
string resource_type = 3;
- Specified by:
getResourceType
in interfaceProtectedResourceOrBuilder
- Returns:
- The resourceType.
-
getResourceTypeBytes
public com.google.protobuf.ByteString getResourceTypeBytes()
Example: `compute.googleapis.com/Disk`
string resource_type = 3;
- Specified by:
getResourceTypeBytes
in interfaceProtectedResourceOrBuilder
- Returns:
- The bytes for resourceType.
-
setResourceType
public ProtectedResource.Builder setResourceType(String value)
Example: `compute.googleapis.com/Disk`
string resource_type = 3;
- Parameters:
value
- The resourceType to set.- Returns:
- This builder for chaining.
-
clearResourceType
public ProtectedResource.Builder clearResourceType()
Example: `compute.googleapis.com/Disk`
string resource_type = 3;
- Returns:
- This builder for chaining.
-
setResourceTypeBytes
public ProtectedResource.Builder setResourceTypeBytes(com.google.protobuf.ByteString value)
Example: `compute.googleapis.com/Disk`
string resource_type = 3;
- Parameters:
value
- The bytes for resourceType to set.- Returns:
- This builder for chaining.
-
getLocation
public String getLocation()
Location can be `global`, regional like `us-east1`, or zonal like `us-west1-b`.
string location = 4;
- Specified by:
getLocation
in interfaceProtectedResourceOrBuilder
- Returns:
- The location.
-
getLocationBytes
public com.google.protobuf.ByteString getLocationBytes()
Location can be `global`, regional like `us-east1`, or zonal like `us-west1-b`.
string location = 4;
- Specified by:
getLocationBytes
in interfaceProtectedResourceOrBuilder
- Returns:
- The bytes for location.
-
setLocation
public ProtectedResource.Builder setLocation(String value)
Location can be `global`, regional like `us-east1`, or zonal like `us-west1-b`.
string location = 4;
- Parameters:
value
- The location to set.- Returns:
- This builder for chaining.
-
clearLocation
public ProtectedResource.Builder clearLocation()
Location can be `global`, regional like `us-east1`, or zonal like `us-west1-b`.
string location = 4;
- Returns:
- This builder for chaining.
-
setLocationBytes
public ProtectedResource.Builder setLocationBytes(com.google.protobuf.ByteString value)
Location can be `global`, regional like `us-east1`, or zonal like `us-west1-b`.
string location = 4;
- Parameters:
value
- The bytes for location to set.- Returns:
- This builder for chaining.
-
getLabelsCount
public int getLabelsCount()
Description copied from interface:ProtectedResourceOrBuilder
A key-value pair of the resource's labels (v1) to their values.
map<string, string> labels = 5;
- Specified by:
getLabelsCount
in interfaceProtectedResourceOrBuilder
-
containsLabels
public boolean containsLabels(String key)
A key-value pair of the resource's labels (v1) to their values.
map<string, string> labels = 5;
- Specified by:
containsLabels
in interfaceProtectedResourceOrBuilder
-
getLabels
@Deprecated public Map<String,String> getLabels()
Deprecated.UsegetLabelsMap()
instead.- Specified by:
getLabels
in interfaceProtectedResourceOrBuilder
-
getLabelsMap
public Map<String,String> getLabelsMap()
A key-value pair of the resource's labels (v1) to their values.
map<string, string> labels = 5;
- Specified by:
getLabelsMap
in interfaceProtectedResourceOrBuilder
-
getLabelsOrDefault
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;
- Specified by:
getLabelsOrDefault
in interfaceProtectedResourceOrBuilder
-
getLabelsOrThrow
public String getLabelsOrThrow(String key)
A key-value pair of the resource's labels (v1) to their values.
map<string, string> labels = 5;
- Specified by:
getLabelsOrThrow
in interfaceProtectedResourceOrBuilder
-
clearLabels
public ProtectedResource.Builder clearLabels()
-
removeLabels
public ProtectedResource.Builder removeLabels(String key)
A key-value pair of the resource's labels (v1) to their values.
map<string, string> labels = 5;
-
getMutableLabels
@Deprecated public Map<String,String> getMutableLabels()
Deprecated.Use alternate mutation accessors instead.
-
putLabels
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;
-
putAllLabels
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;
-
getCryptoKeyVersion
public String getCryptoKeyVersion()
The name of the Cloud KMS [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions?hl=en) 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) = { ... }
- Specified by:
getCryptoKeyVersion
in interfaceProtectedResourceOrBuilder
- Returns:
- The cryptoKeyVersion.
-
getCryptoKeyVersionBytes
public com.google.protobuf.ByteString getCryptoKeyVersionBytes()
The name of the Cloud KMS [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions?hl=en) 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) = { ... }
- Specified by:
getCryptoKeyVersionBytes
in interfaceProtectedResourceOrBuilder
- Returns:
- The bytes for cryptoKeyVersion.
-
setCryptoKeyVersion
public ProtectedResource.Builder setCryptoKeyVersion(String value)
The name of the Cloud KMS [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions?hl=en) 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) = { ... }
- Parameters:
value
- The cryptoKeyVersion to set.- Returns:
- This builder for chaining.
-
clearCryptoKeyVersion
public ProtectedResource.Builder clearCryptoKeyVersion()
The name of the Cloud KMS [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions?hl=en) 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:
- This builder for chaining.
-
setCryptoKeyVersionBytes
public ProtectedResource.Builder setCryptoKeyVersionBytes(com.google.protobuf.ByteString value)
The name of the Cloud KMS [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions?hl=en) 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) = { ... }
- Parameters:
value
- The bytes for cryptoKeyVersion to set.- Returns:
- This builder for chaining.
-
getCryptoKeyVersionsList
public com.google.protobuf.ProtocolStringList getCryptoKeyVersionsList()
The names of the Cloud KMS [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions?hl=en) 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) = { ... }
- Specified by:
getCryptoKeyVersionsList
in interfaceProtectedResourceOrBuilder
- Returns:
- A list containing the cryptoKeyVersions.
-
getCryptoKeyVersionsCount
public int getCryptoKeyVersionsCount()
The names of the Cloud KMS [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions?hl=en) 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) = { ... }
- Specified by:
getCryptoKeyVersionsCount
in interfaceProtectedResourceOrBuilder
- Returns:
- The count of cryptoKeyVersions.
-
getCryptoKeyVersions
public String getCryptoKeyVersions(int index)
The names of the Cloud KMS [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions?hl=en) 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) = { ... }
- Specified by:
getCryptoKeyVersions
in interfaceProtectedResourceOrBuilder
- Parameters:
index
- The index of the element to return.- Returns:
- The cryptoKeyVersions at the given index.
-
getCryptoKeyVersionsBytes
public com.google.protobuf.ByteString getCryptoKeyVersionsBytes(int index)
The names of the Cloud KMS [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions?hl=en) 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) = { ... }
- Specified by:
getCryptoKeyVersionsBytes
in interfaceProtectedResourceOrBuilder
- Parameters:
index
- The index of the value to return.- Returns:
- The bytes of the cryptoKeyVersions at the given index.
-
setCryptoKeyVersions
public ProtectedResource.Builder setCryptoKeyVersions(int index, String value)
The names of the Cloud KMS [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions?hl=en) 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) = { ... }
- Parameters:
index
- The index to set the value at.value
- The cryptoKeyVersions to set.- Returns:
- This builder for chaining.
-
addCryptoKeyVersions
public ProtectedResource.Builder addCryptoKeyVersions(String value)
The names of the Cloud KMS [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions?hl=en) 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) = { ... }
- Parameters:
value
- The cryptoKeyVersions to add.- Returns:
- This builder for chaining.
-
addAllCryptoKeyVersions
public ProtectedResource.Builder addAllCryptoKeyVersions(Iterable<String> values)
The names of the Cloud KMS [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions?hl=en) 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) = { ... }
- Parameters:
values
- The cryptoKeyVersions to add.- Returns:
- This builder for chaining.
-
clearCryptoKeyVersions
public ProtectedResource.Builder clearCryptoKeyVersions()
The names of the Cloud KMS [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions?hl=en) 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:
- This builder for chaining.
-
addCryptoKeyVersionsBytes
public ProtectedResource.Builder addCryptoKeyVersionsBytes(com.google.protobuf.ByteString value)
The names of the Cloud KMS [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions?hl=en) 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) = { ... }
- Parameters:
value
- The bytes of the cryptoKeyVersions to add.- Returns:
- This builder for chaining.
-
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];
- Specified by:
hasCreateTime
in interfaceProtectedResourceOrBuilder
- Returns:
- Whether the createTime field is set.
-
getCreateTime
public com.google.protobuf.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];
- Specified by:
getCreateTime
in interfaceProtectedResourceOrBuilder
- Returns:
- The createTime.
-
setCreateTime
public ProtectedResource.Builder setCreateTime(com.google.protobuf.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];
-
setCreateTime
public ProtectedResource.Builder setCreateTime(com.google.protobuf.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];
-
mergeCreateTime
public ProtectedResource.Builder mergeCreateTime(com.google.protobuf.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];
-
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];
-
getCreateTimeBuilder
public com.google.protobuf.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];
-
getCreateTimeOrBuilder
public com.google.protobuf.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];
- Specified by:
getCreateTimeOrBuilder
in interfaceProtectedResourceOrBuilder
-
setUnknownFields
public final ProtectedResource.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<ProtectedResource.Builder>
-
mergeUnknownFields
public final ProtectedResource.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<ProtectedResource.Builder>
-
-