diff --git a/google/cloud/memcache/v1/BUILD.bazel b/google/cloud/memcache/v1/BUILD.bazel new file mode 100644 index 00000000..9d3583b4 --- /dev/null +++ b/google/cloud/memcache/v1/BUILD.bazel @@ -0,0 +1,339 @@ +# This file was automatically generated by BuildFileGenerator +# https://github.com/googleapis/gapic-generator/tree/master/rules_gapic/bazel + +# Most of the manual changes to this file will be overwritten. +# It's **only** allowed to change the following rule attribute values: +# - names of *_gapic_assembly_* rules +# - certain parameters of *_gapic_library rules, including but not limited to: +# * extra_protoc_parameters +# * extra_protoc_file_parameters +# The complete list of preserved parameters can be found in the source code. + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") + +proto_library( + name = "memcache_proto", + srcs = [ + "cloud_memcache.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/longrunning:operations_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +proto_library_with_info( + name = "memcache_proto_with_info", + deps = [ + ":memcache_proto", + "//google/cloud:common_resources_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "memcache_java_proto", + deps = [":memcache_proto"], +) + +java_grpc_library( + name = "memcache_java_grpc", + srcs = [":memcache_proto"], + deps = [":memcache_java_proto"], +) + +java_gapic_library( + name = "memcache_java_gapic", + srcs = [":memcache_proto_with_info"], + grpc_service_config = "memcache_grpc_service_config.json", + package = "google.cloud.memcache.v1", + test_deps = [ + ":memcache_java_grpc", + ], + deps = [ + ":memcache_java_proto", + ], +) + +java_gapic_test( + name = "memcache_java_gapic_test_suite", + test_classes = [ + ], + runtime_deps = [":memcache_java_gapic_test"], +) + +# Open Source Packages +java_gapic_assembly_gradle_pkg( + name = "google-cloud-memcache-v1-java", + deps = [ + ":memcache_java_gapic", + ":memcache_java_grpc", + ":memcache_java_proto", + ":memcache_proto", + ], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", + "go_proto_library", + "go_test", +) + +go_proto_library( + name = "memcache_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/memcache/v1", + protos = [":memcache_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/longrunning:longrunning_go_proto", + ], +) + +go_gapic_library( + name = "memcache_go_gapic", + srcs = [":memcache_proto_with_info"], + grpc_service_config = "memcache_grpc_service_config.json", + importpath = "cloud.google.com/go/memcache/apiv1;memcache", + service_yaml = "memcache_v1.yaml", + deps = [ + ":memcache_go_proto", + "//google/longrunning:longrunning_go_proto", + "@com_google_cloud_go//longrunning:go_default_library", + "@com_google_cloud_go//longrunning/autogen:go_default_library", + ], +) + +go_test( + name = "memcache_go_gapic_test", + srcs = [":memcache_go_gapic_srcjar_test"], + embed = [":memcache_go_gapic"], + importpath = "cloud.google.com/go/memcache/apiv1", +) + +# Open Source Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-memcache-v1-go", + deps = [ + ":memcache_go_gapic", + ":memcache_go_gapic_srcjar-test.srcjar", + ":memcache_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "py_gapic_assembly_pkg", + "py_gapic_library", +) + +py_gapic_library( + name = "memcache_py_gapic", + srcs = [":memcache_proto"], + grpc_service_config = "memcache_grpc_service_config.json", +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "memcache-v1-py", + deps = [ + ":memcache_py_gapic", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "memcache_php_proto", + deps = [":memcache_proto"], +) + +php_grpc_library( + name = "memcache_php_grpc", + srcs = [":memcache_proto"], + deps = [":memcache_php_proto"], +) + +php_gapic_library( + name = "memcache_php_gapic", + src = ":memcache_proto_with_info", + gapic_yaml = "memcache_gapic.yaml", + grpc_service_config = "memcache_grpc_service_config.json", + package = "google.cloud.memcache.v1", + service_yaml = "memcache_v1.yaml", + deps = [ + ":memcache_php_grpc", + ":memcache_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-memcache-v1-php", + deps = [ + ":memcache_php_gapic", + ":memcache_php_grpc", + ":memcache_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "memcache_nodejs_gapic", + package_name = "@google-cloud/memcache", + src = ":memcache_proto_with_info", + extra_protoc_parameters = ["metadata"], + grpc_service_config = "memcache_grpc_service_config.json", + package = "google.cloud.memcache.v1", + service_yaml = "memcache_v1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "memcache-v1-nodejs", + deps = [ + ":memcache_nodejs_gapic", + ":memcache_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "memcache_ruby_proto", + deps = [":memcache_proto"], +) + +ruby_grpc_library( + name = "memcache_ruby_grpc", + srcs = [":memcache_proto"], + deps = [":memcache_ruby_proto"], +) + +ruby_gapic_library( + name = "memcache_ruby_gapic", + src = ":memcache_proto_with_info", + gapic_yaml = "memcache_gapic.yaml", + grpc_service_config = "memcache_grpc_service_config.json", + package = "google.cloud.memcache.v1", + service_yaml = "memcache_v1.yaml", + deps = [ + ":memcache_ruby_grpc", + ":memcache_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-memcache-v1-ruby", + deps = [ + ":memcache_ruby_gapic", + ":memcache_ruby_grpc", + ":memcache_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "memcache_csharp_proto", + deps = [":memcache_proto"], +) + +csharp_grpc_library( + name = "memcache_csharp_grpc", + srcs = [":memcache_proto"], + deps = [":memcache_csharp_proto"], +) + +csharp_gapic_library( + name = "memcache_csharp_gapic", + srcs = [":memcache_proto_with_info"], + common_resources_config = "@gax_dotnet//:Google.Api.Gax/ResourceNames/CommonResourcesConfig.json", + grpc_service_config = "memcache_grpc_service_config.json", + deps = [ + ":memcache_csharp_grpc", + ":memcache_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-memcache-v1-csharp", + deps = [ + ":memcache_csharp_gapic", + ":memcache_csharp_grpc", + ":memcache_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/cloud/memcache/v1/cloud_memcache.proto b/google/cloud/memcache/v1/cloud_memcache.proto new file mode 100644 index 00000000..308f0582 --- /dev/null +++ b/google/cloud/memcache/v1/cloud_memcache.proto @@ -0,0 +1,495 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.memcache.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/memcache/v1;memcache"; +option java_multiple_files = true; +option java_outer_classname = "CloudMemcacheProto"; +option java_package = "com.google.cloud.memcache.v1"; + +// Configures and manages Cloud Memorystore for Memcached instances. +// +// +// The `memcache.googleapis.com` service implements the Google Cloud Memorystore +// for Memcached API and defines the following resource model for managing +// Memorystore Memcached (also called Memcached below) 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 Memcached instances, named: +// `/instances/*` +// * As such, Memcached instances are resources of the form: +// `/projects/{project_id}/locations/{location_id}/instances/{instance_id}` +// +// Note that location_id must be a GCP `region`; for example: +// * `projects/my-memcached-project/locations/us-central1/instances/my-memcached` +service CloudMemcache { + option (google.api.default_host) = "memcache.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Lists Instances in a given location. + rpc ListInstances(ListInstancesRequest) returns (ListInstancesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/instances" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single Instance. + rpc GetInstance(GetInstanceRequest) returns (Instance) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/instances/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new Instance in a given location. + rpc CreateInstance(CreateInstanceRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/instances" + body: "instance" + }; + option (google.api.method_signature) = "parent,instance,instance_id"; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.memcache.v1.Instance" + metadata_type: "google.cloud.memcache.v1.OperationMetadata" + }; + } + + // Updates an existing Instance in a given project and location. + rpc UpdateInstance(UpdateInstanceRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{instance.name=projects/*/locations/*/instances/*}" + body: "instance" + }; + option (google.api.method_signature) = "instance,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.memcache.v1.Instance" + metadata_type: "google.cloud.memcache.v1.OperationMetadata" + }; + } + + // Updates the defined Memcached Parameters for an existing Instance. + // This method only stages the parameters, it must be followed by + // ApplyParameters to apply the parameters to nodes of the Memcached Instance. + rpc UpdateParameters(UpdateParametersRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{name=projects/*/locations/*/instances/*}:updateParameters" + body: "*" + }; + option (google.api.method_signature) = "name,update_mask,parameters"; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.memcache.v1.Instance" + metadata_type: "google.cloud.memcache.v1.OperationMetadata" + }; + } + + // Deletes a single Instance. + rpc DeleteInstance(DeleteInstanceRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/instances/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.cloud.memcache.v1.OperationMetadata" + }; + } + + // ApplyParameters will restart the set of specified nodes in order to update + // them to the current set of parameters for the Memcached Instance. + rpc ApplyParameters(ApplyParametersRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/instances/*}:applyParameters" + body: "*" + }; + option (google.api.method_signature) = "name,node_ids,apply_all"; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.memcache.v1.Instance" + metadata_type: "google.cloud.memcache.v1.OperationMetadata" + }; + } +} + +message Instance { + option (google.api.resource) = { + type: "memcache.googleapis.com/Instance" + pattern: "projects/{project}/locations/{location}/instances/{instance}" + }; + + // Configuration for a Memcached Node. + message NodeConfig { + // Required. Number of cpus per Memcached node. + int32 cpu_count = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Memory size in MiB for each Memcached node. + int32 memory_size_mb = 2 [(google.api.field_behavior) = REQUIRED]; + } + + message Node { + // Different states of a Memcached node. + enum State { + // Node state is not set. + STATE_UNSPECIFIED = 0; + + // Node is being created. + CREATING = 1; + + // Node has been created and ready to be used. + READY = 2; + + // Node is being deleted. + DELETING = 3; + + // Node is being updated. + UPDATING = 4; + } + + // Output only. Identifier of the Memcached node. The node id does not + // include project or location like the Memcached instance name. + string node_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Location (GCP Zone) for the Memcached node. + string zone = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Current state of the Memcached node. + State state = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Hostname or IP address of the Memcached node used by the + // clients to connect to the Memcached server on this node. + string host = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The port number of the Memcached server on this node. + int32 port = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // User defined parameters currently applied to the node. + MemcacheParameters parameters = 6; + } + + message InstanceMessage { + enum Code { + // Message Code not set. + CODE_UNSPECIFIED = 0; + + // Memcached nodes are distributed unevenly. + ZONE_DISTRIBUTION_UNBALANCED = 1; + } + + // A code that correspond to one type of user-facing message. + Code code = 1; + + // Message on memcached instance which will be exposed to users. + string message = 2; + } + + // Different states of a Memcached instance. + enum State { + // State not set. + STATE_UNSPECIFIED = 0; + + // Memcached instance is being created. + CREATING = 1; + + // Memcached instance has been created and ready to be used. + READY = 2; + + // Memcached instance is being deleted. + DELETING = 4; + + // Memcached instance is going through maintenance, e.g. data plane rollout. + PERFORMING_MAINTENANCE = 5; + } + + // Required. Unique name of the resource in this scope including project and + // location using the form: + // `projects/{project_id}/locations/{location_id}/instances/{instance_id}` + // + // Note: Memcached instances are managed and addressed at regional level so + // location_id here refers to a GCP region; however, users may choose which + // zones Memcached nodes within an instances should be provisioned in. + // Refer to [zones] field for more details. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // User provided name for the instance only used for display + // purposes. Cannot be more than 80 characters. + string display_name = 2; + + // Resource labels to represent user-provided metadata. + // Refer to cloud documentation on labels for more details. + // https://cloud.google.com/compute/docs/labeling-resources + map labels = 3; + + // The full name of the Google Compute Engine + // [network](/compute/docs/networks-and-firewalls#networks) to which the + // instance is connected. If left unspecified, the `default` network + // will be used. + string authorized_network = 4; + + // Zones where Memcached nodes should be provisioned in. + // Memcached nodes will be equally distributed across these zones. If not + // provided, the service will by default create nodes in all zones in the + // region for the instance. + repeated string zones = 5; + + // Required. Number of nodes in the Memcached instance. + int32 node_count = 6 [(google.api.field_behavior) = REQUIRED]; + + // Required. Configuration for Memcached nodes. + NodeConfig node_config = 7 [(google.api.field_behavior) = REQUIRED]; + + // The major version of Memcached software. + // If not provided, latest supported version will be used. Currently the + // latest supported major version is MEMCACHE_1_5. + // The minor version will be automatically determined by our system based on + // the latest supported minor version. + MemcacheVersion memcache_version = 9; + + // Optional: User defined parameters to apply to the memcached process + // on each node. + MemcacheParameters parameters = 11; + + // Output only. List of Memcached nodes. + // Refer to [Node] message for more details. + repeated Node memcache_nodes = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the instance was created. + google.protobuf.Timestamp create_time = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the instance was updated. + google.protobuf.Timestamp update_time = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The state of this Memcached instance. + State state = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The full version of memcached server running on this instance. + // System automatically determines the full memcached version for an instance + // based on the input MemcacheVersion. + // The full version format will be "memcached-1.5.16". + string memcache_full_version = 18 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // List of messages that describe current statuses of memcached instance. + repeated InstanceMessage instance_messages = 19; + + // Output only. Endpoint for Discovery API + string discovery_endpoint = 20 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Request for [ListInstances][google.cloud.memcache.v1.CloudMemcache.ListInstances]. +message ListInstancesRequest { + // 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 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // The maximum number of items to return. + // + // If not specified, a default value of 1000 will be used by the service. + // Regardless of the page_size value, the response may include a partial list + // and a caller should only rely on response's + // [next_page_token][CloudMemcache.ListInstancesResponse.next_page_token] + // to determine if there are more instances left to be queried. + int32 page_size = 2; + + // The next_page_token value returned from a previous List request, + // if any. + string page_token = 3; + + // List filter. For example, exclude all Memcached instances with name as + // my-instance by specifying "name != my-instance". + string filter = 4; + + // Sort results. Supported values are "name", "name desc" or "" (unsorted). + string order_by = 5; +} + +// Response for [ListInstances][google.cloud.memcache.v1.CloudMemcache.ListInstances]. +message ListInstancesResponse { + // A list of Memcached instances in the project in the specified location, + // or across all locations. + // + // If the `location_id` in the parent field of the request is "-", all regions + // available to the project are queried, and the results aggregated. + repeated Instance instances = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Request for [GetInstance][google.cloud.memcache.v1.CloudMemcache.GetInstance]. +message GetInstanceRequest { + // Required. Memcached instance resource name in the format: + // `projects/{project_id}/locations/{location_id}/instances/{instance_id}` + // where `location_id` refers to a GCP region + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "memcache.googleapis.com/Instance" + } + ]; +} + +// Request for [CreateInstance][google.cloud.memcache.v1.CloudMemcache.CreateInstance]. +message CreateInstanceRequest { + // 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 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. The logical name of the Memcached instance in the user + // project with the following restrictions: + // + // * Must contain only lowercase letters, numbers, and hyphens. + // * Must start with a letter. + // * Must be between 1-40 characters. + // * Must end with a number or a letter. + // * Must be unique within the user project / location + // + // If any of the above are not met, will raise an invalid argument error. + string instance_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. A Memcached Instance + Instance instance = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Request for [UpdateInstance][google.cloud.memcache.v1.CloudMemcache.UpdateInstance]. +message UpdateInstanceRequest { + // Required. Mask of fields to update. + // * `displayName` + google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. A Memcached Instance. + // Only fields specified in update_mask are updated. + Instance instance = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request for [DeleteInstance][google.cloud.memcache.v1.CloudMemcache.DeleteInstance]. +message DeleteInstanceRequest { + // Required. Memcached instance resource name in the format: + // `projects/{project_id}/locations/{location_id}/instances/{instance_id}` + // where `location_id` refers to a GCP region + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "memcache.googleapis.com/Instance" + } + ]; +} + +// Request for [ApplyParameters][google.cloud.memcache.v1.CloudMemcache.ApplyParameters]. +message ApplyParametersRequest { + // Required. Resource name of the Memcached instance for which parameter group updates + // should be applied. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "memcache.googleapis.com/Instance" + } + ]; + + // Nodes to which we should apply the instance-level parameter group. + repeated string node_ids = 2; + + // Whether to apply instance-level parameter group to all nodes. If set to + // true, will explicitly restrict users from specifying any nodes, and apply + // parameter group updates to all nodes within the instance. + bool apply_all = 3; +} + +// Request for [UpdateParameters][google.cloud.memcache.v1.CloudMemcache.UpdateParameters]. +message UpdateParametersRequest { + // Required. Resource name of the Memcached instance for which the parameters should be + // updated. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "memcache.googleapis.com/Instance" + } + ]; + + // Required. Mask of fields to update. + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; + + // The parameters to apply to the instance. + MemcacheParameters parameters = 3; +} + +message MemcacheParameters { + // Output only. The unique ID associated with this set of parameters. Users + // can use this id to determine if the parameters associated with the instance + // differ from the parameters associated with the nodes and any action needs + // to be taken to apply parameters on nodes. + string id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // User defined set of parameters to use in the memcached process. + map params = 3; +} + +// Represents the metadata of a long-running operation. +message OperationMetadata { + // Output only. Time when the operation was created. + google.protobuf.Timestamp create_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when the operation finished running. + google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Server-defined resource path for the target of the operation. + string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Name of the verb executed by the operation. + string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Human-readable status of the operation, if any. + string status_detail = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Identifies whether the user has requested cancellation + // of the operation. Operations that have successfully been cancelled + // have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, + // corresponding to `Code.CANCELLED`. + bool cancel_requested = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. API version used to start the operation. + string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Memcached versions supported by our service. +enum MemcacheVersion { + MEMCACHE_VERSION_UNSPECIFIED = 0; + + // Memcached 1.5 version. + MEMCACHE_1_5 = 1; +} diff --git a/google/cloud/memcache/v1/memcache_gapic.yaml b/google/cloud/memcache/v1/memcache_gapic.yaml new file mode 100644 index 00000000..9f941b9e --- /dev/null +++ b/google/cloud/memcache/v1/memcache_gapic.yaml @@ -0,0 +1,17 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 2.0.0 +# The settings of generated code in a specific language. +language_settings: + python: + package_name: google.cloud.memcache_v1.gapic + go: + package_name: cloud.google.com/go/memcache/apiv1 + csharp: + package_name: Google.Cloud.Memcache.V1 + ruby: + package_name: Google::Cloud::Memcache::V1 + php: + package_name: Google\Cloud\Memcache\V1 + nodejs: + package_name: memcache.v1 + domain_layer_location: google-cloud diff --git a/google/cloud/memcache/v1/memcache_grpc_service_config.json b/google/cloud/memcache/v1/memcache_grpc_service_config.json new file mode 100644 index 00000000..9031986b --- /dev/null +++ b/google/cloud/memcache/v1/memcache_grpc_service_config.json @@ -0,0 +1,37 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.cloud.memcache.v1.CloudMemcache", + "method": "ListInstances" + }, + { + "service": "google.cloud.memcache.v1.CloudMemcache", + "method": "GetInstance" + }, + { + "service": "google.cloud.memcache.v1.CloudMemcache", + "method": "CreateInstance" + }, + { + "service": "google.cloud.memcache.v1.CloudMemcache", + "method": "UpdateInstance" + }, + { + "service": "google.cloud.memcache.v1.CloudMemcache", + "method": "UpdateParameters" + }, + { + "service": "google.cloud.memcache.v1.CloudMemcache", + "method": "ApplyParameters" + }, + { + "service": "google.cloud.memcache.v1.CloudMemcache", + "method": "DeleteInstance" + } + ], + "timeout": "1200s" + } + ] +} diff --git a/google/cloud/memcache/v1/memcache_v1.yaml b/google/cloud/memcache/v1/memcache_v1.yaml new file mode 100644 index 00000000..f3a97bb3 --- /dev/null +++ b/google/cloud/memcache/v1/memcache_v1.yaml @@ -0,0 +1,66 @@ +type: google.api.Service +config_version: 3 +name: memcache.googleapis.com +title: Cloud Memorystore for Memcached API + +apis: +- name: google.cloud.memcache.v1.CloudMemcache + +types: +- name: google.cloud.memcache.v1.OperationMetadata + +documentation: + summary: |- + Google Cloud Memorystore for Memcached API is used for creating and + managing Memcached instances in GCP. + rules: + - selector: google.iam.v1.IAMPolicy.GetIamPolicy + description: |- + Gets the access control policy for a resource. Returns an empty policy + if the resource exists and does not have a policy set. + + - selector: google.iam.v1.IAMPolicy.SetIamPolicy + description: |- + Sets the access control policy on the specified resource. Replaces + any existing policy. + + Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` + errors. + + - selector: google.iam.v1.IAMPolicy.TestIamPermissions + description: |- + Returns permissions that a caller has on the specified resource. If the + resource does not exist, this will return an empty set of + permissions, not a `NOT_FOUND` error. + + Note: This operation is designed to be used for building + permission-aware UIs and command-line tools, not for authorization + checking. This operation may "fail open" without warning. + +backend: + rules: + - selector: google.cloud.memcache.v1.CloudMemcache.GetInstance + deadline: 60.0 + - selector: google.cloud.memcache.v1.CloudMemcache.ListInstances + deadline: 60.0 + - selector: 'google.iam.v1.IAMPolicy.*' + deadline: 60.0 + - selector: 'google.longrunning.Operations.*' + deadline: 60.0 + - selector: google.longrunning.Operations.GetOperation + deadline: 5.0 + +authentication: + rules: + - selector: 'google.cloud.memcache.v1.CloudMemcache.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: 'google.iam.v1.IAMPolicy.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: 'google.longrunning.Operations.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform