Generate Memcache v1beta2 API protos and gRPC ServiceConfig files

PiperOrigin-RevId: 291008516
This commit is contained in:
Google APIs 2020-01-22 12:36:14 -08:00 committed by Copybara-Service
parent 3af1dabd93
commit 8d16f76de0
5 changed files with 1014 additions and 0 deletions

View File

@ -0,0 +1,368 @@
# This file was automatically generated by BuildFileGenerator
# 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",
src = ":memcache_proto_with_info",
gapic_yaml = "memcache_gapic.yaml",
package = "google.cloud.memcache.v1beta2",
service_yaml = "memcache_v1beta2.yaml",
test_deps = [
":memcache_java_grpc",
],
deps = [
":memcache_java_proto",
],
)
java_gapic_test(
name = "memcache_java_gapic_test_suite",
test_classes = [
"com.google.cloud.memcache.v1beta2.CloudMemcacheClientTest",
],
runtime_deps = [":memcache_java_gapic_test"],
)
# Open Source Packages
java_gapic_assembly_gradle_pkg(
name = "google-cloud-memcache-v1beta2-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/v1beta2",
protos = [":memcache_proto"],
deps = [
"//google/api:annotations_go_proto",
"//google/longrunning:longrunning_go_proto",
],
)
go_gapic_library(
name = "memcache_go_gapic",
src = ":memcache_proto_with_info",
gapic_yaml = "memcache_gapic.yaml",
importpath = "cloud.google.com/go/memcache/apiv1beta2",
package = "google.cloud.memcache.v1beta2",
service_yaml = "memcache_v1beta2.yaml",
deps = [
":memcache_go_proto",
"//google/longrunning:longrunning_go_gapic",
"//google/longrunning:longrunning_go_proto",
"@com_google_cloud_go//longrunning: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/apiv1beta2",
)
# Open Source Packages
go_gapic_assembly_pkg(
name = "gapi-cloud-memcache-v1beta2-go",
deps = [
":memcache_go_gapic",
":memcache_go_gapic_srcjar-smoke-test.srcjar",
":memcache_go_gapic_srcjar-test.srcjar",
":memcache_go_proto",
],
)
##############################################################################
# Python
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"moved_proto_library",
"py_gapic_assembly_pkg",
"py_gapic_library",
"py_grpc_library",
"py_proto_library",
)
moved_proto_library(
name = "memcache_moved_proto",
srcs = [":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",
],
)
py_proto_library(
name = "memcache_py_proto",
plugin = "@protoc_docs_plugin//:docs_plugin",
deps = [":memcache_moved_proto"],
)
py_grpc_library(
name = "memcache_py_grpc",
srcs = [":memcache_moved_proto"],
deps = [":memcache_py_proto"],
)
py_gapic_library(
name = "memcache_py_gapic",
src = ":memcache_proto_with_info",
gapic_yaml = "memcache_gapic.yaml",
package = "google.cloud.memcache.v1beta2",
service_yaml = "memcache_v1beta2.yaml",
deps = [
":memcache_py_grpc",
":memcache_py_proto",
],
)
# Open Source Packages
py_gapic_assembly_pkg(
name = "memcache-v1beta2-py",
deps = [
":memcache_py_gapic",
":memcache_py_grpc",
":memcache_py_proto",
],
)
##############################################################################
# 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",
package = "google.cloud.memcache.v1beta2",
service_yaml = "memcache_v1beta2.yaml",
deps = [
":memcache_php_grpc",
":memcache_php_proto",
],
)
# Open Source Packages
php_gapic_assembly_pkg(
name = "google-cloud-memcache-v1beta2-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",
src = ":memcache_proto_with_info",
gapic_yaml = "memcache_gapic.yaml",
package = "google.cloud.memcache.v1beta2",
service_yaml = "memcache_v1beta2.yaml",
deps = [],
)
nodejs_gapic_assembly_pkg(
name = "memcache-v1beta2-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",
package = "google.cloud.memcache.v1beta2",
service_yaml = "memcache_v1beta2.yaml",
deps = [
":memcache_ruby_grpc",
":memcache_ruby_proto",
],
)
# Open Source Packages
ruby_gapic_assembly_pkg(
name = "google-cloud-memcache-v1beta2-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",
src = ":memcache_proto_with_info",
gapic_yaml = "memcache_gapic.yaml",
package = "google.cloud.memcache.v1beta2",
service_yaml = "memcache_v1beta2.yaml",
deps = [
":memcache_csharp_grpc",
":memcache_csharp_proto",
],
)
# Open Source Packages
csharp_gapic_assembly_pkg(
name = "google-cloud-memcache-v1beta2-csharp",
deps = [
":memcache_csharp_gapic",
":memcache_csharp_grpc",
":memcache_csharp_proto",
],
)
##############################################################################
# C++
##############################################################################
# Put your C++ rules here

View File

@ -0,0 +1,503 @@
// Copyright 2019 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.v1beta2;
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/v1beta2;memcache";
option java_multiple_files = true;
option java_outer_classname = "CloudMemcacheProto";
option java_package = "com.google.cloud.memcache.v1beta2";
// 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 refering to 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 project and location.
rpc ListInstances(ListInstancesRequest) returns (ListInstancesResponse) {
option (google.api.http) = {
get: "/v1beta2/{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: "/v1beta2/{name=projects/*/locations/*/instances/*}"
};
option (google.api.method_signature) = "name";
}
// Creates a new Instance in a given project and location.
rpc CreateInstance(CreateInstanceRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v1beta2/{parent=projects/*/locations/*}/instances"
body: "resource"
};
option (google.api.method_signature) = "parent,instance_id,resource";
option (google.longrunning.operation_info) = {
response_type: "google.cloud.memcache.v1beta2.Instance"
metadata_type: "google.cloud.memcache.v1beta2.OperationMetadata"
};
}
// Updates an existing Instance in a given project and location.
rpc UpdateInstance(UpdateInstanceRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
patch: "/v1beta2/{resource.name=projects/*/locations/*/instances/*}"
body: "resource"
};
option (google.api.method_signature) = "update_mask,resource";
option (google.longrunning.operation_info) = {
response_type: "google.cloud.memcache.v1beta2.Instance"
metadata_type: "google.cloud.memcache.v1beta2.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: "/v1beta2/{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.v1beta2.Instance"
metadata_type: "google.cloud.memcache.v1beta2.OperationMetadata"
};
}
// Deletes a single Instance.
rpc DeleteInstance(DeleteInstanceRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
delete: "/v1beta2/{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.v1beta2.OperationMetadata"
};
}
// ApplyParameters will update current set of Parameters to the set of
// specified nodes of the Memcached Instance.
rpc ApplyParameters(ApplyParametersRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v1beta2/{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.v1beta2.Instance"
metadata_type: "google.cloud.memcache.v1beta2.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.
// LINT.IfChange
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.
// LINT.IfChange
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];
// Optional. User provided name for the instance only used for display
// purposes. Cannot be more than 80 characters.
string display_name = 2;
// Optional. 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<string, string> labels = 3;
// Optional. 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;
// Optional. 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];
// Optional. 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.v1beta2.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.v1beta2.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 resources = 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.v1beta2.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.v1beta2.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
string instance_id = 2 [(google.api.field_behavior) = REQUIRED];
// Required. A Memcached [Instance] resource
Instance resource = 3 [(google.api.field_behavior) = REQUIRED];
}
// Request for [UpdateInstance][google.cloud.memcache.v1beta2.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] resource.
// Only fields specified in update_mask are updated.
Instance resource = 2 [(google.api.field_behavior) = REQUIRED];
}
// Request for [DeleteInstance][google.cloud.memcache.v1beta2.CloudMemcache.DeleteInstance].
message DeleteInstanceRequest {
// 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;
}
// Request for [ApplyParameters][google.cloud.memcache.v1beta2.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.v1beta2.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<string, string> params = 3;
}
// Represents the metadata of a long-running operation.
message OperationMetadata {
// Time when the operation was created.
google.protobuf.Timestamp create_time = 1;
// Time when the operation finished running.
google.protobuf.Timestamp end_time = 2;
// Server-defined resource path for the target of the operation.
string target = 3;
// Name of the verb executed by the operation.
string verb = 4;
// Human-readable status of the operation, if any.
string status_detail = 5;
// 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;
// API version used to start the operation.
string api_version = 7;
}
// Memcached versions supported by our service.
enum MemcacheVersion {
MEMCACHE_VERSION_UNSPECIFIED = 0;
// Memcached 1.5 version.
MEMCACHE_1_5 = 1;
}
// Metadata for the given [google.cloud.location.Location][google.cloud.location.Location].
message LocationMetadata {
// Output only. The set of available zones in the location. The map is keyed
// by the lowercase ID of each zone, as defined by GCE. These keys can be
// specified in the `zones` field when creating a Memcached instance.
map<string, ZoneMetadata> available_zones = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
}
message ZoneMetadata {
}

View File

@ -0,0 +1,19 @@
type: com.google.api.codegen.ConfigProto
config_schema_version: 2.0.0
# The settings of generated code in a specific language.
language_settings:
java:
package_name: com.google.cloud.memcache.v1beta2
python:
package_name: google.cloud.memcache_v1beta2.gapic
go:
package_name: cloud.google.com/go/memcache/apiv1beta2
csharp:
package_name: Google.Cloud.Memcache.V1Beta2
ruby:
package_name: Google::Cloud::Memcache::V1beta2
php:
package_name: Google\Cloud\Memcache\V1beta2
nodejs:
package_name: memcache.v1beta2
domain_layer_location: google-cloud

View File

@ -0,0 +1,37 @@
{
"methodConfig": [
{
"name": [
{
"service": "google.cloud.memcache.v1beta2.CloudMemcache",
"method": "ListInstances"
},
{
"service": "google.cloud.memcache.v1beta2.CloudMemcache",
"method": "GetInstance"
},
{
"service": "google.cloud.memcache.v1beta2.CloudMemcache",
"method": "CreateInstance"
},
{
"service": "google.cloud.memcache.v1beta2.CloudMemcache",
"method": "UpdateInstance"
},
{
"service": "google.cloud.memcache.v1beta2.CloudMemcache",
"method": "UpdateParameters"
},
{
"service": "google.cloud.memcache.v1beta2.CloudMemcache",
"method": "ApplyParameters"
},
{
"service": "google.cloud.memcache.v1beta2.CloudMemcache",
"method": "DeleteInstance"
}
],
"timeout": "1200s"
}
]
}

View File

@ -0,0 +1,87 @@
type: google.api.Service
config_version: 3
name: memcache.googleapis.com
title: Cloud Memorystore for Memcached API
apis:
- name: google.cloud.memcache.v1beta2.CloudMemcache
types:
- name: google.cloud.memcache.v1beta2.LocationMetadata
- name: google.cloud.memcache.v1beta2.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 Public Errors: NOT_FOUND, INVALID_ARGUMENT and
PERMISSION_DENIED
- 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.v1beta2.CloudMemcache.GetInstance
deadline: 60.0
- selector: google.cloud.memcache.v1beta2.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
http:
rules:
- selector: google.iam.v1.IAMPolicy.GetIamPolicy
get: '/v1beta2/{resource=projects/*/locations/*/instances/*}:getIamPolicy'
- selector: google.iam.v1.IAMPolicy.SetIamPolicy
post: '/v1beta2/{resource=projects/*/locations/*/instances/*}:setIamPolicy'
body: '*'
- selector: google.iam.v1.IAMPolicy.TestIamPermissions
post: '/v1beta2/{resource=projects/*/locations/*/instances/*}:testIamPermissions'
body: '*'
- selector: google.longrunning.Operations.CancelOperation
post: '/v1beta2/{name=projects/*/locations/*/operations/*}:cancel'
body: '*'
- selector: google.longrunning.Operations.DeleteOperation
delete: '/v1beta2/{name=projects/*/locations/*/operations/*}'
- selector: google.longrunning.Operations.GetOperation
get: '/v1beta2/{name=projects/*/locations/*/operations/*}'
- selector: google.longrunning.Operations.ListOperations
get: '/v1beta2/{name=projects/*/locations/*}/operations'
authentication:
rules:
- selector: 'google.cloud.memcache.v1beta2.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