Class SearchProtectedResourcesRequest.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<SearchProtectedResourcesRequest.Builder>
com.google.cloud.kms.inventory.v1.SearchProtectedResourcesRequest.Builder
- All Implemented Interfaces:
SearchProtectedResourcesRequestOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- SearchProtectedResourcesRequest
public static final class SearchProtectedResourcesRequest.Builder
extends com.google.protobuf.GeneratedMessage.Builder<SearchProtectedResourcesRequest.Builder>
implements SearchProtectedResourcesRequestOrBuilder
Request message for [KeyTrackingService.SearchProtectedResources][google.cloud.kms.inventory.v1.KeyTrackingService.SearchProtectedResources].Protobuf type
google.cloud.kms.inventory.v1.SearchProtectedResourcesRequest-
Method Summary
Modifier and TypeMethodDescriptionaddAllResourceTypes(Iterable<String> values) Optional.addResourceTypes(String value) Optional.addResourceTypesBytes(com.google.protobuf.ByteString value) Optional.build()clear()Required.The maximum number of resources to return.A page token, received from a previous [KeyTrackingService.SearchProtectedResources][google.cloud.kms.inventory.v1.KeyTrackingService.SearchProtectedResources] call.Optional.Required.Required.com.google.protobuf.ByteStringRequired.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorintThe maximum number of resources to return.A page token, received from a previous [KeyTrackingService.SearchProtectedResources][google.cloud.kms.inventory.v1.KeyTrackingService.SearchProtectedResources] call.com.google.protobuf.ByteStringA page token, received from a previous [KeyTrackingService.SearchProtectedResources][google.cloud.kms.inventory.v1.KeyTrackingService.SearchProtectedResources] call.getResourceTypes(int index) Optional.com.google.protobuf.ByteStringgetResourceTypesBytes(int index) Optional.intOptional.com.google.protobuf.ProtocolStringListOptional.getScope()Required.com.google.protobuf.ByteStringRequired.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) setCryptoKey(String value) Required.setCryptoKeyBytes(com.google.protobuf.ByteString value) Required.setPageSize(int value) The maximum number of resources to return.setPageToken(String value) A page token, received from a previous [KeyTrackingService.SearchProtectedResources][google.cloud.kms.inventory.v1.KeyTrackingService.SearchProtectedResources] call.setPageTokenBytes(com.google.protobuf.ByteString value) A page token, received from a previous [KeyTrackingService.SearchProtectedResources][google.cloud.kms.inventory.v1.KeyTrackingService.SearchProtectedResources] call.setResourceTypes(int index, String value) Optional.Required.setScopeBytes(com.google.protobuf.ByteString value) Required.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<SearchProtectedResourcesRequest.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<SearchProtectedResourcesRequest.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<SearchProtectedResourcesRequest.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<SearchProtectedResourcesRequest.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<SearchProtectedResourcesRequest.Builder>
-
mergeFrom
public SearchProtectedResourcesRequest.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<SearchProtectedResourcesRequest.Builder>- Throws:
IOException
-
getScope
Required. A scope can be an organization or a project. Resources protected by the crypto key in provided scope will be returned. The following values are allowed: * organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/12345678") * projects/{PROJECT_ID} (e.g., "projects/foo-bar") * projects/{PROJECT_NUMBER} (e.g., "projects/12345678")string scope = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }- Specified by:
getScopein interfaceSearchProtectedResourcesRequestOrBuilder- Returns:
- The scope.
-
getScopeBytes
public com.google.protobuf.ByteString getScopeBytes()Required. A scope can be an organization or a project. Resources protected by the crypto key in provided scope will be returned. The following values are allowed: * organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/12345678") * projects/{PROJECT_ID} (e.g., "projects/foo-bar") * projects/{PROJECT_NUMBER} (e.g., "projects/12345678")string scope = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }- Specified by:
getScopeBytesin interfaceSearchProtectedResourcesRequestOrBuilder- Returns:
- The bytes for scope.
-
setScope
Required. A scope can be an organization or a project. Resources protected by the crypto key in provided scope will be returned. The following values are allowed: * organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/12345678") * projects/{PROJECT_ID} (e.g., "projects/foo-bar") * projects/{PROJECT_NUMBER} (e.g., "projects/12345678")string scope = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }- Parameters:
value- The scope to set.- Returns:
- This builder for chaining.
-
clearScope
Required. A scope can be an organization or a project. Resources protected by the crypto key in provided scope will be returned. The following values are allowed: * organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/12345678") * projects/{PROJECT_ID} (e.g., "projects/foo-bar") * projects/{PROJECT_NUMBER} (e.g., "projects/12345678")string scope = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }- Returns:
- This builder for chaining.
-
setScopeBytes
Required. A scope can be an organization or a project. Resources protected by the crypto key in provided scope will be returned. The following values are allowed: * organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/12345678") * projects/{PROJECT_ID} (e.g., "projects/foo-bar") * projects/{PROJECT_NUMBER} (e.g., "projects/12345678")string scope = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }- Parameters:
value- The bytes for scope to set.- Returns:
- This builder for chaining.
-
getCryptoKey
Required. The resource name of the [CryptoKey][google.cloud.kms.v1.CryptoKey].
string crypto_key = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }- Specified by:
getCryptoKeyin interfaceSearchProtectedResourcesRequestOrBuilder- Returns:
- The cryptoKey.
-
getCryptoKeyBytes
public com.google.protobuf.ByteString getCryptoKeyBytes()Required. The resource name of the [CryptoKey][google.cloud.kms.v1.CryptoKey].
string crypto_key = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }- Specified by:
getCryptoKeyBytesin interfaceSearchProtectedResourcesRequestOrBuilder- Returns:
- The bytes for cryptoKey.
-
setCryptoKey
Required. The resource name of the [CryptoKey][google.cloud.kms.v1.CryptoKey].
string crypto_key = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }- Parameters:
value- The cryptoKey to set.- Returns:
- This builder for chaining.
-
clearCryptoKey
Required. The resource name of the [CryptoKey][google.cloud.kms.v1.CryptoKey].
string crypto_key = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }- Returns:
- This builder for chaining.
-
setCryptoKeyBytes
public SearchProtectedResourcesRequest.Builder setCryptoKeyBytes(com.google.protobuf.ByteString value) Required. The resource name of the [CryptoKey][google.cloud.kms.v1.CryptoKey].
string crypto_key = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }- Parameters:
value- The bytes for cryptoKey to set.- Returns:
- This builder for chaining.
-
getPageSize
public int getPageSize()The maximum number of resources to return. The service may return fewer than this value. If unspecified, at most 500 resources will be returned. The maximum value is 500; values above 500 will be coerced to 500.
int32 page_size = 3;- Specified by:
getPageSizein interfaceSearchProtectedResourcesRequestOrBuilder- Returns:
- The pageSize.
-
setPageSize
The maximum number of resources to return. The service may return fewer than this value. If unspecified, at most 500 resources will be returned. The maximum value is 500; values above 500 will be coerced to 500.
int32 page_size = 3;- Parameters:
value- The pageSize to set.- Returns:
- This builder for chaining.
-
clearPageSize
The maximum number of resources to return. The service may return fewer than this value. If unspecified, at most 500 resources will be returned. The maximum value is 500; values above 500 will be coerced to 500.
int32 page_size = 3;- Returns:
- This builder for chaining.
-
getPageToken
A page token, received from a previous [KeyTrackingService.SearchProtectedResources][google.cloud.kms.inventory.v1.KeyTrackingService.SearchProtectedResources] call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [KeyTrackingService.SearchProtectedResources][google.cloud.kms.inventory.v1.KeyTrackingService.SearchProtectedResources] must match the call that provided the page token.
string page_token = 4;- Specified by:
getPageTokenin interfaceSearchProtectedResourcesRequestOrBuilder- Returns:
- The pageToken.
-
getPageTokenBytes
public com.google.protobuf.ByteString getPageTokenBytes()A page token, received from a previous [KeyTrackingService.SearchProtectedResources][google.cloud.kms.inventory.v1.KeyTrackingService.SearchProtectedResources] call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [KeyTrackingService.SearchProtectedResources][google.cloud.kms.inventory.v1.KeyTrackingService.SearchProtectedResources] must match the call that provided the page token.
string page_token = 4;- Specified by:
getPageTokenBytesin interfaceSearchProtectedResourcesRequestOrBuilder- Returns:
- The bytes for pageToken.
-
setPageToken
A page token, received from a previous [KeyTrackingService.SearchProtectedResources][google.cloud.kms.inventory.v1.KeyTrackingService.SearchProtectedResources] call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [KeyTrackingService.SearchProtectedResources][google.cloud.kms.inventory.v1.KeyTrackingService.SearchProtectedResources] must match the call that provided the page token.
string page_token = 4;- Parameters:
value- The pageToken to set.- Returns:
- This builder for chaining.
-
clearPageToken
A page token, received from a previous [KeyTrackingService.SearchProtectedResources][google.cloud.kms.inventory.v1.KeyTrackingService.SearchProtectedResources] call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [KeyTrackingService.SearchProtectedResources][google.cloud.kms.inventory.v1.KeyTrackingService.SearchProtectedResources] must match the call that provided the page token.
string page_token = 4;- Returns:
- This builder for chaining.
-
setPageTokenBytes
public SearchProtectedResourcesRequest.Builder setPageTokenBytes(com.google.protobuf.ByteString value) A page token, received from a previous [KeyTrackingService.SearchProtectedResources][google.cloud.kms.inventory.v1.KeyTrackingService.SearchProtectedResources] call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [KeyTrackingService.SearchProtectedResources][google.cloud.kms.inventory.v1.KeyTrackingService.SearchProtectedResources] must match the call that provided the page token.
string page_token = 4;- Parameters:
value- The bytes for pageToken to set.- Returns:
- This builder for chaining.
-
getResourceTypesList
public com.google.protobuf.ProtocolStringList getResourceTypesList()Optional. A list of resource types that this request searches for. If empty, it will search all the [trackable resource types](https://cloud.google.com/kms/docs/view-key-usage#tracked-resource-types). Regular expressions are also supported. For example: * `compute.googleapis.com.*` snapshots resources whose type starts with `compute.googleapis.com`. * `.*Image` snapshots resources whose type ends with `Image`. * `.*Image.*` snapshots resources whose type contains `Image`. See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported regular expression syntax. If the regular expression does not match any supported resource type, an INVALID_ARGUMENT error will be returned.
repeated string resource_types = 5 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getResourceTypesListin interfaceSearchProtectedResourcesRequestOrBuilder- Returns:
- A list containing the resourceTypes.
-
getResourceTypesCount
public int getResourceTypesCount()Optional. A list of resource types that this request searches for. If empty, it will search all the [trackable resource types](https://cloud.google.com/kms/docs/view-key-usage#tracked-resource-types). Regular expressions are also supported. For example: * `compute.googleapis.com.*` snapshots resources whose type starts with `compute.googleapis.com`. * `.*Image` snapshots resources whose type ends with `Image`. * `.*Image.*` snapshots resources whose type contains `Image`. See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported regular expression syntax. If the regular expression does not match any supported resource type, an INVALID_ARGUMENT error will be returned.
repeated string resource_types = 5 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getResourceTypesCountin interfaceSearchProtectedResourcesRequestOrBuilder- Returns:
- The count of resourceTypes.
-
getResourceTypes
Optional. A list of resource types that this request searches for. If empty, it will search all the [trackable resource types](https://cloud.google.com/kms/docs/view-key-usage#tracked-resource-types). Regular expressions are also supported. For example: * `compute.googleapis.com.*` snapshots resources whose type starts with `compute.googleapis.com`. * `.*Image` snapshots resources whose type ends with `Image`. * `.*Image.*` snapshots resources whose type contains `Image`. See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported regular expression syntax. If the regular expression does not match any supported resource type, an INVALID_ARGUMENT error will be returned.
repeated string resource_types = 5 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getResourceTypesin interfaceSearchProtectedResourcesRequestOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The resourceTypes at the given index.
-
getResourceTypesBytes
public com.google.protobuf.ByteString getResourceTypesBytes(int index) Optional. A list of resource types that this request searches for. If empty, it will search all the [trackable resource types](https://cloud.google.com/kms/docs/view-key-usage#tracked-resource-types). Regular expressions are also supported. For example: * `compute.googleapis.com.*` snapshots resources whose type starts with `compute.googleapis.com`. * `.*Image` snapshots resources whose type ends with `Image`. * `.*Image.*` snapshots resources whose type contains `Image`. See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported regular expression syntax. If the regular expression does not match any supported resource type, an INVALID_ARGUMENT error will be returned.
repeated string resource_types = 5 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getResourceTypesBytesin interfaceSearchProtectedResourcesRequestOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the resourceTypes at the given index.
-
setResourceTypes
Optional. A list of resource types that this request searches for. If empty, it will search all the [trackable resource types](https://cloud.google.com/kms/docs/view-key-usage#tracked-resource-types). Regular expressions are also supported. For example: * `compute.googleapis.com.*` snapshots resources whose type starts with `compute.googleapis.com`. * `.*Image` snapshots resources whose type ends with `Image`. * `.*Image.*` snapshots resources whose type contains `Image`. See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported regular expression syntax. If the regular expression does not match any supported resource type, an INVALID_ARGUMENT error will be returned.
repeated string resource_types = 5 [(.google.api.field_behavior) = OPTIONAL];- Parameters:
index- The index to set the value at.value- The resourceTypes to set.- Returns:
- This builder for chaining.
-
addResourceTypes
Optional. A list of resource types that this request searches for. If empty, it will search all the [trackable resource types](https://cloud.google.com/kms/docs/view-key-usage#tracked-resource-types). Regular expressions are also supported. For example: * `compute.googleapis.com.*` snapshots resources whose type starts with `compute.googleapis.com`. * `.*Image` snapshots resources whose type ends with `Image`. * `.*Image.*` snapshots resources whose type contains `Image`. See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported regular expression syntax. If the regular expression does not match any supported resource type, an INVALID_ARGUMENT error will be returned.
repeated string resource_types = 5 [(.google.api.field_behavior) = OPTIONAL];- Parameters:
value- The resourceTypes to add.- Returns:
- This builder for chaining.
-
addAllResourceTypes
Optional. A list of resource types that this request searches for. If empty, it will search all the [trackable resource types](https://cloud.google.com/kms/docs/view-key-usage#tracked-resource-types). Regular expressions are also supported. For example: * `compute.googleapis.com.*` snapshots resources whose type starts with `compute.googleapis.com`. * `.*Image` snapshots resources whose type ends with `Image`. * `.*Image.*` snapshots resources whose type contains `Image`. See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported regular expression syntax. If the regular expression does not match any supported resource type, an INVALID_ARGUMENT error will be returned.
repeated string resource_types = 5 [(.google.api.field_behavior) = OPTIONAL];- Parameters:
values- The resourceTypes to add.- Returns:
- This builder for chaining.
-
clearResourceTypes
Optional. A list of resource types that this request searches for. If empty, it will search all the [trackable resource types](https://cloud.google.com/kms/docs/view-key-usage#tracked-resource-types). Regular expressions are also supported. For example: * `compute.googleapis.com.*` snapshots resources whose type starts with `compute.googleapis.com`. * `.*Image` snapshots resources whose type ends with `Image`. * `.*Image.*` snapshots resources whose type contains `Image`. See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported regular expression syntax. If the regular expression does not match any supported resource type, an INVALID_ARGUMENT error will be returned.
repeated string resource_types = 5 [(.google.api.field_behavior) = OPTIONAL];- Returns:
- This builder for chaining.
-
addResourceTypesBytes
public SearchProtectedResourcesRequest.Builder addResourceTypesBytes(com.google.protobuf.ByteString value) Optional. A list of resource types that this request searches for. If empty, it will search all the [trackable resource types](https://cloud.google.com/kms/docs/view-key-usage#tracked-resource-types). Regular expressions are also supported. For example: * `compute.googleapis.com.*` snapshots resources whose type starts with `compute.googleapis.com`. * `.*Image` snapshots resources whose type ends with `Image`. * `.*Image.*` snapshots resources whose type contains `Image`. See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported regular expression syntax. If the regular expression does not match any supported resource type, an INVALID_ARGUMENT error will be returned.
repeated string resource_types = 5 [(.google.api.field_behavior) = OPTIONAL];- Parameters:
value- The bytes of the resourceTypes to add.- Returns:
- This builder for chaining.
-