diff --git a/google/cloud/redis_v1/__init__.py b/google/cloud/redis_v1/__init__.py index 10c3f50..9baa4f5 100644 --- a/google/cloud/redis_v1/__init__.py +++ b/google/cloud/redis_v1/__init__.py @@ -26,8 +26,8 @@ if sys.version_info[:2] == (2, 7): message = ( - "A future version of this library will drop support for Python 2.7." - "More details about Python 2 support for Google Cloud Client Libraries" + "A future version of this library will drop support for Python 2.7. " + "More details about Python 2 support for Google Cloud Client Libraries " "can be found at https://cloud.google.com/python/docs/python2-sunset/" ) warnings.warn(message, DeprecationWarning) diff --git a/google/cloud/redis_v1/gapic/cloud_redis_client.py b/google/cloud/redis_v1/gapic/cloud_redis_client.py index 21c4b54..c2f0ff2 100644 --- a/google/cloud/redis_v1/gapic/cloud_redis_client.py +++ b/google/cloud/redis_v1/gapic/cloud_redis_client.py @@ -230,190 +230,6 @@ def __init__( self._inner_api_calls = {} # Service calls - def list_instances( - self, - parent, - page_size=None, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None, - ): - """ - Lists all Redis instances owned by a project in either the specified - location (region) or all locations. - - The location should have the following format: - - - ``projects/{project_id}/locations/{location_id}`` - - If ``location_id`` is specified as ``-`` (wildcard), then all regions - available to the project are queried, and the results are aggregated. - - Example: - >>> from google.cloud import redis_v1 - >>> - >>> client = redis_v1.CloudRedisClient() - >>> - >>> parent = client.location_path('[PROJECT]', '[LOCATION]') - >>> - >>> # Iterate over all results - >>> for element in client.list_instances(parent): - ... # process element - ... pass - >>> - >>> - >>> # Alternatively: - >>> - >>> # Iterate over results one page at a time - >>> for page in client.list_instances(parent).pages: - ... for element in page: - ... # process element - ... pass - - Args: - parent (str): Required. The resource name of the instance location using the form: - ``projects/{project_id}/locations/{location_id}`` where ``location_id`` - refers to a GCP region. - page_size (int): The maximum number of resources contained in the - underlying API response. If page streaming is performed per- - resource, this parameter does not affect the return value. If page - streaming is performed per-page, this determines the maximum number - of resources in a page. - retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will - be retried using a default configuration. - timeout (Optional[float]): The amount of time, in seconds, to wait - for the request to complete. Note that if ``retry`` is - specified, the timeout applies to each individual attempt. - metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata - that is provided to the method. - - Returns: - A :class:`~google.api_core.page_iterator.PageIterator` instance. - An iterable of :class:`~google.cloud.redis_v1.types.Instance` instances. - You can also iterate over the pages of the response - using its `pages` property. - - Raises: - google.api_core.exceptions.GoogleAPICallError: If the request - failed for any reason. - google.api_core.exceptions.RetryError: If the request failed due - to a retryable error and retry attempts failed. - ValueError: If the parameters are invalid. - """ - # Wrap the transport method to add retry and timeout logic. - if "list_instances" not in self._inner_api_calls: - self._inner_api_calls[ - "list_instances" - ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.list_instances, - default_retry=self._method_configs["ListInstances"].retry, - default_timeout=self._method_configs["ListInstances"].timeout, - client_info=self._client_info, - ) - - request = cloud_redis_pb2.ListInstancesRequest( - parent=parent, page_size=page_size - ) - if metadata is None: - metadata = [] - metadata = list(metadata) - try: - routing_header = [("parent", parent)] - except AttributeError: - pass - else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( - routing_header - ) - metadata.append(routing_metadata) - - iterator = google.api_core.page_iterator.GRPCIterator( - client=None, - method=functools.partial( - self._inner_api_calls["list_instances"], - retry=retry, - timeout=timeout, - metadata=metadata, - ), - request=request, - items_field="instances", - request_token_field="page_token", - response_token_field="next_page_token", - ) - return iterator - - def get_instance( - self, - name, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None, - ): - """ - Gets the details of a specific Redis instance. - - Example: - >>> from google.cloud import redis_v1 - >>> - >>> client = redis_v1.CloudRedisClient() - >>> - >>> name = client.instance_path('[PROJECT]', '[LOCATION]', '[INSTANCE]') - >>> - >>> response = client.get_instance(name) - - Args: - name (str): Required. Redis instance resource name using the form: - ``projects/{project_id}/locations/{location_id}/instances/{instance_id}`` - where ``location_id`` refers to a GCP region. - retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will - be retried using a default configuration. - timeout (Optional[float]): The amount of time, in seconds, to wait - for the request to complete. Note that if ``retry`` is - specified, the timeout applies to each individual attempt. - metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata - that is provided to the method. - - Returns: - A :class:`~google.cloud.redis_v1.types.Instance` instance. - - Raises: - google.api_core.exceptions.GoogleAPICallError: If the request - failed for any reason. - google.api_core.exceptions.RetryError: If the request failed due - to a retryable error and retry attempts failed. - ValueError: If the parameters are invalid. - """ - # Wrap the transport method to add retry and timeout logic. - if "get_instance" not in self._inner_api_calls: - self._inner_api_calls[ - "get_instance" - ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.get_instance, - default_retry=self._method_configs["GetInstance"].retry, - default_timeout=self._method_configs["GetInstance"].timeout, - client_info=self._client_info, - ) - - request = cloud_redis_pb2.GetInstanceRequest(name=name) - if metadata is None: - metadata = [] - metadata = list(metadata) - try: - routing_header = [("name", name)] - except AttributeError: - pass - else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( - routing_header - ) - metadata.append(routing_metadata) - - return self._inner_api_calls["get_instance"]( - request, retry=retry, timeout=timeout, metadata=metadata - ) - def create_instance( self, parent, @@ -428,7 +244,7 @@ def create_instance( size. By default, the instance is accessible from the project's `default - network `__. + network `__. The creation is executed asynchronously and callers may check the returned operation to track its progress. Once the operation is @@ -1032,3 +848,187 @@ def delete_instance( empty_pb2.Empty, metadata_type=cloud_redis_pb2.OperationMetadata, ) + + def list_instances( + self, + parent, + page_size=None, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): + """ + Lists all Redis instances owned by a project in either the specified + location (region) or all locations. + + The location should have the following format: + + - ``projects/{project_id}/locations/{location_id}`` + + If ``location_id`` is specified as ``-`` (wildcard), then all regions + available to the project are queried, and the results are aggregated. + + Example: + >>> from google.cloud import redis_v1 + >>> + >>> client = redis_v1.CloudRedisClient() + >>> + >>> parent = client.location_path('[PROJECT]', '[LOCATION]') + >>> + >>> # Iterate over all results + >>> for element in client.list_instances(parent): + ... # process element + ... pass + >>> + >>> + >>> # Alternatively: + >>> + >>> # Iterate over results one page at a time + >>> for page in client.list_instances(parent).pages: + ... for element in page: + ... # process element + ... pass + + Args: + parent (str): Required. The resource name of the instance location using the form: + ``projects/{project_id}/locations/{location_id}`` where ``location_id`` + refers to a GCP region. + page_size (int): The maximum number of resources contained in the + underlying API response. If page streaming is performed per- + resource, this parameter does not affect the return value. If page + streaming is performed per-page, this determines the maximum number + of resources in a page. + retry (Optional[google.api_core.retry.Retry]): A retry object used + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. + timeout (Optional[float]): The amount of time, in seconds, to wait + for the request to complete. Note that if ``retry`` is + specified, the timeout applies to each individual attempt. + metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata + that is provided to the method. + + Returns: + A :class:`~google.api_core.page_iterator.PageIterator` instance. + An iterable of :class:`~google.cloud.redis_v1.types.Instance` instances. + You can also iterate over the pages of the response + using its `pages` property. + + Raises: + google.api_core.exceptions.GoogleAPICallError: If the request + failed for any reason. + google.api_core.exceptions.RetryError: If the request failed due + to a retryable error and retry attempts failed. + ValueError: If the parameters are invalid. + """ + # Wrap the transport method to add retry and timeout logic. + if "list_instances" not in self._inner_api_calls: + self._inner_api_calls[ + "list_instances" + ] = google.api_core.gapic_v1.method.wrap_method( + self.transport.list_instances, + default_retry=self._method_configs["ListInstances"].retry, + default_timeout=self._method_configs["ListInstances"].timeout, + client_info=self._client_info, + ) + + request = cloud_redis_pb2.ListInstancesRequest( + parent=parent, page_size=page_size + ) + if metadata is None: + metadata = [] + metadata = list(metadata) + try: + routing_header = [("parent", parent)] + except AttributeError: + pass + else: + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( + routing_header + ) + metadata.append(routing_metadata) + + iterator = google.api_core.page_iterator.GRPCIterator( + client=None, + method=functools.partial( + self._inner_api_calls["list_instances"], + retry=retry, + timeout=timeout, + metadata=metadata, + ), + request=request, + items_field="instances", + request_token_field="page_token", + response_token_field="next_page_token", + ) + return iterator + + def get_instance( + self, + name, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): + """ + Gets the details of a specific Redis instance. + + Example: + >>> from google.cloud import redis_v1 + >>> + >>> client = redis_v1.CloudRedisClient() + >>> + >>> name = client.instance_path('[PROJECT]', '[LOCATION]', '[INSTANCE]') + >>> + >>> response = client.get_instance(name) + + Args: + name (str): Required. Redis instance resource name using the form: + ``projects/{project_id}/locations/{location_id}/instances/{instance_id}`` + where ``location_id`` refers to a GCP region. + retry (Optional[google.api_core.retry.Retry]): A retry object used + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. + timeout (Optional[float]): The amount of time, in seconds, to wait + for the request to complete. Note that if ``retry`` is + specified, the timeout applies to each individual attempt. + metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata + that is provided to the method. + + Returns: + A :class:`~google.cloud.redis_v1.types.Instance` instance. + + Raises: + google.api_core.exceptions.GoogleAPICallError: If the request + failed for any reason. + google.api_core.exceptions.RetryError: If the request failed due + to a retryable error and retry attempts failed. + ValueError: If the parameters are invalid. + """ + # Wrap the transport method to add retry and timeout logic. + if "get_instance" not in self._inner_api_calls: + self._inner_api_calls[ + "get_instance" + ] = google.api_core.gapic_v1.method.wrap_method( + self.transport.get_instance, + default_retry=self._method_configs["GetInstance"].retry, + default_timeout=self._method_configs["GetInstance"].timeout, + client_info=self._client_info, + ) + + request = cloud_redis_pb2.GetInstanceRequest(name=name) + if metadata is None: + metadata = [] + metadata = list(metadata) + try: + routing_header = [("name", name)] + except AttributeError: + pass + else: + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( + routing_header + ) + metadata.append(routing_metadata) + + return self._inner_api_calls["get_instance"]( + request, retry=retry, timeout=timeout, metadata=metadata + ) diff --git a/google/cloud/redis_v1/gapic/cloud_redis_client_config.py b/google/cloud/redis_v1/gapic/cloud_redis_client_config.py index 9d02648..5e208b8 100644 --- a/google/cloud/redis_v1/gapic/cloud_redis_client_config.py +++ b/google/cloud/redis_v1/gapic/cloud_redis_client_config.py @@ -1,61 +1,67 @@ config = { "interfaces": { "google.cloud.redis.v1.CloudRedis": { - "retry_codes": { - "idempotent": ["DEADLINE_EXCEEDED", "UNAVAILABLE"], - "non_idempotent": [], - }, + "retry_codes": {"no_retry_codes": [], "no_retry_1_codes": []}, "retry_params": { - "default": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 20000, + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0, + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 600000, "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 20000, + "max_rpc_timeout_millis": 600000, "total_timeout_millis": 600000, - } + }, }, "methods": { - "ListInstances": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", - }, - "GetInstance": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", - }, "CreateInstance": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params", }, "UpdateInstance": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params", }, "ImportInstance": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params", }, "ExportInstance": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params", }, "FailoverInstance": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params", }, "DeleteInstance": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params", + }, + "ListInstances": { + "timeout_millis": 600000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params", + }, + "GetInstance": { + "timeout_millis": 600000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params", }, }, } diff --git a/google/cloud/redis_v1/gapic/transports/cloud_redis_grpc_transport.py b/google/cloud/redis_v1/gapic/transports/cloud_redis_grpc_transport.py index 6f2f725..ab64967 100644 --- a/google/cloud/redis_v1/gapic/transports/cloud_redis_grpc_transport.py +++ b/google/cloud/redis_v1/gapic/transports/cloud_redis_grpc_transport.py @@ -113,40 +113,6 @@ def channel(self): """ return self._channel - @property - def list_instances(self): - """Return the gRPC stub for :meth:`CloudRedisClient.list_instances`. - - Lists all Redis instances owned by a project in either the specified - location (region) or all locations. - - The location should have the following format: - - - ``projects/{project_id}/locations/{location_id}`` - - If ``location_id`` is specified as ``-`` (wildcard), then all regions - available to the project are queried, and the results are aggregated. - - Returns: - Callable: A callable which accepts the appropriate - deserialized request object and returns a - deserialized response object. - """ - return self._stubs["cloud_redis_stub"].ListInstances - - @property - def get_instance(self): - """Return the gRPC stub for :meth:`CloudRedisClient.get_instance`. - - Gets the details of a specific Redis instance. - - Returns: - Callable: A callable which accepts the appropriate - deserialized request object and returns a - deserialized response object. - """ - return self._stubs["cloud_redis_stub"].GetInstance - @property def create_instance(self): """Return the gRPC stub for :meth:`CloudRedisClient.create_instance`. @@ -155,7 +121,7 @@ def create_instance(self): size. By default, the instance is accessible from the project's `default - network `__. + network `__. The creation is executed asynchronously and callers may check the returned operation to track its progress. Once the operation is @@ -255,3 +221,37 @@ def delete_instance(self): deserialized response object. """ return self._stubs["cloud_redis_stub"].DeleteInstance + + @property + def list_instances(self): + """Return the gRPC stub for :meth:`CloudRedisClient.list_instances`. + + Lists all Redis instances owned by a project in either the specified + location (region) or all locations. + + The location should have the following format: + + - ``projects/{project_id}/locations/{location_id}`` + + If ``location_id`` is specified as ``-`` (wildcard), then all regions + available to the project are queried, and the results are aggregated. + + Returns: + Callable: A callable which accepts the appropriate + deserialized request object and returns a + deserialized response object. + """ + return self._stubs["cloud_redis_stub"].ListInstances + + @property + def get_instance(self): + """Return the gRPC stub for :meth:`CloudRedisClient.get_instance`. + + Gets the details of a specific Redis instance. + + Returns: + Callable: A callable which accepts the appropriate + deserialized request object and returns a + deserialized response object. + """ + return self._stubs["cloud_redis_stub"].GetInstance diff --git a/google/cloud/redis_v1/proto/cloud_redis.proto b/google/cloud/redis_v1/proto/cloud_redis.proto index 1b46694..b98e129 100644 --- a/google/cloud/redis_v1/proto/cloud_redis.proto +++ b/google/cloud/redis_v1/proto/cloud_redis.proto @@ -75,7 +75,7 @@ service CloudRedis { // Creates a Redis instance based on the specified tier and memory size. // // By default, the instance is accessible from the project's - // [default network](/compute/docs/networks-and-firewalls#networks). + // [default network](https://cloud.google.com/vpc/docs/vpc). // // The creation is executed asynchronously and callers may check the returned // operation to track its progress. Once the operation is completed the Redis @@ -340,7 +340,7 @@ message Instance { int32 memory_size_gb = 18 [(google.api.field_behavior) = REQUIRED]; // Optional. The full name of the Google Compute Engine - // [network](/compute/docs/networks-and-firewalls#networks) to which the + // [network](https://cloud.google.com/vpc/docs/vpc) to which the // instance is connected. If left unspecified, the `default` network // will be used. string authorized_network = 20 [(google.api.field_behavior) = OPTIONAL]; diff --git a/google/cloud/redis_v1/proto/cloud_redis_pb2.py b/google/cloud/redis_v1/proto/cloud_redis_pb2.py index 12ad74a..a9c5683 100644 --- a/google/cloud/redis_v1/proto/cloud_redis_pb2.py +++ b/google/cloud/redis_v1/proto/cloud_redis_pb2.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/redis_v1/proto/cloud_redis.proto - +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection @@ -28,6 +28,7 @@ package="google.cloud.redis.v1", syntax="proto3", serialized_options=b"\n\031com.google.cloud.redis.v1B\030CloudRedisServiceV1ProtoP\001Z:google.golang.org/genproto/googleapis/cloud/redis/v1;redis", + create_key=_descriptor._internal_create_key, serialized_pb=b'\n-google/cloud/redis_v1/proto/cloud_redis.proto\x12\x15google.cloud.redis.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto"\xeb\t\n\x08Instance\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12;\n\x06labels\x18\x03 \x03(\x0b\x32+.google.cloud.redis.v1.Instance.LabelsEntry\x12\x18\n\x0blocation_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12$\n\x17\x61lternative_location_id\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rredis_version\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x1e\n\x11reserved_ip_range\x18\t \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04host\x18\n \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04port\x18\x0b \x01(\x05\x42\x03\xe0\x41\x03\x12 \n\x13\x63urrent_location_id\x18\x0c \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x39\n\x05state\x18\x0e \x01(\x0e\x32%.google.cloud.redis.v1.Instance.StateB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x0f \x01(\tB\x03\xe0\x41\x03\x12M\n\rredis_configs\x18\x10 \x03(\x0b\x32\x31.google.cloud.redis.v1.Instance.RedisConfigsEntryB\x03\xe0\x41\x01\x12\x37\n\x04tier\x18\x11 \x01(\x0e\x32$.google.cloud.redis.v1.Instance.TierB\x03\xe0\x41\x02\x12\x1b\n\x0ememory_size_gb\x18\x12 \x01(\x05\x42\x03\xe0\x41\x02\x12\x1f\n\x12\x61uthorized_network\x18\x14 \x01(\tB\x03\xe0\x41\x01\x12%\n\x18persistence_iam_identity\x18\x15 \x01(\tB\x03\xe0\x41\x03\x12\x46\n\x0c\x63onnect_mode\x18\x16 \x01(\x0e\x32+.google.cloud.redis.v1.Instance.ConnectModeB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x33\n\x11RedisConfigsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"\x94\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\t\n\x05READY\x10\x02\x12\x0c\n\x08UPDATING\x10\x03\x12\x0c\n\x08\x44\x45LETING\x10\x04\x12\r\n\tREPAIRING\x10\x05\x12\x0f\n\x0bMAINTENANCE\x10\x06\x12\r\n\tIMPORTING\x10\x08\x12\x10\n\x0c\x46\x41ILING_OVER\x10\t"8\n\x04Tier\x12\x14\n\x10TIER_UNSPECIFIED\x10\x00\x12\t\n\x05\x42\x41SIC\x10\x01\x12\x0f\n\x0bSTANDARD_HA\x10\x03"[\n\x0b\x43onnectMode\x12\x1c\n\x18\x43ONNECT_MODE_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x44IRECT_PEERING\x10\x01\x12\x1a\n\x16PRIVATE_SERVICE_ACCESS\x10\x02:`\xea\x41]\n\x1dredis.googleapis.com/Instance\x12\x82\xd3\xe4\x93\x02/\x12-/v1/{parent=projects/*/locations/*}/instances\xda\x41\x06parent\x12\x97\x01\n\x0bGetInstance\x12).google.cloud.redis.v1.GetInstanceRequest\x1a\x1f.google.cloud.redis.v1.Instance"<\x82\xd3\xe4\x93\x02/\x12-/v1/{name=projects/*/locations/*/instances/*}\xda\x41\x04name\x12\x89\x02\n\x0e\x43reateInstance\x12,.google.cloud.redis.v1.CreateInstanceRequest\x1a\x1d.google.longrunning.Operation"\xa9\x01\x82\xd3\xe4\x93\x02\x39"-/v1/{parent=projects/*/locations/*}/instances:\x08instance\xda\x41\x1bparent,instance_id,instance\xca\x41I\n\x1egoogle.cloud.redis.v1.Instance\x12\'google.cloud.redis.v1.OperationMetadata\x12\x8b\x02\n\x0eUpdateInstance\x12,.google.cloud.redis.v1.UpdateInstanceRequest\x1a\x1d.google.longrunning.Operation"\xab\x01\x82\xd3\xe4\x93\x02\x42\x32\x36/v1/{instance.name=projects/*/locations/*/instances/*}:\x08instance\xda\x41\x14update_mask,instance\xca\x41I\n\x1egoogle.cloud.redis.v1.Instance\x12\'google.cloud.redis.v1.OperationMetadata\x12\xff\x01\n\x0eImportInstance\x12,.google.cloud.redis.v1.ImportInstanceRequest\x1a\x1d.google.longrunning.Operation"\x9f\x01\x82\xd3\xe4\x93\x02\x39"4/v1/{name=projects/*/locations/*/instances/*}:import:\x01*\xda\x41\x11name,input_config\xca\x41I\n\x1egoogle.cloud.redis.v1.Instance\x12\'google.cloud.redis.v1.OperationMetadata\x12\x80\x02\n\x0e\x45xportInstance\x12,.google.cloud.redis.v1.ExportInstanceRequest\x1a\x1d.google.longrunning.Operation"\xa0\x01\x82\xd3\xe4\x93\x02\x39"4/v1/{name=projects/*/locations/*/instances/*}:export:\x01*\xda\x41\x12name,output_config\xca\x41I\n\x1egoogle.cloud.redis.v1.Instance\x12\'google.cloud.redis.v1.OperationMetadata\x12\x8d\x02\n\x10\x46\x61iloverInstance\x12..google.cloud.redis.v1.FailoverInstanceRequest\x1a\x1d.google.longrunning.Operation"\xa9\x01\x82\xd3\xe4\x93\x02;"6/v1/{name=projects/*/locations/*/instances/*}:failover:\x01*\xda\x41\x19name,data_protection_mode\xca\x41I\n\x1egoogle.cloud.redis.v1.Instance\x12\'google.cloud.redis.v1.OperationMetadata\x12\xde\x01\n\x0e\x44\x65leteInstance\x12,.google.cloud.redis.v1.DeleteInstanceRequest\x1a\x1d.google.longrunning.Operation"\x7f\x82\xd3\xe4\x93\x02/*-/v1/{name=projects/*/locations/*/instances/*}\xda\x41\x04name\xca\x41@\n\x15google.protobuf.Empty\x12\'google.cloud.redis.v1.OperationMetadata\x1aH\xca\x41\x14redis.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformBs\n\x19\x63om.google.cloud.redis.v1B\x18\x43loudRedisServiceV1ProtoP\x01Z:google.golang.org/genproto/googleapis/cloud/redis/v1;redisb\x06proto3', dependencies=[ google_dot_api_dot_annotations__pb2.DESCRIPTOR, @@ -46,6 +47,7 @@ full_name="google.cloud.redis.v1.Instance.State", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="STATE_UNSPECIFIED", @@ -53,30 +55,71 @@ number=0, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="CREATING", index=1, number=1, serialized_options=None, type=None + name="CREATING", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="READY", index=2, number=2, serialized_options=None, type=None + name="READY", + index=2, + number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="UPDATING", index=3, number=3, serialized_options=None, type=None + name="UPDATING", + index=3, + number=3, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="DELETING", index=4, number=4, serialized_options=None, type=None + name="DELETING", + index=4, + number=4, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="REPAIRING", index=5, number=5, serialized_options=None, type=None + name="REPAIRING", + index=5, + number=5, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="MAINTENANCE", index=6, number=6, serialized_options=None, type=None + name="MAINTENANCE", + index=6, + number=6, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="IMPORTING", index=7, number=8, serialized_options=None, type=None + name="IMPORTING", + index=7, + number=8, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="FAILING_OVER", index=8, number=9, serialized_options=None, type=None + name="FAILING_OVER", + index=8, + number=9, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, @@ -91,6 +134,7 @@ full_name="google.cloud.redis.v1.Instance.Tier", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="TIER_UNSPECIFIED", @@ -98,12 +142,23 @@ number=0, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="BASIC", index=1, number=1, serialized_options=None, type=None + name="BASIC", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="STANDARD_HA", index=2, number=3, serialized_options=None, type=None + name="STANDARD_HA", + index=2, + number=3, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, @@ -118,6 +173,7 @@ full_name="google.cloud.redis.v1.Instance.ConnectMode", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="CONNECT_MODE_UNSPECIFIED", @@ -125,9 +181,15 @@ number=0, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="DIRECT_PEERING", index=1, number=1, serialized_options=None, type=None + name="DIRECT_PEERING", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="PRIVATE_SERVICE_ACCESS", @@ -135,6 +197,7 @@ number=2, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, @@ -149,6 +212,7 @@ full_name="google.cloud.redis.v1.FailoverInstanceRequest.DataProtectionMode", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="DATA_PROTECTION_MODE_UNSPECIFIED", @@ -156,6 +220,7 @@ number=0, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="LIMITED_DATA_LOSS", @@ -163,6 +228,7 @@ number=1, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="FORCE_DATA_LOSS", @@ -170,6 +236,7 @@ number=2, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, @@ -186,6 +253,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="key", @@ -204,6 +272,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="value", @@ -222,6 +291,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -242,6 +312,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="key", @@ -260,6 +331,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="value", @@ -278,6 +350,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -298,6 +371,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -316,6 +390,7 @@ extension_scope=None, serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="display_name", @@ -334,6 +409,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="labels", @@ -352,6 +428,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="location_id", @@ -370,6 +447,7 @@ extension_scope=None, serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="alternative_location_id", @@ -388,6 +466,7 @@ extension_scope=None, serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="redis_version", @@ -406,6 +485,7 @@ extension_scope=None, serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="reserved_ip_range", @@ -424,6 +504,7 @@ extension_scope=None, serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="host", @@ -442,6 +523,7 @@ extension_scope=None, serialized_options=b"\340A\003", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="port", @@ -460,6 +542,7 @@ extension_scope=None, serialized_options=b"\340A\003", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="current_location_id", @@ -478,6 +561,7 @@ extension_scope=None, serialized_options=b"\340A\003", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="create_time", @@ -496,6 +580,7 @@ extension_scope=None, serialized_options=b"\340A\003", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="state", @@ -514,6 +599,7 @@ extension_scope=None, serialized_options=b"\340A\003", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="status_message", @@ -532,6 +618,7 @@ extension_scope=None, serialized_options=b"\340A\003", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="redis_configs", @@ -550,6 +637,7 @@ extension_scope=None, serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="tier", @@ -568,6 +656,7 @@ extension_scope=None, serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="memory_size_gb", @@ -586,6 +675,7 @@ extension_scope=None, serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="authorized_network", @@ -604,6 +694,7 @@ extension_scope=None, serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="persistence_iam_identity", @@ -622,6 +713,7 @@ extension_scope=None, serialized_options=b"\340A\003", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="connect_mode", @@ -640,6 +732,7 @@ extension_scope=None, serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -661,6 +754,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -679,6 +773,7 @@ extension_scope=None, serialized_options=b"\340A\002\372A#\n!locations.googleapis.com/Location", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_size", @@ -697,6 +792,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_token", @@ -715,6 +811,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -736,6 +833,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="instances", @@ -754,6 +852,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="next_page_token", @@ -772,6 +871,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="unreachable", @@ -790,6 +890,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -811,6 +912,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -829,6 +931,7 @@ extension_scope=None, serialized_options=b"\340A\002\372A\037\n\035redis.googleapis.com/Instance", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ) ], extensions=[], @@ -850,6 +953,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -868,6 +972,7 @@ extension_scope=None, serialized_options=b"\340A\002\372A#\n!locations.googleapis.com/Location", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="instance_id", @@ -886,6 +991,7 @@ extension_scope=None, serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="instance", @@ -904,6 +1010,7 @@ extension_scope=None, serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -925,6 +1032,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="update_mask", @@ -943,6 +1051,7 @@ extension_scope=None, serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="instance", @@ -961,6 +1070,7 @@ extension_scope=None, serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -982,6 +1092,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -1000,6 +1111,7 @@ extension_scope=None, serialized_options=b"\340A\002\372A\037\n\035redis.googleapis.com/Instance", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ) ], extensions=[], @@ -1021,6 +1133,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="uri", @@ -1039,6 +1152,7 @@ extension_scope=None, serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ) ], extensions=[], @@ -1060,6 +1174,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="gcs_source", @@ -1078,6 +1193,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ) ], extensions=[], @@ -1093,6 +1209,7 @@ full_name="google.cloud.redis.v1.InputConfig.source", index=0, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[], ) ], @@ -1107,6 +1224,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -1125,6 +1243,7 @@ extension_scope=None, serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="input_config", @@ -1143,6 +1262,7 @@ extension_scope=None, serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1164,6 +1284,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="uri", @@ -1182,6 +1303,7 @@ extension_scope=None, serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ) ], extensions=[], @@ -1203,6 +1325,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="gcs_destination", @@ -1221,6 +1344,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ) ], extensions=[], @@ -1236,6 +1360,7 @@ full_name="google.cloud.redis.v1.OutputConfig.destination", index=0, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[], ) ], @@ -1250,6 +1375,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -1268,6 +1394,7 @@ extension_scope=None, serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="output_config", @@ -1286,6 +1413,7 @@ extension_scope=None, serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1307,6 +1435,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -1325,6 +1454,7 @@ extension_scope=None, serialized_options=b"\340A\002\372A\037\n\035redis.googleapis.com/Instance", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="data_protection_mode", @@ -1343,6 +1473,7 @@ extension_scope=None, serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1364,6 +1495,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="create_time", @@ -1382,6 +1514,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="end_time", @@ -1400,6 +1533,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="target", @@ -1418,6 +1552,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="verb", @@ -1436,6 +1571,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="status_detail", @@ -1454,6 +1590,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="cancel_requested", @@ -1472,6 +1609,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="api_version", @@ -1490,6 +1628,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1511,6 +1650,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="key", @@ -1529,6 +1669,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="value", @@ -1547,6 +1688,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1567,6 +1709,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="available_zones", @@ -1585,6 +1728,7 @@ extension_scope=None, serialized_options=b"\340A\003", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ) ], extensions=[], @@ -1606,6 +1750,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[], extensions=[], nested_types=[], @@ -1716,7 +1861,6 @@ "__module__": "google.cloud.redis_v1.proto.cloud_redis_pb2", "__doc__": """A Google Cloud Redis instance. - Attributes: name: Required. Unique name of the resource in this scope including @@ -1795,9 +1939,9 @@ Required. Redis memory size in GiB. authorized_network: Optional. The full name of the Google Compute Engine `network - `__ to which - the instance is connected. If left unspecified, the - ``default`` network will be used. + `__ to which the + instance is connected. If left unspecified, the ``default`` + network will be used. persistence_iam_identity: Output only. Cloud IAM identity used by import / export operations to transfer data to/from Cloud Storage. Format is @@ -1824,7 +1968,6 @@ "__doc__": """Request for [ListInstances][google.cloud.redis.v1.CloudRedis.ListInstances]. - Attributes: parent: Required. The resource name of the instance location using the @@ -1857,7 +2000,6 @@ "__doc__": """Response for [ListInstances][google.cloud.redis.v1.CloudRedis.ListInstances]. - Attributes: instances: A list of Redis instances in the project in the specified @@ -1887,8 +2029,8 @@ { "DESCRIPTOR": _GETINSTANCEREQUEST, "__module__": "google.cloud.redis_v1.proto.cloud_redis_pb2", - "__doc__": """Request for [GetInstance][google.cloud.redis.v1.CloudRedis.GetInstance]. - + "__doc__": """Request for + [GetInstance][google.cloud.redis.v1.CloudRedis.GetInstance]. Attributes: name: @@ -1910,7 +2052,6 @@ "__doc__": """Request for [CreateInstance][google.cloud.redis.v1.CloudRedis.CreateInstance]. - Attributes: parent: Required. The resource name of the instance location using the @@ -1940,7 +2081,6 @@ "__doc__": """Request for [UpdateInstance][google.cloud.redis.v1.CloudRedis.UpdateInstance]. - Attributes: update_mask: Required. Mask of fields to update. At least one path must be @@ -1967,7 +2107,6 @@ "__doc__": """Request for [DeleteInstance][google.cloud.redis.v1.CloudRedis.DeleteInstance]. - Attributes: name: Required. Redis instance resource name using the form: ``proje @@ -1987,7 +2126,6 @@ "__module__": "google.cloud.redis_v1.proto.cloud_redis_pb2", "__doc__": """The Cloud Storage location for the input content - Attributes: uri: Required. Source data URI. (e.g. ‘gs://my_bucket/my_object’). @@ -2005,7 +2143,6 @@ "__module__": "google.cloud.redis_v1.proto.cloud_redis_pb2", "__doc__": """The input content - Attributes: source: Required. Specify source location of input data @@ -2023,9 +2160,7 @@ { "DESCRIPTOR": _IMPORTINSTANCEREQUEST, "__module__": "google.cloud.redis_v1.proto.cloud_redis_pb2", - "__doc__": """Request for - [Import][google.cloud.redis.v1.CloudRedis.ImportInstance]. - + "__doc__": """Request for [Import][google.cloud.redis.v1.CloudRedis.ImportInstance]. Attributes: name: @@ -2048,7 +2183,6 @@ "__module__": "google.cloud.redis_v1.proto.cloud_redis_pb2", "__doc__": """The Cloud Storage location for the output content - Attributes: uri: Required. Data destination URI (e.g. @@ -2068,7 +2202,6 @@ "__module__": "google.cloud.redis_v1.proto.cloud_redis_pb2", "__doc__": """The output content - Attributes: destination: Required. Specify destination location of output data @@ -2086,9 +2219,7 @@ { "DESCRIPTOR": _EXPORTINSTANCEREQUEST, "__module__": "google.cloud.redis_v1.proto.cloud_redis_pb2", - "__doc__": """Request for - [Export][google.cloud.redis.v1.CloudRedis.ExportInstance]. - + "__doc__": """Request for [Export][google.cloud.redis.v1.CloudRedis.ExportInstance]. Attributes: name: @@ -2112,7 +2243,6 @@ "__doc__": """Request for [Failover][google.cloud.redis.v1.CloudRedis.FailoverInstance]. - Attributes: name: Required. Redis instance resource name using the form: ``proje @@ -2136,7 +2266,6 @@ "__module__": "google.cloud.redis_v1.proto.cloud_redis_pb2", "__doc__": """Represents the v1 metadata of the long-running operation. - Attributes: create_time: Creation timestamp. @@ -2173,12 +2302,11 @@ ), "DESCRIPTOR": _LOCATIONMETADATA, "__module__": "google.cloud.redis_v1.proto.cloud_redis_pb2", - "__doc__": """This location metadata represents additional configuration - options for a given location where a Redis instance may be created. All - fields are output only. It is returned as content of the + "__doc__": """This location metadata represents additional configuration options for + a given location where a Redis instance may be created. All fields are + output only. It is returned as content of the ``google.cloud.location.Location.metadata`` field. - Attributes: available_zones: Output only. The set of available zones in the location. The @@ -2199,10 +2327,8 @@ { "DESCRIPTOR": _ZONEMETADATA, "__module__": "google.cloud.redis_v1.proto.cloud_redis_pb2", - "__doc__": """Defines specific information for a particular zone. - Currently empty and reserved for future use only. - - """, + "__doc__": """Defines specific information for a particular zone. Currently empty + and reserved for future use only.""", # @@protoc_insertion_point(class_scope:google.cloud.redis.v1.ZoneMetadata) }, ) @@ -2255,6 +2381,7 @@ file=DESCRIPTOR, index=0, serialized_options=b"\312A\024redis.googleapis.com\322A.https://www.googleapis.com/auth/cloud-platform", + create_key=_descriptor._internal_create_key, serialized_start=3440, serialized_end=5405, methods=[ @@ -2266,6 +2393,7 @@ input_type=_LISTINSTANCESREQUEST, output_type=_LISTINSTANCESRESPONSE, serialized_options=b"\202\323\344\223\002/\022-/v1/{parent=projects/*/locations/*}/instances\332A\006parent", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="GetInstance", @@ -2275,6 +2403,7 @@ input_type=_GETINSTANCEREQUEST, output_type=_INSTANCE, serialized_options=b"\202\323\344\223\002/\022-/v1/{name=projects/*/locations/*/instances/*}\332A\004name", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="CreateInstance", @@ -2284,6 +2413,7 @@ input_type=_CREATEINSTANCEREQUEST, output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, serialized_options=b"\202\323\344\223\0029\"-/v1/{parent=projects/*/locations/*}/instances:\010instance\332A\033parent,instance_id,instance\312AI\n\036google.cloud.redis.v1.Instance\022'google.cloud.redis.v1.OperationMetadata", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="UpdateInstance", @@ -2293,6 +2423,7 @@ input_type=_UPDATEINSTANCEREQUEST, output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, serialized_options=b"\202\323\344\223\002B26/v1/{instance.name=projects/*/locations/*/instances/*}:\010instance\332A\024update_mask,instance\312AI\n\036google.cloud.redis.v1.Instance\022'google.cloud.redis.v1.OperationMetadata", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="ImportInstance", @@ -2302,6 +2433,7 @@ input_type=_IMPORTINSTANCEREQUEST, output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, serialized_options=b"\202\323\344\223\0029\"4/v1/{name=projects/*/locations/*/instances/*}:import:\001*\332A\021name,input_config\312AI\n\036google.cloud.redis.v1.Instance\022'google.cloud.redis.v1.OperationMetadata", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="ExportInstance", @@ -2311,6 +2443,7 @@ input_type=_EXPORTINSTANCEREQUEST, output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, serialized_options=b"\202\323\344\223\0029\"4/v1/{name=projects/*/locations/*/instances/*}:export:\001*\332A\022name,output_config\312AI\n\036google.cloud.redis.v1.Instance\022'google.cloud.redis.v1.OperationMetadata", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="FailoverInstance", @@ -2320,6 +2453,7 @@ input_type=_FAILOVERINSTANCEREQUEST, output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, serialized_options=b"\202\323\344\223\002;\"6/v1/{name=projects/*/locations/*/instances/*}:failover:\001*\332A\031name,data_protection_mode\312AI\n\036google.cloud.redis.v1.Instance\022'google.cloud.redis.v1.OperationMetadata", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="DeleteInstance", @@ -2329,6 +2463,7 @@ input_type=_DELETEINSTANCEREQUEST, output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, serialized_options=b"\202\323\344\223\002/*-/v1/{name=projects/*/locations/*/instances/*}\332A\004name\312A@\n\025google.protobuf.Empty\022'google.cloud.redis.v1.OperationMetadata", + create_key=_descriptor._internal_create_key, ), ], ) diff --git a/google/cloud/redis_v1/proto/cloud_redis_pb2_grpc.py b/google/cloud/redis_v1/proto/cloud_redis_pb2_grpc.py index 42829d3..90e1537 100644 --- a/google/cloud/redis_v1/proto/cloud_redis_pb2_grpc.py +++ b/google/cloud/redis_v1/proto/cloud_redis_pb2_grpc.py @@ -1,4 +1,5 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc from google.cloud.redis_v1.proto import ( @@ -12,27 +13,27 @@ class CloudRedisStub(object): """Configures and manages Cloud Memorystore for Redis instances - Google Cloud Memorystore for Redis v1 + Google Cloud Memorystore for Redis v1 - The `redis.googleapis.com` service implements the Google Cloud Memorystore - for Redis API and defines the following resource model for managing Redis - instances: - * The service works with a collection of cloud projects, named: `/projects/*` - * Each project has a collection of available locations, named: `/locations/*` - * Each location has a collection of Redis instances, named: `/instances/*` - * As such, Redis instances are resources of the form: - `/projects/{project_id}/locations/{location_id}/instances/{instance_id}` + The `redis.googleapis.com` service implements the Google Cloud Memorystore + for Redis API and defines the following resource model for managing Redis + instances: + * The service works with a collection of cloud projects, named: `/projects/*` + * Each project has a collection of available locations, named: `/locations/*` + * Each location has a collection of Redis instances, named: `/instances/*` + * As such, Redis instances are resources of the form: + `/projects/{project_id}/locations/{location_id}/instances/{instance_id}` - Note that location_id must be referring to a GCP `region`; for example: - * `projects/redpepper-1290/locations/us-central1/instances/my-redis` - """ + Note that location_id must be referring to a GCP `region`; for example: + * `projects/redpepper-1290/locations/us-central1/instances/my-redis` + """ def __init__(self, channel): """Constructor. - Args: - channel: A grpc.Channel. - """ + Args: + channel: A grpc.Channel. + """ self.ListInstances = channel.unary_unary( "/google.cloud.redis.v1.CloudRedis/ListInstances", request_serializer=google_dot_cloud_dot_redis__v1_dot_proto_dot_cloud__redis__pb2.ListInstancesRequest.SerializeToString, @@ -78,39 +79,39 @@ def __init__(self, channel): class CloudRedisServicer(object): """Configures and manages Cloud Memorystore for Redis instances - Google Cloud Memorystore for Redis v1 + Google Cloud Memorystore for Redis v1 - The `redis.googleapis.com` service implements the Google Cloud Memorystore - for Redis API and defines the following resource model for managing Redis - instances: - * The service works with a collection of cloud projects, named: `/projects/*` - * Each project has a collection of available locations, named: `/locations/*` - * Each location has a collection of Redis instances, named: `/instances/*` - * As such, Redis instances are resources of the form: - `/projects/{project_id}/locations/{location_id}/instances/{instance_id}` + The `redis.googleapis.com` service implements the Google Cloud Memorystore + for Redis API and defines the following resource model for managing Redis + instances: + * The service works with a collection of cloud projects, named: `/projects/*` + * Each project has a collection of available locations, named: `/locations/*` + * Each location has a collection of Redis instances, named: `/instances/*` + * As such, Redis instances are resources of the form: + `/projects/{project_id}/locations/{location_id}/instances/{instance_id}` - Note that location_id must be referring to a GCP `region`; for example: - * `projects/redpepper-1290/locations/us-central1/instances/my-redis` - """ + Note that location_id must be referring to a GCP `region`; for example: + * `projects/redpepper-1290/locations/us-central1/instances/my-redis` + """ def ListInstances(self, request, context): """Lists all Redis instances owned by a project in either the specified - location (region) or all locations. + location (region) or all locations. - The location should have the following format: + The location should have the following format: - * `projects/{project_id}/locations/{location_id}` + * `projects/{project_id}/locations/{location_id}` - If `location_id` is specified as `-` (wildcard), then all regions - available to the project are queried, and the results are aggregated. - """ + If `location_id` is specified as `-` (wildcard), then all regions + available to the project are queried, and the results are aggregated. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def GetInstance(self, request, context): """Gets the details of a specific Redis instance. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -118,17 +119,17 @@ def GetInstance(self, request, context): def CreateInstance(self, request, context): """Creates a Redis instance based on the specified tier and memory size. - By default, the instance is accessible from the project's - [default network](/compute/docs/networks-and-firewalls#networks). + By default, the instance is accessible from the project's + [default network](https://cloud.google.com/vpc/docs/vpc). - The creation is executed asynchronously and callers may check the returned - operation to track its progress. Once the operation is completed the Redis - instance will be fully functional. Completed longrunning.Operation will - contain the new instance object in the response field. + The creation is executed asynchronously and callers may check the returned + operation to track its progress. Once the operation is completed the Redis + instance will be fully functional. Completed longrunning.Operation will + contain the new instance object in the response field. - The returned operation is automatically deleted after a few hours, so there - is no need to call DeleteOperation. - """ + The returned operation is automatically deleted after a few hours, so there + is no need to call DeleteOperation. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -136,10 +137,10 @@ def CreateInstance(self, request, context): def UpdateInstance(self, request, context): """Updates the metadata and configuration of a specific Redis instance. - Completed longrunning.Operation will contain the new instance object - in the response field. The returned operation is automatically deleted - after a few hours, so there is no need to call DeleteOperation. - """ + Completed longrunning.Operation will contain the new instance object + in the response field. The returned operation is automatically deleted + after a few hours, so there is no need to call DeleteOperation. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -147,13 +148,13 @@ def UpdateInstance(self, request, context): def ImportInstance(self, request, context): """Import a Redis RDB snapshot file from Cloud Storage into a Redis instance. - Redis may stop serving during this operation. Instance state will be - IMPORTING for entire operation. When complete, the instance will contain - only data from the imported file. + Redis may stop serving during this operation. Instance state will be + IMPORTING for entire operation. When complete, the instance will contain + only data from the imported file. - The returned operation is automatically deleted after a few hours, so - there is no need to call DeleteOperation. - """ + The returned operation is automatically deleted after a few hours, so + there is no need to call DeleteOperation. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -161,27 +162,27 @@ def ImportInstance(self, request, context): def ExportInstance(self, request, context): """Export Redis instance data into a Redis RDB format file in Cloud Storage. - Redis will continue serving during this operation. + Redis will continue serving during this operation. - The returned operation is automatically deleted after a few hours, so - there is no need to call DeleteOperation. - """ + The returned operation is automatically deleted after a few hours, so + there is no need to call DeleteOperation. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def FailoverInstance(self, request, context): """Initiates a failover of the master node to current replica node for a - specific STANDARD tier Cloud Memorystore for Redis instance. - """ + specific STANDARD tier Cloud Memorystore for Redis instance. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def DeleteInstance(self, request, context): """Deletes a specific Redis instance. Instance stops serving and data is - deleted. - """ + deleted. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -234,3 +235,239 @@ def add_CloudRedisServicer_to_server(servicer, server): "google.cloud.redis.v1.CloudRedis", rpc_method_handlers ) server.add_generic_rpc_handlers((generic_handler,)) + + +# This class is part of an EXPERIMENTAL API. +class CloudRedis(object): + """Configures and manages Cloud Memorystore for Redis instances + + Google Cloud Memorystore for Redis v1 + + The `redis.googleapis.com` service implements the Google Cloud Memorystore + for Redis API and defines the following resource model for managing Redis + instances: + * The service works with a collection of cloud projects, named: `/projects/*` + * Each project has a collection of available locations, named: `/locations/*` + * Each location has a collection of Redis instances, named: `/instances/*` + * As such, Redis instances are resources of the form: + `/projects/{project_id}/locations/{location_id}/instances/{instance_id}` + + Note that location_id must be referring to a GCP `region`; for example: + * `projects/redpepper-1290/locations/us-central1/instances/my-redis` + """ + + @staticmethod + def ListInstances( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.redis.v1.CloudRedis/ListInstances", + google_dot_cloud_dot_redis__v1_dot_proto_dot_cloud__redis__pb2.ListInstancesRequest.SerializeToString, + google_dot_cloud_dot_redis__v1_dot_proto_dot_cloud__redis__pb2.ListInstancesResponse.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def GetInstance( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.redis.v1.CloudRedis/GetInstance", + google_dot_cloud_dot_redis__v1_dot_proto_dot_cloud__redis__pb2.GetInstanceRequest.SerializeToString, + google_dot_cloud_dot_redis__v1_dot_proto_dot_cloud__redis__pb2.Instance.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def CreateInstance( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.redis.v1.CloudRedis/CreateInstance", + google_dot_cloud_dot_redis__v1_dot_proto_dot_cloud__redis__pb2.CreateInstanceRequest.SerializeToString, + google_dot_longrunning_dot_operations__pb2.Operation.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def UpdateInstance( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.redis.v1.CloudRedis/UpdateInstance", + google_dot_cloud_dot_redis__v1_dot_proto_dot_cloud__redis__pb2.UpdateInstanceRequest.SerializeToString, + google_dot_longrunning_dot_operations__pb2.Operation.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def ImportInstance( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.redis.v1.CloudRedis/ImportInstance", + google_dot_cloud_dot_redis__v1_dot_proto_dot_cloud__redis__pb2.ImportInstanceRequest.SerializeToString, + google_dot_longrunning_dot_operations__pb2.Operation.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def ExportInstance( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.redis.v1.CloudRedis/ExportInstance", + google_dot_cloud_dot_redis__v1_dot_proto_dot_cloud__redis__pb2.ExportInstanceRequest.SerializeToString, + google_dot_longrunning_dot_operations__pb2.Operation.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def FailoverInstance( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.redis.v1.CloudRedis/FailoverInstance", + google_dot_cloud_dot_redis__v1_dot_proto_dot_cloud__redis__pb2.FailoverInstanceRequest.SerializeToString, + google_dot_longrunning_dot_operations__pb2.Operation.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def DeleteInstance( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.redis.v1.CloudRedis/DeleteInstance", + google_dot_cloud_dot_redis__v1_dot_proto_dot_cloud__redis__pb2.DeleteInstanceRequest.SerializeToString, + google_dot_longrunning_dot_operations__pb2.Operation.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) diff --git a/google/cloud/redis_v1beta1/__init__.py b/google/cloud/redis_v1beta1/__init__.py index 6fb67cb..a5285b5 100644 --- a/google/cloud/redis_v1beta1/__init__.py +++ b/google/cloud/redis_v1beta1/__init__.py @@ -26,8 +26,8 @@ if sys.version_info[:2] == (2, 7): message = ( - "A future version of this library will drop support for Python 2.7." - "More details about Python 2 support for Google Cloud Client Libraries" + "A future version of this library will drop support for Python 2.7. " + "More details about Python 2 support for Google Cloud Client Libraries " "can be found at https://cloud.google.com/python/docs/python2-sunset/" ) warnings.warn(message, DeprecationWarning) diff --git a/google/cloud/redis_v1beta1/gapic/cloud_redis_client.py b/google/cloud/redis_v1beta1/gapic/cloud_redis_client.py index 69b51ba..28fcabf 100644 --- a/google/cloud/redis_v1beta1/gapic/cloud_redis_client.py +++ b/google/cloud/redis_v1beta1/gapic/cloud_redis_client.py @@ -230,190 +230,6 @@ def __init__( self._inner_api_calls = {} # Service calls - def list_instances( - self, - parent, - page_size=None, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None, - ): - """ - Lists all Redis instances owned by a project in either the specified - location (region) or all locations. - - The location should have the following format: - - - ``projects/{project_id}/locations/{location_id}`` - - If ``location_id`` is specified as ``-`` (wildcard), then all regions - available to the project are queried, and the results are aggregated. - - Example: - >>> from google.cloud import redis_v1beta1 - >>> - >>> client = redis_v1beta1.CloudRedisClient() - >>> - >>> parent = client.location_path('[PROJECT]', '[LOCATION]') - >>> - >>> # Iterate over all results - >>> for element in client.list_instances(parent): - ... # process element - ... pass - >>> - >>> - >>> # Alternatively: - >>> - >>> # Iterate over results one page at a time - >>> for page in client.list_instances(parent).pages: - ... for element in page: - ... # process element - ... pass - - Args: - parent (str): Required. The resource name of the instance location using the form: - ``projects/{project_id}/locations/{location_id}`` where ``location_id`` - refers to a GCP region. - page_size (int): The maximum number of resources contained in the - underlying API response. If page streaming is performed per- - resource, this parameter does not affect the return value. If page - streaming is performed per-page, this determines the maximum number - of resources in a page. - retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will - be retried using a default configuration. - timeout (Optional[float]): The amount of time, in seconds, to wait - for the request to complete. Note that if ``retry`` is - specified, the timeout applies to each individual attempt. - metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata - that is provided to the method. - - Returns: - A :class:`~google.api_core.page_iterator.PageIterator` instance. - An iterable of :class:`~google.cloud.redis_v1beta1.types.Instance` instances. - You can also iterate over the pages of the response - using its `pages` property. - - Raises: - google.api_core.exceptions.GoogleAPICallError: If the request - failed for any reason. - google.api_core.exceptions.RetryError: If the request failed due - to a retryable error and retry attempts failed. - ValueError: If the parameters are invalid. - """ - # Wrap the transport method to add retry and timeout logic. - if "list_instances" not in self._inner_api_calls: - self._inner_api_calls[ - "list_instances" - ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.list_instances, - default_retry=self._method_configs["ListInstances"].retry, - default_timeout=self._method_configs["ListInstances"].timeout, - client_info=self._client_info, - ) - - request = cloud_redis_pb2.ListInstancesRequest( - parent=parent, page_size=page_size - ) - if metadata is None: - metadata = [] - metadata = list(metadata) - try: - routing_header = [("parent", parent)] - except AttributeError: - pass - else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( - routing_header - ) - metadata.append(routing_metadata) - - iterator = google.api_core.page_iterator.GRPCIterator( - client=None, - method=functools.partial( - self._inner_api_calls["list_instances"], - retry=retry, - timeout=timeout, - metadata=metadata, - ), - request=request, - items_field="instances", - request_token_field="page_token", - response_token_field="next_page_token", - ) - return iterator - - def get_instance( - self, - name, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None, - ): - """ - Gets the details of a specific Redis instance. - - Example: - >>> from google.cloud import redis_v1beta1 - >>> - >>> client = redis_v1beta1.CloudRedisClient() - >>> - >>> name = client.instance_path('[PROJECT]', '[LOCATION]', '[INSTANCE]') - >>> - >>> response = client.get_instance(name) - - Args: - name (str): Required. Redis instance resource name using the form: - ``projects/{project_id}/locations/{location_id}/instances/{instance_id}`` - where ``location_id`` refers to a GCP region. - retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will - be retried using a default configuration. - timeout (Optional[float]): The amount of time, in seconds, to wait - for the request to complete. Note that if ``retry`` is - specified, the timeout applies to each individual attempt. - metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata - that is provided to the method. - - Returns: - A :class:`~google.cloud.redis_v1beta1.types.Instance` instance. - - Raises: - google.api_core.exceptions.GoogleAPICallError: If the request - failed for any reason. - google.api_core.exceptions.RetryError: If the request failed due - to a retryable error and retry attempts failed. - ValueError: If the parameters are invalid. - """ - # Wrap the transport method to add retry and timeout logic. - if "get_instance" not in self._inner_api_calls: - self._inner_api_calls[ - "get_instance" - ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.get_instance, - default_retry=self._method_configs["GetInstance"].retry, - default_timeout=self._method_configs["GetInstance"].timeout, - client_info=self._client_info, - ) - - request = cloud_redis_pb2.GetInstanceRequest(name=name) - if metadata is None: - metadata = [] - metadata = list(metadata) - try: - routing_header = [("name", name)] - except AttributeError: - pass - else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( - routing_header - ) - metadata.append(routing_metadata) - - return self._inner_api_calls["get_instance"]( - request, retry=retry, timeout=timeout, metadata=metadata - ) - def create_instance( self, parent, @@ -428,7 +244,7 @@ def create_instance( size. By default, the instance is accessible from the project's `default - network `__. + network `__. The creation is executed asynchronously and callers may check the returned operation to track its progress. Once the operation is @@ -1033,6 +849,190 @@ def delete_instance( metadata_type=any_pb2.Any, ) + def list_instances( + self, + parent, + page_size=None, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): + """ + Lists all Redis instances owned by a project in either the specified + location (region) or all locations. + + The location should have the following format: + + - ``projects/{project_id}/locations/{location_id}`` + + If ``location_id`` is specified as ``-`` (wildcard), then all regions + available to the project are queried, and the results are aggregated. + + Example: + >>> from google.cloud import redis_v1beta1 + >>> + >>> client = redis_v1beta1.CloudRedisClient() + >>> + >>> parent = client.location_path('[PROJECT]', '[LOCATION]') + >>> + >>> # Iterate over all results + >>> for element in client.list_instances(parent): + ... # process element + ... pass + >>> + >>> + >>> # Alternatively: + >>> + >>> # Iterate over results one page at a time + >>> for page in client.list_instances(parent).pages: + ... for element in page: + ... # process element + ... pass + + Args: + parent (str): Required. The resource name of the instance location using the form: + ``projects/{project_id}/locations/{location_id}`` where ``location_id`` + refers to a GCP region. + page_size (int): The maximum number of resources contained in the + underlying API response. If page streaming is performed per- + resource, this parameter does not affect the return value. If page + streaming is performed per-page, this determines the maximum number + of resources in a page. + retry (Optional[google.api_core.retry.Retry]): A retry object used + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. + timeout (Optional[float]): The amount of time, in seconds, to wait + for the request to complete. Note that if ``retry`` is + specified, the timeout applies to each individual attempt. + metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata + that is provided to the method. + + Returns: + A :class:`~google.api_core.page_iterator.PageIterator` instance. + An iterable of :class:`~google.cloud.redis_v1beta1.types.Instance` instances. + You can also iterate over the pages of the response + using its `pages` property. + + Raises: + google.api_core.exceptions.GoogleAPICallError: If the request + failed for any reason. + google.api_core.exceptions.RetryError: If the request failed due + to a retryable error and retry attempts failed. + ValueError: If the parameters are invalid. + """ + # Wrap the transport method to add retry and timeout logic. + if "list_instances" not in self._inner_api_calls: + self._inner_api_calls[ + "list_instances" + ] = google.api_core.gapic_v1.method.wrap_method( + self.transport.list_instances, + default_retry=self._method_configs["ListInstances"].retry, + default_timeout=self._method_configs["ListInstances"].timeout, + client_info=self._client_info, + ) + + request = cloud_redis_pb2.ListInstancesRequest( + parent=parent, page_size=page_size + ) + if metadata is None: + metadata = [] + metadata = list(metadata) + try: + routing_header = [("parent", parent)] + except AttributeError: + pass + else: + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( + routing_header + ) + metadata.append(routing_metadata) + + iterator = google.api_core.page_iterator.GRPCIterator( + client=None, + method=functools.partial( + self._inner_api_calls["list_instances"], + retry=retry, + timeout=timeout, + metadata=metadata, + ), + request=request, + items_field="instances", + request_token_field="page_token", + response_token_field="next_page_token", + ) + return iterator + + def get_instance( + self, + name, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): + """ + Gets the details of a specific Redis instance. + + Example: + >>> from google.cloud import redis_v1beta1 + >>> + >>> client = redis_v1beta1.CloudRedisClient() + >>> + >>> name = client.instance_path('[PROJECT]', '[LOCATION]', '[INSTANCE]') + >>> + >>> response = client.get_instance(name) + + Args: + name (str): Required. Redis instance resource name using the form: + ``projects/{project_id}/locations/{location_id}/instances/{instance_id}`` + where ``location_id`` refers to a GCP region. + retry (Optional[google.api_core.retry.Retry]): A retry object used + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. + timeout (Optional[float]): The amount of time, in seconds, to wait + for the request to complete. Note that if ``retry`` is + specified, the timeout applies to each individual attempt. + metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata + that is provided to the method. + + Returns: + A :class:`~google.cloud.redis_v1beta1.types.Instance` instance. + + Raises: + google.api_core.exceptions.GoogleAPICallError: If the request + failed for any reason. + google.api_core.exceptions.RetryError: If the request failed due + to a retryable error and retry attempts failed. + ValueError: If the parameters are invalid. + """ + # Wrap the transport method to add retry and timeout logic. + if "get_instance" not in self._inner_api_calls: + self._inner_api_calls[ + "get_instance" + ] = google.api_core.gapic_v1.method.wrap_method( + self.transport.get_instance, + default_retry=self._method_configs["GetInstance"].retry, + default_timeout=self._method_configs["GetInstance"].timeout, + client_info=self._client_info, + ) + + request = cloud_redis_pb2.GetInstanceRequest(name=name) + if metadata is None: + metadata = [] + metadata = list(metadata) + try: + routing_header = [("name", name)] + except AttributeError: + pass + else: + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( + routing_header + ) + metadata.append(routing_metadata) + + return self._inner_api_calls["get_instance"]( + request, retry=retry, timeout=timeout, metadata=metadata + ) + def upgrade_instance( self, name, diff --git a/google/cloud/redis_v1beta1/gapic/cloud_redis_client_config.py b/google/cloud/redis_v1beta1/gapic/cloud_redis_client_config.py index f121cc9..56b63aa 100644 --- a/google/cloud/redis_v1beta1/gapic/cloud_redis_client_config.py +++ b/google/cloud/redis_v1beta1/gapic/cloud_redis_client_config.py @@ -1,66 +1,72 @@ config = { "interfaces": { "google.cloud.redis.v1beta1.CloudRedis": { - "retry_codes": { - "idempotent": ["DEADLINE_EXCEEDED", "UNAVAILABLE"], - "non_idempotent": [], - }, + "retry_codes": {"no_retry_codes": [], "no_retry_1_codes": []}, "retry_params": { - "default": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 20000, + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0, + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 600000, "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 20000, + "max_rpc_timeout_millis": 600000, "total_timeout_millis": 600000, - } + }, }, "methods": { - "ListInstances": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", - }, - "GetInstance": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", - }, "CreateInstance": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params", }, "UpdateInstance": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params", }, "ImportInstance": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params", }, "ExportInstance": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params", }, "FailoverInstance": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params", }, "DeleteInstance": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params", + }, + "ListInstances": { + "timeout_millis": 600000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params", + }, + "GetInstance": { + "timeout_millis": 600000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params", }, "UpgradeInstance": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params", }, }, } diff --git a/google/cloud/redis_v1beta1/gapic/transports/cloud_redis_grpc_transport.py b/google/cloud/redis_v1beta1/gapic/transports/cloud_redis_grpc_transport.py index 7b17b45..87ee24f 100644 --- a/google/cloud/redis_v1beta1/gapic/transports/cloud_redis_grpc_transport.py +++ b/google/cloud/redis_v1beta1/gapic/transports/cloud_redis_grpc_transport.py @@ -113,40 +113,6 @@ def channel(self): """ return self._channel - @property - def list_instances(self): - """Return the gRPC stub for :meth:`CloudRedisClient.list_instances`. - - Lists all Redis instances owned by a project in either the specified - location (region) or all locations. - - The location should have the following format: - - - ``projects/{project_id}/locations/{location_id}`` - - If ``location_id`` is specified as ``-`` (wildcard), then all regions - available to the project are queried, and the results are aggregated. - - Returns: - Callable: A callable which accepts the appropriate - deserialized request object and returns a - deserialized response object. - """ - return self._stubs["cloud_redis_stub"].ListInstances - - @property - def get_instance(self): - """Return the gRPC stub for :meth:`CloudRedisClient.get_instance`. - - Gets the details of a specific Redis instance. - - Returns: - Callable: A callable which accepts the appropriate - deserialized request object and returns a - deserialized response object. - """ - return self._stubs["cloud_redis_stub"].GetInstance - @property def create_instance(self): """Return the gRPC stub for :meth:`CloudRedisClient.create_instance`. @@ -155,7 +121,7 @@ def create_instance(self): size. By default, the instance is accessible from the project's `default - network `__. + network `__. The creation is executed asynchronously and callers may check the returned operation to track its progress. Once the operation is @@ -256,6 +222,40 @@ def delete_instance(self): """ return self._stubs["cloud_redis_stub"].DeleteInstance + @property + def list_instances(self): + """Return the gRPC stub for :meth:`CloudRedisClient.list_instances`. + + Lists all Redis instances owned by a project in either the specified + location (region) or all locations. + + The location should have the following format: + + - ``projects/{project_id}/locations/{location_id}`` + + If ``location_id`` is specified as ``-`` (wildcard), then all regions + available to the project are queried, and the results are aggregated. + + Returns: + Callable: A callable which accepts the appropriate + deserialized request object and returns a + deserialized response object. + """ + return self._stubs["cloud_redis_stub"].ListInstances + + @property + def get_instance(self): + """Return the gRPC stub for :meth:`CloudRedisClient.get_instance`. + + Gets the details of a specific Redis instance. + + Returns: + Callable: A callable which accepts the appropriate + deserialized request object and returns a + deserialized response object. + """ + return self._stubs["cloud_redis_stub"].GetInstance + @property def upgrade_instance(self): """Return the gRPC stub for :meth:`CloudRedisClient.upgrade_instance`. diff --git a/google/cloud/redis_v1beta1/proto/cloud_redis.proto b/google/cloud/redis_v1beta1/proto/cloud_redis.proto index 47d9a6f..3eb99d8 100644 --- a/google/cloud/redis_v1beta1/proto/cloud_redis.proto +++ b/google/cloud/redis_v1beta1/proto/cloud_redis.proto @@ -75,7 +75,7 @@ service CloudRedis { // Creates a Redis instance based on the specified tier and memory size. // // By default, the instance is accessible from the project's - // [default network](/compute/docs/networks-and-firewalls#networks). + // [default network](https://cloud.google.com/vpc/docs/vpc). // // The creation is executed asynchronously and callers may check the returned // operation to track its progress. Once the operation is completed the Redis @@ -354,7 +354,7 @@ message Instance { int32 memory_size_gb = 18 [(google.api.field_behavior) = REQUIRED]; // Optional. The full name of the Google Compute Engine - // [network](/compute/docs/networks-and-firewalls#networks) to which the + // [network](https://cloud.google.com/vpc/docs/vpc) to which the // instance is connected. If left unspecified, the `default` network // will be used. string authorized_network = 20 [(google.api.field_behavior) = OPTIONAL]; diff --git a/google/cloud/redis_v1beta1/proto/cloud_redis_pb2.py b/google/cloud/redis_v1beta1/proto/cloud_redis_pb2.py index 494afe4..cf8fe15 100644 --- a/google/cloud/redis_v1beta1/proto/cloud_redis_pb2.py +++ b/google/cloud/redis_v1beta1/proto/cloud_redis_pb2.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/redis_v1beta1/proto/cloud_redis.proto - +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection @@ -28,6 +28,7 @@ package="google.cloud.redis.v1beta1", syntax="proto3", serialized_options=b"\n\036com.google.cloud.redis.v1beta1B\032CloudRedisServiceBetaProtoP\001Z?google.golang.org/genproto/googleapis/cloud/redis/v1beta1;redis", + create_key=_descriptor._internal_create_key, serialized_pb=b'\n2google/cloud/redis_v1beta1/proto/cloud_redis.proto\x12\x1agoogle.cloud.redis.v1beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto"\x84\n\n\x08Instance\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12@\n\x06labels\x18\x03 \x03(\x0b\x32\x30.google.cloud.redis.v1beta1.Instance.LabelsEntry\x12\x18\n\x0blocation_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12$\n\x17\x61lternative_location_id\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rredis_version\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x1e\n\x11reserved_ip_range\x18\t \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04host\x18\n \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04port\x18\x0b \x01(\x05\x42\x03\xe0\x41\x03\x12 \n\x13\x63urrent_location_id\x18\x0c \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12>\n\x05state\x18\x0e \x01(\x0e\x32*.google.cloud.redis.v1beta1.Instance.StateB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x0f \x01(\tB\x03\xe0\x41\x03\x12R\n\rredis_configs\x18\x10 \x03(\x0b\x32\x36.google.cloud.redis.v1beta1.Instance.RedisConfigsEntryB\x03\xe0\x41\x01\x12<\n\x04tier\x18\x11 \x01(\x0e\x32).google.cloud.redis.v1beta1.Instance.TierB\x03\xe0\x41\x02\x12\x1b\n\x0ememory_size_gb\x18\x12 \x01(\x05\x42\x03\xe0\x41\x02\x12\x1f\n\x12\x61uthorized_network\x18\x14 \x01(\tB\x03\xe0\x41\x01\x12%\n\x18persistence_iam_identity\x18\x15 \x01(\tB\x03\xe0\x41\x03\x12K\n\x0c\x63onnect_mode\x18\x16 \x01(\x0e\x32\x30.google.cloud.redis.v1beta1.Instance.ConnectModeB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x33\n\x11RedisConfigsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"\x94\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\t\n\x05READY\x10\x02\x12\x0c\n\x08UPDATING\x10\x03\x12\x0c\n\x08\x44\x45LETING\x10\x04\x12\r\n\tREPAIRING\x10\x05\x12\x0f\n\x0bMAINTENANCE\x10\x06\x12\r\n\tIMPORTING\x10\x08\x12\x10\n\x0c\x46\x41ILING_OVER\x10\n"8\n\x04Tier\x12\x14\n\x10TIER_UNSPECIFIED\x10\x00\x12\t\n\x05\x42\x41SIC\x10\x01\x12\x0f\n\x0bSTANDARD_HA\x10\x03"[\n\x0b\x43onnectMode\x12\x1c\n\x18\x43ONNECT_MODE_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x44IRECT_PEERING\x10\x01\x12\x1a\n\x16PRIVATE_SERVICE_ACCESS\x10\x02:`\xea\x41]\n\x1dredis.googleapis.com/Instance\x12"2/v1beta1/{parent=projects/*/locations/*}/instances:\x08instance\xda\x41\x1bparent,instance_id,instance\xca\x41:\n#google.cloud.redis.v1beta1.Instance\x12\x13google.protobuf.Any\x12\x86\x02\n\x0eUpdateInstance\x12\x31.google.cloud.redis.v1beta1.UpdateInstanceRequest\x1a\x1d.google.longrunning.Operation"\xa1\x01\x82\xd3\xe4\x93\x02G2;/v1beta1/{instance.name=projects/*/locations/*/instances/*}:\x08instance\xda\x41\x14update_mask,instance\xca\x41:\n#google.cloud.redis.v1beta1.Instance\x12\x13google.protobuf.Any\x12\xfe\x01\n\x0fUpgradeInstance\x12\x32.google.cloud.redis.v1beta1.UpgradeInstanceRequest\x1a\x1d.google.longrunning.Operation"\x97\x01\x82\xd3\xe4\x93\x02?":/v1beta1/{name=projects/*/locations/*/instances/*}:upgrade:\x01*\xda\x41\x12name,redis_version\xca\x41:\n#google.cloud.redis.v1beta1.Instance\x12\x13google.protobuf.Any\x12\xfa\x01\n\x0eImportInstance\x12\x31.google.cloud.redis.v1beta1.ImportInstanceRequest\x1a\x1d.google.longrunning.Operation"\x95\x01\x82\xd3\xe4\x93\x02>"9/v1beta1/{name=projects/*/locations/*/instances/*}:import:\x01*\xda\x41\x11name,input_config\xca\x41:\n#google.cloud.redis.v1beta1.Instance\x12\x13google.protobuf.Any\x12\xfb\x01\n\x0e\x45xportInstance\x12\x31.google.cloud.redis.v1beta1.ExportInstanceRequest\x1a\x1d.google.longrunning.Operation"\x96\x01\x82\xd3\xe4\x93\x02>"9/v1beta1/{name=projects/*/locations/*/instances/*}:export:\x01*\xda\x41\x12name,output_config\xca\x41:\n#google.cloud.redis.v1beta1.Instance\x12\x13google.protobuf.Any\x12\x88\x02\n\x10\x46\x61iloverInstance\x12\x33.google.cloud.redis.v1beta1.FailoverInstanceRequest\x1a\x1d.google.longrunning.Operation"\x9f\x01\x82\xd3\xe4\x93\x02@";/v1beta1/{name=projects/*/locations/*/instances/*}:failover:\x01*\xda\x41\x19name,data_protection_mode\xca\x41:\n#google.cloud.redis.v1beta1.Instance\x12\x13google.protobuf.Any\x12\xd4\x01\n\x0e\x44\x65leteInstance\x12\x31.google.cloud.redis.v1beta1.DeleteInstanceRequest\x1a\x1d.google.longrunning.Operation"p\x82\xd3\xe4\x93\x02\x34*2/v1beta1/{name=projects/*/locations/*/instances/*}\xda\x41\x04name\xca\x41,\n\x15google.protobuf.Empty\x12\x13google.protobuf.Any\x1aH\xca\x41\x14redis.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x7f\n\x1e\x63om.google.cloud.redis.v1beta1B\x1a\x43loudRedisServiceBetaProtoP\x01Z?google.golang.org/genproto/googleapis/cloud/redis/v1beta1;redisb\x06proto3', dependencies=[ google_dot_api_dot_annotations__pb2.DESCRIPTOR, @@ -46,6 +47,7 @@ full_name="google.cloud.redis.v1beta1.Instance.State", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="STATE_UNSPECIFIED", @@ -53,30 +55,71 @@ number=0, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="CREATING", index=1, number=1, serialized_options=None, type=None + name="CREATING", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="READY", index=2, number=2, serialized_options=None, type=None + name="READY", + index=2, + number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="UPDATING", index=3, number=3, serialized_options=None, type=None + name="UPDATING", + index=3, + number=3, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="DELETING", index=4, number=4, serialized_options=None, type=None + name="DELETING", + index=4, + number=4, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="REPAIRING", index=5, number=5, serialized_options=None, type=None + name="REPAIRING", + index=5, + number=5, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="MAINTENANCE", index=6, number=6, serialized_options=None, type=None + name="MAINTENANCE", + index=6, + number=6, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="IMPORTING", index=7, number=8, serialized_options=None, type=None + name="IMPORTING", + index=7, + number=8, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="FAILING_OVER", index=8, number=10, serialized_options=None, type=None + name="FAILING_OVER", + index=8, + number=10, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, @@ -91,6 +134,7 @@ full_name="google.cloud.redis.v1beta1.Instance.Tier", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="TIER_UNSPECIFIED", @@ -98,12 +142,23 @@ number=0, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="BASIC", index=1, number=1, serialized_options=None, type=None + name="BASIC", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="STANDARD_HA", index=2, number=3, serialized_options=None, type=None + name="STANDARD_HA", + index=2, + number=3, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, @@ -118,6 +173,7 @@ full_name="google.cloud.redis.v1beta1.Instance.ConnectMode", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="CONNECT_MODE_UNSPECIFIED", @@ -125,9 +181,15 @@ number=0, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="DIRECT_PEERING", index=1, number=1, serialized_options=None, type=None + name="DIRECT_PEERING", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="PRIVATE_SERVICE_ACCESS", @@ -135,6 +197,7 @@ number=2, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, @@ -149,6 +212,7 @@ full_name="google.cloud.redis.v1beta1.FailoverInstanceRequest.DataProtectionMode", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="DATA_PROTECTION_MODE_UNSPECIFIED", @@ -156,6 +220,7 @@ number=0, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="LIMITED_DATA_LOSS", @@ -163,6 +228,7 @@ number=1, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="FORCE_DATA_LOSS", @@ -170,6 +236,7 @@ number=2, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, @@ -186,6 +253,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="key", @@ -204,6 +272,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="value", @@ -222,6 +291,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -242,6 +312,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="key", @@ -260,6 +331,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="value", @@ -278,6 +350,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -298,6 +371,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -316,6 +390,7 @@ extension_scope=None, serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="display_name", @@ -334,6 +409,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="labels", @@ -352,6 +428,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="location_id", @@ -370,6 +447,7 @@ extension_scope=None, serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="alternative_location_id", @@ -388,6 +466,7 @@ extension_scope=None, serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="redis_version", @@ -406,6 +485,7 @@ extension_scope=None, serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="reserved_ip_range", @@ -424,6 +504,7 @@ extension_scope=None, serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="host", @@ -442,6 +523,7 @@ extension_scope=None, serialized_options=b"\340A\003", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="port", @@ -460,6 +542,7 @@ extension_scope=None, serialized_options=b"\340A\003", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="current_location_id", @@ -478,6 +561,7 @@ extension_scope=None, serialized_options=b"\340A\003", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="create_time", @@ -496,6 +580,7 @@ extension_scope=None, serialized_options=b"\340A\003", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="state", @@ -514,6 +599,7 @@ extension_scope=None, serialized_options=b"\340A\003", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="status_message", @@ -532,6 +618,7 @@ extension_scope=None, serialized_options=b"\340A\003", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="redis_configs", @@ -550,6 +637,7 @@ extension_scope=None, serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="tier", @@ -568,6 +656,7 @@ extension_scope=None, serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="memory_size_gb", @@ -586,6 +675,7 @@ extension_scope=None, serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="authorized_network", @@ -604,6 +694,7 @@ extension_scope=None, serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="persistence_iam_identity", @@ -622,6 +713,7 @@ extension_scope=None, serialized_options=b"\340A\003", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="connect_mode", @@ -640,6 +732,7 @@ extension_scope=None, serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -661,6 +754,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -679,6 +773,7 @@ extension_scope=None, serialized_options=b"\340A\002\372A#\n!locations.googleapis.com/Location", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_size", @@ -697,6 +792,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_token", @@ -715,6 +811,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -736,6 +833,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="instances", @@ -754,6 +852,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="next_page_token", @@ -772,6 +871,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="unreachable", @@ -790,6 +890,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -811,6 +912,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -829,6 +931,7 @@ extension_scope=None, serialized_options=b"\340A\002\372A\037\n\035redis.googleapis.com/Instance", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ) ], extensions=[], @@ -850,6 +953,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -868,6 +972,7 @@ extension_scope=None, serialized_options=b"\340A\002\372A#\n!locations.googleapis.com/Location", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="instance_id", @@ -886,6 +991,7 @@ extension_scope=None, serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="instance", @@ -904,6 +1010,7 @@ extension_scope=None, serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -925,6 +1032,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="update_mask", @@ -943,6 +1051,7 @@ extension_scope=None, serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="instance", @@ -961,6 +1070,7 @@ extension_scope=None, serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -982,6 +1092,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -1000,6 +1111,7 @@ extension_scope=None, serialized_options=b"\340A\002\372A\037\n\035redis.googleapis.com/Instance", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="redis_version", @@ -1018,6 +1130,7 @@ extension_scope=None, serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1039,6 +1152,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -1057,6 +1171,7 @@ extension_scope=None, serialized_options=b"\340A\002\372A\037\n\035redis.googleapis.com/Instance", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ) ], extensions=[], @@ -1078,6 +1193,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="uri", @@ -1096,6 +1212,7 @@ extension_scope=None, serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ) ], extensions=[], @@ -1117,6 +1234,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="gcs_source", @@ -1135,6 +1253,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ) ], extensions=[], @@ -1150,6 +1269,7 @@ full_name="google.cloud.redis.v1beta1.InputConfig.source", index=0, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[], ) ], @@ -1164,6 +1284,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -1182,6 +1303,7 @@ extension_scope=None, serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="input_config", @@ -1200,6 +1322,7 @@ extension_scope=None, serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1221,6 +1344,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="uri", @@ -1239,6 +1363,7 @@ extension_scope=None, serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ) ], extensions=[], @@ -1260,6 +1385,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="gcs_destination", @@ -1278,6 +1404,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ) ], extensions=[], @@ -1293,6 +1420,7 @@ full_name="google.cloud.redis.v1beta1.OutputConfig.destination", index=0, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[], ) ], @@ -1307,6 +1435,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -1325,6 +1454,7 @@ extension_scope=None, serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="output_config", @@ -1343,6 +1473,7 @@ extension_scope=None, serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1364,6 +1495,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -1382,6 +1514,7 @@ extension_scope=None, serialized_options=b"\340A\002\372A\037\n\035redis.googleapis.com/Instance", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="data_protection_mode", @@ -1400,6 +1533,7 @@ extension_scope=None, serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1421,6 +1555,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="key", @@ -1439,6 +1574,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="value", @@ -1457,6 +1593,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1477,6 +1614,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="available_zones", @@ -1495,6 +1633,7 @@ extension_scope=None, serialized_options=b"\340A\003", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ) ], extensions=[], @@ -1516,6 +1655,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[], extensions=[], nested_types=[], @@ -1620,7 +1760,6 @@ "__module__": "google.cloud.redis_v1beta1.proto.cloud_redis_pb2", "__doc__": """A Google Cloud Redis instance. - Attributes: name: Required. Unique name of the resource in this scope including @@ -1700,9 +1839,9 @@ Required. Redis memory size in GiB. authorized_network: Optional. The full name of the Google Compute Engine `network - `__ to which - the instance is connected. If left unspecified, the - ``default`` network will be used. + `__ to which the + instance is connected. If left unspecified, the ``default`` + network will be used. persistence_iam_identity: Output only. Cloud IAM identity used by import / export operations to transfer data to/from Cloud Storage. Format is @@ -1729,7 +1868,6 @@ "__doc__": """Request for [ListInstances][google.cloud.redis.v1beta1.CloudRedis.ListInstances]. - Attributes: parent: Required. The resource name of the instance location using the @@ -1762,7 +1900,6 @@ "__doc__": """Response for [ListInstances][google.cloud.redis.v1beta1.CloudRedis.ListInstances]. - Attributes: instances: A list of Redis instances in the project in the specified @@ -1795,7 +1932,6 @@ "__doc__": """Request for [GetInstance][google.cloud.redis.v1beta1.CloudRedis.GetInstance]. - Attributes: name: Required. Redis instance resource name using the form: ``proje @@ -1813,9 +1949,8 @@ { "DESCRIPTOR": _CREATEINSTANCEREQUEST, "__module__": "google.cloud.redis_v1beta1.proto.cloud_redis_pb2", - "__doc__": """Request for - [CreateInstance][google.cloud.redis.v1beta1.CloudRedis.CreateInstance]. - + "__doc__": """Request for [CreateInstance][google.cloud.redis.v1beta1.CloudRedis.Cre + ateInstance]. Attributes: parent: @@ -1843,9 +1978,8 @@ { "DESCRIPTOR": _UPDATEINSTANCEREQUEST, "__module__": "google.cloud.redis_v1beta1.proto.cloud_redis_pb2", - "__doc__": """Request for - [UpdateInstance][google.cloud.redis.v1beta1.CloudRedis.UpdateInstance]. - + "__doc__": """Request for [UpdateInstance][google.cloud.redis.v1beta1.CloudRedis.Upd + ateInstance]. Attributes: update_mask: @@ -1870,9 +2004,8 @@ { "DESCRIPTOR": _UPGRADEINSTANCEREQUEST, "__module__": "google.cloud.redis_v1beta1.proto.cloud_redis_pb2", - "__doc__": """Request for - [UpgradeInstance][google.cloud.redis.v1beta1.CloudRedis.UpgradeInstance]. - + "__doc__": """Request for [UpgradeInstance][google.cloud.redis.v1beta1.CloudRedis.Up + gradeInstance]. Attributes: name: @@ -1894,9 +2027,8 @@ { "DESCRIPTOR": _DELETEINSTANCEREQUEST, "__module__": "google.cloud.redis_v1beta1.proto.cloud_redis_pb2", - "__doc__": """Request for - [DeleteInstance][google.cloud.redis.v1beta1.CloudRedis.DeleteInstance]. - + "__doc__": """Request for [DeleteInstance][google.cloud.redis.v1beta1.CloudRedis.Del + eteInstance]. Attributes: name: @@ -1917,7 +2049,6 @@ "__module__": "google.cloud.redis_v1beta1.proto.cloud_redis_pb2", "__doc__": """The Cloud Storage location for the input content - Attributes: uri: Required. Source data URI. (e.g. ‘gs://my_bucket/my_object’). @@ -1935,7 +2066,6 @@ "__module__": "google.cloud.redis_v1beta1.proto.cloud_redis_pb2", "__doc__": """The input content - Attributes: source: Required. Specify source location of input data @@ -1956,7 +2086,6 @@ "__doc__": """Request for [Import][google.cloud.redis.v1beta1.CloudRedis.ImportInstance]. - Attributes: name: Required. Redis instance resource name using the form: ``proje @@ -1978,7 +2107,6 @@ "__module__": "google.cloud.redis_v1beta1.proto.cloud_redis_pb2", "__doc__": """The Cloud Storage location for the output content - Attributes: uri: Required. Data destination URI (e.g. @@ -1998,7 +2126,6 @@ "__module__": "google.cloud.redis_v1beta1.proto.cloud_redis_pb2", "__doc__": """The output content - Attributes: destination: Required. Specify destination location of output data @@ -2019,7 +2146,6 @@ "__doc__": """Request for [Export][google.cloud.redis.v1beta1.CloudRedis.ExportInstance]. - Attributes: name: Required. Redis instance resource name using the form: ``proje @@ -2042,7 +2168,6 @@ "__doc__": """Request for [Failover][google.cloud.redis.v1beta1.CloudRedis.FailoverInstance]. - Attributes: name: Required. Redis instance resource name using the form: ``proje @@ -2073,12 +2198,11 @@ ), "DESCRIPTOR": _LOCATIONMETADATA, "__module__": "google.cloud.redis_v1beta1.proto.cloud_redis_pb2", - "__doc__": """This location metadata represents additional configuration - options for a given location where a Redis instance may be created. All - fields are output only. It is returned as content of the + "__doc__": """This location metadata represents additional configuration options for + a given location where a Redis instance may be created. All fields are + output only. It is returned as content of the ``google.cloud.location.Location.metadata`` field. - Attributes: available_zones: Output only. The set of available zones in the location. The @@ -2099,10 +2223,8 @@ { "DESCRIPTOR": _ZONEMETADATA, "__module__": "google.cloud.redis_v1beta1.proto.cloud_redis_pb2", - "__doc__": """Defines specific information for a particular zone. - Currently empty and reserved for future use only. - - """, + "__doc__": """Defines specific information for a particular zone. Currently empty + and reserved for future use only.""", # @@protoc_insertion_point(class_scope:google.cloud.redis.v1beta1.ZoneMetadata) }, ) @@ -2157,6 +2279,7 @@ file=DESCRIPTOR, index=0, serialized_options=b"\312A\024redis.googleapis.com\322A.https://www.googleapis.com/auth/cloud-platform", + create_key=_descriptor._internal_create_key, serialized_start=3415, serialized_end=5632, methods=[ @@ -2168,6 +2291,7 @@ input_type=_LISTINSTANCESREQUEST, output_type=_LISTINSTANCESRESPONSE, serialized_options=b"\202\323\344\223\0024\0222/v1beta1/{parent=projects/*/locations/*}/instances\332A\006parent", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="GetInstance", @@ -2177,6 +2301,7 @@ input_type=_GETINSTANCEREQUEST, output_type=_INSTANCE, serialized_options=b"\202\323\344\223\0024\0222/v1beta1/{name=projects/*/locations/*/instances/*}\332A\004name", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="CreateInstance", @@ -2186,6 +2311,7 @@ input_type=_CREATEINSTANCEREQUEST, output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, serialized_options=b'\202\323\344\223\002>"2/v1beta1/{parent=projects/*/locations/*}/instances:\010instance\332A\033parent,instance_id,instance\312A:\n#google.cloud.redis.v1beta1.Instance\022\023google.protobuf.Any', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="UpdateInstance", @@ -2195,6 +2321,7 @@ input_type=_UPDATEINSTANCEREQUEST, output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, serialized_options=b"\202\323\344\223\002G2;/v1beta1/{instance.name=projects/*/locations/*/instances/*}:\010instance\332A\024update_mask,instance\312A:\n#google.cloud.redis.v1beta1.Instance\022\023google.protobuf.Any", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="UpgradeInstance", @@ -2204,6 +2331,7 @@ input_type=_UPGRADEINSTANCEREQUEST, output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, serialized_options=b'\202\323\344\223\002?":/v1beta1/{name=projects/*/locations/*/instances/*}:upgrade:\001*\332A\022name,redis_version\312A:\n#google.cloud.redis.v1beta1.Instance\022\023google.protobuf.Any', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="ImportInstance", @@ -2213,6 +2341,7 @@ input_type=_IMPORTINSTANCEREQUEST, output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, serialized_options=b'\202\323\344\223\002>"9/v1beta1/{name=projects/*/locations/*/instances/*}:import:\001*\332A\021name,input_config\312A:\n#google.cloud.redis.v1beta1.Instance\022\023google.protobuf.Any', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="ExportInstance", @@ -2222,6 +2351,7 @@ input_type=_EXPORTINSTANCEREQUEST, output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, serialized_options=b'\202\323\344\223\002>"9/v1beta1/{name=projects/*/locations/*/instances/*}:export:\001*\332A\022name,output_config\312A:\n#google.cloud.redis.v1beta1.Instance\022\023google.protobuf.Any', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="FailoverInstance", @@ -2231,6 +2361,7 @@ input_type=_FAILOVERINSTANCEREQUEST, output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, serialized_options=b'\202\323\344\223\002@";/v1beta1/{name=projects/*/locations/*/instances/*}:failover:\001*\332A\031name,data_protection_mode\312A:\n#google.cloud.redis.v1beta1.Instance\022\023google.protobuf.Any', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="DeleteInstance", @@ -2240,6 +2371,7 @@ input_type=_DELETEINSTANCEREQUEST, output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, serialized_options=b"\202\323\344\223\0024*2/v1beta1/{name=projects/*/locations/*/instances/*}\332A\004name\312A,\n\025google.protobuf.Empty\022\023google.protobuf.Any", + create_key=_descriptor._internal_create_key, ), ], ) diff --git a/google/cloud/redis_v1beta1/proto/cloud_redis_pb2_grpc.py b/google/cloud/redis_v1beta1/proto/cloud_redis_pb2_grpc.py index 3f4556b..080ff59 100644 --- a/google/cloud/redis_v1beta1/proto/cloud_redis_pb2_grpc.py +++ b/google/cloud/redis_v1beta1/proto/cloud_redis_pb2_grpc.py @@ -1,4 +1,5 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc from google.cloud.redis_v1beta1.proto import ( @@ -12,27 +13,27 @@ class CloudRedisStub(object): """Configures and manages Cloud Memorystore for Redis instances - Google Cloud Memorystore for Redis v1beta1 + Google Cloud Memorystore for Redis v1beta1 - The `redis.googleapis.com` service implements the Google Cloud Memorystore - for Redis API and defines the following resource model for managing Redis - instances: - * The service works with a collection of cloud projects, named: `/projects/*` - * Each project has a collection of available locations, named: `/locations/*` - * Each location has a collection of Redis instances, named: `/instances/*` - * As such, Redis instances are resources of the form: - `/projects/{project_id}/locations/{location_id}/instances/{instance_id}` + The `redis.googleapis.com` service implements the Google Cloud Memorystore + for Redis API and defines the following resource model for managing Redis + instances: + * The service works with a collection of cloud projects, named: `/projects/*` + * Each project has a collection of available locations, named: `/locations/*` + * Each location has a collection of Redis instances, named: `/instances/*` + * As such, Redis instances are resources of the form: + `/projects/{project_id}/locations/{location_id}/instances/{instance_id}` - Note that location_id must be refering to a GCP `region`; for example: - * `projects/redpepper-1290/locations/us-central1/instances/my-redis` - """ + Note that location_id must be refering to a GCP `region`; for example: + * `projects/redpepper-1290/locations/us-central1/instances/my-redis` + """ def __init__(self, channel): """Constructor. - Args: - channel: A grpc.Channel. - """ + Args: + channel: A grpc.Channel. + """ self.ListInstances = channel.unary_unary( "/google.cloud.redis.v1beta1.CloudRedis/ListInstances", request_serializer=google_dot_cloud_dot_redis__v1beta1_dot_proto_dot_cloud__redis__pb2.ListInstancesRequest.SerializeToString, @@ -83,39 +84,39 @@ def __init__(self, channel): class CloudRedisServicer(object): """Configures and manages Cloud Memorystore for Redis instances - Google Cloud Memorystore for Redis v1beta1 + Google Cloud Memorystore for Redis v1beta1 - The `redis.googleapis.com` service implements the Google Cloud Memorystore - for Redis API and defines the following resource model for managing Redis - instances: - * The service works with a collection of cloud projects, named: `/projects/*` - * Each project has a collection of available locations, named: `/locations/*` - * Each location has a collection of Redis instances, named: `/instances/*` - * As such, Redis instances are resources of the form: - `/projects/{project_id}/locations/{location_id}/instances/{instance_id}` + The `redis.googleapis.com` service implements the Google Cloud Memorystore + for Redis API and defines the following resource model for managing Redis + instances: + * The service works with a collection of cloud projects, named: `/projects/*` + * Each project has a collection of available locations, named: `/locations/*` + * Each location has a collection of Redis instances, named: `/instances/*` + * As such, Redis instances are resources of the form: + `/projects/{project_id}/locations/{location_id}/instances/{instance_id}` - Note that location_id must be refering to a GCP `region`; for example: - * `projects/redpepper-1290/locations/us-central1/instances/my-redis` - """ + Note that location_id must be refering to a GCP `region`; for example: + * `projects/redpepper-1290/locations/us-central1/instances/my-redis` + """ def ListInstances(self, request, context): """Lists all Redis instances owned by a project in either the specified - location (region) or all locations. + location (region) or all locations. - The location should have the following format: + The location should have the following format: - * `projects/{project_id}/locations/{location_id}` + * `projects/{project_id}/locations/{location_id}` - If `location_id` is specified as `-` (wildcard), then all regions - available to the project are queried, and the results are aggregated. - """ + If `location_id` is specified as `-` (wildcard), then all regions + available to the project are queried, and the results are aggregated. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def GetInstance(self, request, context): """Gets the details of a specific Redis instance. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -123,17 +124,17 @@ def GetInstance(self, request, context): def CreateInstance(self, request, context): """Creates a Redis instance based on the specified tier and memory size. - By default, the instance is accessible from the project's - [default network](/compute/docs/networks-and-firewalls#networks). + By default, the instance is accessible from the project's + [default network](https://cloud.google.com/vpc/docs/vpc). - The creation is executed asynchronously and callers may check the returned - operation to track its progress. Once the operation is completed the Redis - instance will be fully functional. Completed longrunning.Operation will - contain the new instance object in the response field. + The creation is executed asynchronously and callers may check the returned + operation to track its progress. Once the operation is completed the Redis + instance will be fully functional. Completed longrunning.Operation will + contain the new instance object in the response field. - The returned operation is automatically deleted after a few hours, so there - is no need to call DeleteOperation. - """ + The returned operation is automatically deleted after a few hours, so there + is no need to call DeleteOperation. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -141,18 +142,18 @@ def CreateInstance(self, request, context): def UpdateInstance(self, request, context): """Updates the metadata and configuration of a specific Redis instance. - Completed longrunning.Operation will contain the new instance object - in the response field. The returned operation is automatically deleted - after a few hours, so there is no need to call DeleteOperation. - """ + Completed longrunning.Operation will contain the new instance object + in the response field. The returned operation is automatically deleted + after a few hours, so there is no need to call DeleteOperation. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def UpgradeInstance(self, request, context): """Upgrades Redis instance to the newer Redis version specified in the - request. - """ + request. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -160,13 +161,13 @@ def UpgradeInstance(self, request, context): def ImportInstance(self, request, context): """Import a Redis RDB snapshot file from Cloud Storage into a Redis instance. - Redis may stop serving during this operation. Instance state will be - IMPORTING for entire operation. When complete, the instance will contain - only data from the imported file. + Redis may stop serving during this operation. Instance state will be + IMPORTING for entire operation. When complete, the instance will contain + only data from the imported file. - The returned operation is automatically deleted after a few hours, so - there is no need to call DeleteOperation. - """ + The returned operation is automatically deleted after a few hours, so + there is no need to call DeleteOperation. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -174,27 +175,27 @@ def ImportInstance(self, request, context): def ExportInstance(self, request, context): """Export Redis instance data into a Redis RDB format file in Cloud Storage. - Redis will continue serving during this operation. + Redis will continue serving during this operation. - The returned operation is automatically deleted after a few hours, so - there is no need to call DeleteOperation. - """ + The returned operation is automatically deleted after a few hours, so + there is no need to call DeleteOperation. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def FailoverInstance(self, request, context): """Initiates a failover of the master node to current replica node for a - specific STANDARD tier Cloud Memorystore for Redis instance. - """ + specific STANDARD tier Cloud Memorystore for Redis instance. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def DeleteInstance(self, request, context): """Deletes a specific Redis instance. Instance stops serving and data is - deleted. - """ + deleted. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -252,3 +253,266 @@ def add_CloudRedisServicer_to_server(servicer, server): "google.cloud.redis.v1beta1.CloudRedis", rpc_method_handlers ) server.add_generic_rpc_handlers((generic_handler,)) + + +# This class is part of an EXPERIMENTAL API. +class CloudRedis(object): + """Configures and manages Cloud Memorystore for Redis instances + + Google Cloud Memorystore for Redis v1beta1 + + The `redis.googleapis.com` service implements the Google Cloud Memorystore + for Redis API and defines the following resource model for managing Redis + instances: + * The service works with a collection of cloud projects, named: `/projects/*` + * Each project has a collection of available locations, named: `/locations/*` + * Each location has a collection of Redis instances, named: `/instances/*` + * As such, Redis instances are resources of the form: + `/projects/{project_id}/locations/{location_id}/instances/{instance_id}` + + Note that location_id must be refering to a GCP `region`; for example: + * `projects/redpepper-1290/locations/us-central1/instances/my-redis` + """ + + @staticmethod + def ListInstances( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.redis.v1beta1.CloudRedis/ListInstances", + google_dot_cloud_dot_redis__v1beta1_dot_proto_dot_cloud__redis__pb2.ListInstancesRequest.SerializeToString, + google_dot_cloud_dot_redis__v1beta1_dot_proto_dot_cloud__redis__pb2.ListInstancesResponse.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def GetInstance( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.redis.v1beta1.CloudRedis/GetInstance", + google_dot_cloud_dot_redis__v1beta1_dot_proto_dot_cloud__redis__pb2.GetInstanceRequest.SerializeToString, + google_dot_cloud_dot_redis__v1beta1_dot_proto_dot_cloud__redis__pb2.Instance.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def CreateInstance( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.redis.v1beta1.CloudRedis/CreateInstance", + google_dot_cloud_dot_redis__v1beta1_dot_proto_dot_cloud__redis__pb2.CreateInstanceRequest.SerializeToString, + google_dot_longrunning_dot_operations__pb2.Operation.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def UpdateInstance( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.redis.v1beta1.CloudRedis/UpdateInstance", + google_dot_cloud_dot_redis__v1beta1_dot_proto_dot_cloud__redis__pb2.UpdateInstanceRequest.SerializeToString, + google_dot_longrunning_dot_operations__pb2.Operation.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def UpgradeInstance( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.redis.v1beta1.CloudRedis/UpgradeInstance", + google_dot_cloud_dot_redis__v1beta1_dot_proto_dot_cloud__redis__pb2.UpgradeInstanceRequest.SerializeToString, + google_dot_longrunning_dot_operations__pb2.Operation.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def ImportInstance( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.redis.v1beta1.CloudRedis/ImportInstance", + google_dot_cloud_dot_redis__v1beta1_dot_proto_dot_cloud__redis__pb2.ImportInstanceRequest.SerializeToString, + google_dot_longrunning_dot_operations__pb2.Operation.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def ExportInstance( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.redis.v1beta1.CloudRedis/ExportInstance", + google_dot_cloud_dot_redis__v1beta1_dot_proto_dot_cloud__redis__pb2.ExportInstanceRequest.SerializeToString, + google_dot_longrunning_dot_operations__pb2.Operation.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def FailoverInstance( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.redis.v1beta1.CloudRedis/FailoverInstance", + google_dot_cloud_dot_redis__v1beta1_dot_proto_dot_cloud__redis__pb2.FailoverInstanceRequest.SerializeToString, + google_dot_longrunning_dot_operations__pb2.Operation.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def DeleteInstance( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.redis.v1beta1.CloudRedis/DeleteInstance", + google_dot_cloud_dot_redis__v1beta1_dot_proto_dot_cloud__redis__pb2.DeleteInstanceRequest.SerializeToString, + google_dot_longrunning_dot_operations__pb2.Operation.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) diff --git a/synth.metadata b/synth.metadata index 228d82c..0069eec 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,15 +4,15 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/python-redis.git", - "sha": "fb046731d325132654ce91cb5513870befd7eec4" + "sha": "7f4b7736c8898bd1971157d68b97a193fbed9099" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "89e89786896d256c70f43e68a975470c4f4f220e", - "internalRef": "311239362" + "sha": "b882b8e6bfcd708042ff00f7adc67ce750817dd0", + "internalRef": "318028816" } }, { diff --git a/tests/unit/gapic/v1/test_cloud_redis_client_v1.py b/tests/unit/gapic/v1/test_cloud_redis_client_v1.py index a3bdb81..1133fb9 100644 --- a/tests/unit/gapic/v1/test_cloud_redis_client_v1.py +++ b/tests/unit/gapic/v1/test_cloud_redis_client_v1.py @@ -66,113 +66,6 @@ class CustomException(Exception): class TestCloudRedisClient(object): - def test_list_instances(self): - # Setup Expected Response - next_page_token = "" - instances_element = {} - instances = [instances_element] - expected_response = {"next_page_token": next_page_token, "instances": instances} - expected_response = cloud_redis_pb2.ListInstancesResponse(**expected_response) - - # Mock the API response - channel = ChannelStub(responses=[expected_response]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") - with patch as create_channel: - create_channel.return_value = channel - client = redis_v1.CloudRedisClient() - - # Setup Request - parent = client.location_path("[PROJECT]", "[LOCATION]") - - paged_list_response = client.list_instances(parent) - resources = list(paged_list_response) - assert len(resources) == 1 - - assert expected_response.instances[0] == resources[0] - - assert len(channel.requests) == 1 - expected_request = cloud_redis_pb2.ListInstancesRequest(parent=parent) - actual_request = channel.requests[0][1] - assert expected_request == actual_request - - def test_list_instances_exception(self): - channel = ChannelStub(responses=[CustomException()]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") - with patch as create_channel: - create_channel.return_value = channel - client = redis_v1.CloudRedisClient() - - # Setup request - parent = client.location_path("[PROJECT]", "[LOCATION]") - - paged_list_response = client.list_instances(parent) - with pytest.raises(CustomException): - list(paged_list_response) - - def test_get_instance(self): - # Setup Expected Response - name_2 = "name2-1052831874" - display_name = "displayName1615086568" - location_id = "locationId552319461" - alternative_location_id = "alternativeLocationId-718920621" - redis_version = "redisVersion-685310444" - reserved_ip_range = "reservedIpRange-1082940580" - host = "host3208616" - port = 3446913 - current_location_id = "currentLocationId1312712735" - status_message = "statusMessage-239442758" - memory_size_gb = 34199707 - authorized_network = "authorizedNetwork-1733809270" - persistence_iam_identity = "persistenceIamIdentity1061944584" - expected_response = { - "name": name_2, - "display_name": display_name, - "location_id": location_id, - "alternative_location_id": alternative_location_id, - "redis_version": redis_version, - "reserved_ip_range": reserved_ip_range, - "host": host, - "port": port, - "current_location_id": current_location_id, - "status_message": status_message, - "memory_size_gb": memory_size_gb, - "authorized_network": authorized_network, - "persistence_iam_identity": persistence_iam_identity, - } - expected_response = cloud_redis_pb2.Instance(**expected_response) - - # Mock the API response - channel = ChannelStub(responses=[expected_response]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") - with patch as create_channel: - create_channel.return_value = channel - client = redis_v1.CloudRedisClient() - - # Setup Request - name = client.instance_path("[PROJECT]", "[LOCATION]", "[INSTANCE]") - - response = client.get_instance(name) - assert expected_response == response - - assert len(channel.requests) == 1 - expected_request = cloud_redis_pb2.GetInstanceRequest(name=name) - actual_request = channel.requests[0][1] - assert expected_request == actual_request - - def test_get_instance_exception(self): - # Mock the API response - channel = ChannelStub(responses=[CustomException()]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") - with patch as create_channel: - create_channel.return_value = channel - client = redis_v1.CloudRedisClient() - - # Setup request - name = client.instance_path("[PROJECT]", "[LOCATION]", "[INSTANCE]") - - with pytest.raises(CustomException): - client.get_instance(name) - def test_create_instance(self): # Setup Expected Response name = "name3373707" @@ -649,3 +542,110 @@ def test_delete_instance_exception(self): response = client.delete_instance(name) exception = response.exception() assert exception.errors[0] == error + + def test_list_instances(self): + # Setup Expected Response + next_page_token = "" + instances_element = {} + instances = [instances_element] + expected_response = {"next_page_token": next_page_token, "instances": instances} + expected_response = cloud_redis_pb2.ListInstancesResponse(**expected_response) + + # Mock the API response + channel = ChannelStub(responses=[expected_response]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = redis_v1.CloudRedisClient() + + # Setup Request + parent = client.location_path("[PROJECT]", "[LOCATION]") + + paged_list_response = client.list_instances(parent) + resources = list(paged_list_response) + assert len(resources) == 1 + + assert expected_response.instances[0] == resources[0] + + assert len(channel.requests) == 1 + expected_request = cloud_redis_pb2.ListInstancesRequest(parent=parent) + actual_request = channel.requests[0][1] + assert expected_request == actual_request + + def test_list_instances_exception(self): + channel = ChannelStub(responses=[CustomException()]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = redis_v1.CloudRedisClient() + + # Setup request + parent = client.location_path("[PROJECT]", "[LOCATION]") + + paged_list_response = client.list_instances(parent) + with pytest.raises(CustomException): + list(paged_list_response) + + def test_get_instance(self): + # Setup Expected Response + name_2 = "name2-1052831874" + display_name = "displayName1615086568" + location_id = "locationId552319461" + alternative_location_id = "alternativeLocationId-718920621" + redis_version = "redisVersion-685310444" + reserved_ip_range = "reservedIpRange-1082940580" + host = "host3208616" + port = 3446913 + current_location_id = "currentLocationId1312712735" + status_message = "statusMessage-239442758" + memory_size_gb = 34199707 + authorized_network = "authorizedNetwork-1733809270" + persistence_iam_identity = "persistenceIamIdentity1061944584" + expected_response = { + "name": name_2, + "display_name": display_name, + "location_id": location_id, + "alternative_location_id": alternative_location_id, + "redis_version": redis_version, + "reserved_ip_range": reserved_ip_range, + "host": host, + "port": port, + "current_location_id": current_location_id, + "status_message": status_message, + "memory_size_gb": memory_size_gb, + "authorized_network": authorized_network, + "persistence_iam_identity": persistence_iam_identity, + } + expected_response = cloud_redis_pb2.Instance(**expected_response) + + # Mock the API response + channel = ChannelStub(responses=[expected_response]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = redis_v1.CloudRedisClient() + + # Setup Request + name = client.instance_path("[PROJECT]", "[LOCATION]", "[INSTANCE]") + + response = client.get_instance(name) + assert expected_response == response + + assert len(channel.requests) == 1 + expected_request = cloud_redis_pb2.GetInstanceRequest(name=name) + actual_request = channel.requests[0][1] + assert expected_request == actual_request + + def test_get_instance_exception(self): + # Mock the API response + channel = ChannelStub(responses=[CustomException()]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = redis_v1.CloudRedisClient() + + # Setup request + name = client.instance_path("[PROJECT]", "[LOCATION]", "[INSTANCE]") + + with pytest.raises(CustomException): + client.get_instance(name) diff --git a/tests/unit/gapic/v1beta1/test_cloud_redis_client_v1beta1.py b/tests/unit/gapic/v1beta1/test_cloud_redis_client_v1beta1.py index 246e75a..1cd885e 100644 --- a/tests/unit/gapic/v1beta1/test_cloud_redis_client_v1beta1.py +++ b/tests/unit/gapic/v1beta1/test_cloud_redis_client_v1beta1.py @@ -66,113 +66,6 @@ class CustomException(Exception): class TestCloudRedisClient(object): - def test_list_instances(self): - # Setup Expected Response - next_page_token = "" - instances_element = {} - instances = [instances_element] - expected_response = {"next_page_token": next_page_token, "instances": instances} - expected_response = cloud_redis_pb2.ListInstancesResponse(**expected_response) - - # Mock the API response - channel = ChannelStub(responses=[expected_response]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") - with patch as create_channel: - create_channel.return_value = channel - client = redis_v1beta1.CloudRedisClient() - - # Setup Request - parent = client.location_path("[PROJECT]", "[LOCATION]") - - paged_list_response = client.list_instances(parent) - resources = list(paged_list_response) - assert len(resources) == 1 - - assert expected_response.instances[0] == resources[0] - - assert len(channel.requests) == 1 - expected_request = cloud_redis_pb2.ListInstancesRequest(parent=parent) - actual_request = channel.requests[0][1] - assert expected_request == actual_request - - def test_list_instances_exception(self): - channel = ChannelStub(responses=[CustomException()]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") - with patch as create_channel: - create_channel.return_value = channel - client = redis_v1beta1.CloudRedisClient() - - # Setup request - parent = client.location_path("[PROJECT]", "[LOCATION]") - - paged_list_response = client.list_instances(parent) - with pytest.raises(CustomException): - list(paged_list_response) - - def test_get_instance(self): - # Setup Expected Response - name_2 = "name2-1052831874" - display_name = "displayName1615086568" - location_id = "locationId552319461" - alternative_location_id = "alternativeLocationId-718920621" - redis_version = "redisVersion-685310444" - reserved_ip_range = "reservedIpRange-1082940580" - host = "host3208616" - port = 3446913 - current_location_id = "currentLocationId1312712735" - status_message = "statusMessage-239442758" - memory_size_gb = 34199707 - authorized_network = "authorizedNetwork-1733809270" - persistence_iam_identity = "persistenceIamIdentity1061944584" - expected_response = { - "name": name_2, - "display_name": display_name, - "location_id": location_id, - "alternative_location_id": alternative_location_id, - "redis_version": redis_version, - "reserved_ip_range": reserved_ip_range, - "host": host, - "port": port, - "current_location_id": current_location_id, - "status_message": status_message, - "memory_size_gb": memory_size_gb, - "authorized_network": authorized_network, - "persistence_iam_identity": persistence_iam_identity, - } - expected_response = cloud_redis_pb2.Instance(**expected_response) - - # Mock the API response - channel = ChannelStub(responses=[expected_response]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") - with patch as create_channel: - create_channel.return_value = channel - client = redis_v1beta1.CloudRedisClient() - - # Setup Request - name = client.instance_path("[PROJECT]", "[LOCATION]", "[INSTANCE]") - - response = client.get_instance(name) - assert expected_response == response - - assert len(channel.requests) == 1 - expected_request = cloud_redis_pb2.GetInstanceRequest(name=name) - actual_request = channel.requests[0][1] - assert expected_request == actual_request - - def test_get_instance_exception(self): - # Mock the API response - channel = ChannelStub(responses=[CustomException()]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") - with patch as create_channel: - create_channel.return_value = channel - client = redis_v1beta1.CloudRedisClient() - - # Setup request - name = client.instance_path("[PROJECT]", "[LOCATION]", "[INSTANCE]") - - with pytest.raises(CustomException): - client.get_instance(name) - def test_create_instance(self): # Setup Expected Response name = "name3373707" @@ -650,6 +543,113 @@ def test_delete_instance_exception(self): exception = response.exception() assert exception.errors[0] == error + def test_list_instances(self): + # Setup Expected Response + next_page_token = "" + instances_element = {} + instances = [instances_element] + expected_response = {"next_page_token": next_page_token, "instances": instances} + expected_response = cloud_redis_pb2.ListInstancesResponse(**expected_response) + + # Mock the API response + channel = ChannelStub(responses=[expected_response]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = redis_v1beta1.CloudRedisClient() + + # Setup Request + parent = client.location_path("[PROJECT]", "[LOCATION]") + + paged_list_response = client.list_instances(parent) + resources = list(paged_list_response) + assert len(resources) == 1 + + assert expected_response.instances[0] == resources[0] + + assert len(channel.requests) == 1 + expected_request = cloud_redis_pb2.ListInstancesRequest(parent=parent) + actual_request = channel.requests[0][1] + assert expected_request == actual_request + + def test_list_instances_exception(self): + channel = ChannelStub(responses=[CustomException()]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = redis_v1beta1.CloudRedisClient() + + # Setup request + parent = client.location_path("[PROJECT]", "[LOCATION]") + + paged_list_response = client.list_instances(parent) + with pytest.raises(CustomException): + list(paged_list_response) + + def test_get_instance(self): + # Setup Expected Response + name_2 = "name2-1052831874" + display_name = "displayName1615086568" + location_id = "locationId552319461" + alternative_location_id = "alternativeLocationId-718920621" + redis_version = "redisVersion-685310444" + reserved_ip_range = "reservedIpRange-1082940580" + host = "host3208616" + port = 3446913 + current_location_id = "currentLocationId1312712735" + status_message = "statusMessage-239442758" + memory_size_gb = 34199707 + authorized_network = "authorizedNetwork-1733809270" + persistence_iam_identity = "persistenceIamIdentity1061944584" + expected_response = { + "name": name_2, + "display_name": display_name, + "location_id": location_id, + "alternative_location_id": alternative_location_id, + "redis_version": redis_version, + "reserved_ip_range": reserved_ip_range, + "host": host, + "port": port, + "current_location_id": current_location_id, + "status_message": status_message, + "memory_size_gb": memory_size_gb, + "authorized_network": authorized_network, + "persistence_iam_identity": persistence_iam_identity, + } + expected_response = cloud_redis_pb2.Instance(**expected_response) + + # Mock the API response + channel = ChannelStub(responses=[expected_response]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = redis_v1beta1.CloudRedisClient() + + # Setup Request + name = client.instance_path("[PROJECT]", "[LOCATION]", "[INSTANCE]") + + response = client.get_instance(name) + assert expected_response == response + + assert len(channel.requests) == 1 + expected_request = cloud_redis_pb2.GetInstanceRequest(name=name) + actual_request = channel.requests[0][1] + assert expected_request == actual_request + + def test_get_instance_exception(self): + # Mock the API response + channel = ChannelStub(responses=[CustomException()]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = redis_v1beta1.CloudRedisClient() + + # Setup request + name = client.instance_path("[PROJECT]", "[LOCATION]", "[INSTANCE]") + + with pytest.raises(CustomException): + client.get_instance(name) + def test_upgrade_instance(self): # Setup Expected Response name_2 = "name2-1052831874"