Committer: @alexander-fenster PiperOrigin-RevId: 379843367pull/662/head
parent
2d5f6e5a41
commit
16f3e6fa35
3 changed files with 190 additions and 0 deletions
@ -0,0 +1,130 @@ |
|||||||
|
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 = "common_proto", |
||||||
|
srcs = [ |
||||||
|
"operation_metadata.proto", |
||||||
|
], |
||||||
|
deps = [ |
||||||
|
"//google/api:field_behavior_proto", |
||||||
|
"@com_google_protobuf//:timestamp_proto", |
||||||
|
], |
||||||
|
) |
||||||
|
|
||||||
|
proto_library_with_info( |
||||||
|
name = "common_proto_with_info", |
||||||
|
deps = [ |
||||||
|
":common_proto", |
||||||
|
"//google/cloud:common_resources_proto", |
||||||
|
], |
||||||
|
) |
||||||
|
|
||||||
|
############################################################################## |
||||||
|
# Java |
||||||
|
############################################################################## |
||||||
|
load( |
||||||
|
"@com_google_googleapis_imports//:imports.bzl", |
||||||
|
"java_grpc_library", |
||||||
|
"java_proto_library", |
||||||
|
) |
||||||
|
|
||||||
|
java_proto_library( |
||||||
|
name = "common_java_proto", |
||||||
|
deps = [":common_proto"], |
||||||
|
) |
||||||
|
|
||||||
|
java_grpc_library( |
||||||
|
name = "common_java_grpc", |
||||||
|
srcs = [":common_proto"], |
||||||
|
deps = [":common_java_proto"], |
||||||
|
) |
||||||
|
|
||||||
|
############################################################################## |
||||||
|
# Go |
||||||
|
############################################################################## |
||||||
|
load( |
||||||
|
"@com_google_googleapis_imports//:imports.bzl", |
||||||
|
"go_proto_library", |
||||||
|
) |
||||||
|
|
||||||
|
go_proto_library( |
||||||
|
name = "common_go_proto", |
||||||
|
compilers = ["@io_bazel_rules_go//proto:go_grpc"], |
||||||
|
importpath = "google.golang.org/genproto/googleapis/cloud/common", |
||||||
|
protos = [":common_proto"], |
||||||
|
deps = [ |
||||||
|
"//google/api:annotations_go_proto", |
||||||
|
], |
||||||
|
) |
||||||
|
|
||||||
|
|
||||||
|
############################################################################## |
||||||
|
# PHP |
||||||
|
############################################################################## |
||||||
|
load( |
||||||
|
"@com_google_googleapis_imports//:imports.bzl", |
||||||
|
"php_grpc_library", |
||||||
|
"php_proto_library", |
||||||
|
) |
||||||
|
|
||||||
|
php_proto_library( |
||||||
|
name = "common_php_proto", |
||||||
|
deps = [":common_proto"], |
||||||
|
) |
||||||
|
|
||||||
|
php_grpc_library( |
||||||
|
name = "common_php_grpc", |
||||||
|
srcs = [":common_proto"], |
||||||
|
deps = [":common_php_proto"], |
||||||
|
) |
||||||
|
|
||||||
|
############################################################################## |
||||||
|
# Ruby |
||||||
|
############################################################################## |
||||||
|
load( |
||||||
|
"@com_google_googleapis_imports//:imports.bzl", |
||||||
|
"ruby_grpc_library", |
||||||
|
"ruby_proto_library", |
||||||
|
) |
||||||
|
|
||||||
|
ruby_proto_library( |
||||||
|
name = "common_ruby_proto", |
||||||
|
deps = [":common_proto"], |
||||||
|
) |
||||||
|
|
||||||
|
ruby_grpc_library( |
||||||
|
name = "common_ruby_grpc", |
||||||
|
srcs = [":common_proto"], |
||||||
|
deps = [":common_ruby_proto"], |
||||||
|
) |
||||||
|
|
||||||
|
############################################################################## |
||||||
|
# C# |
||||||
|
############################################################################## |
||||||
|
load( |
||||||
|
"@com_google_googleapis_imports//:imports.bzl", |
||||||
|
"csharp_grpc_library", |
||||||
|
"csharp_proto_library", |
||||||
|
) |
||||||
|
|
||||||
|
csharp_proto_library( |
||||||
|
name = "common_csharp_proto", |
||||||
|
deps = [":common_proto"], |
||||||
|
) |
||||||
|
|
||||||
|
csharp_grpc_library( |
||||||
|
name = "common_csharp_grpc", |
||||||
|
srcs = [":common_proto"], |
||||||
|
deps = [":common_csharp_proto"], |
||||||
|
) |
||||||
|
|
||||||
|
############################################################################## |
||||||
|
# C++ |
||||||
|
############################################################################## |
||||||
|
# Put your C++ rules here |
@ -0,0 +1,7 @@ |
|||||||
|
type: google.api.Service |
||||||
|
config_version: 3 |
||||||
|
name: common.googleapis.com |
||||||
|
title: Common Operation Metadata type |
||||||
|
|
||||||
|
types: |
||||||
|
- name: google.cloud.common.OperationMetadata |
@ -0,0 +1,53 @@ |
|||||||
|
// Copyright 2021 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.common; |
||||||
|
|
||||||
|
import "google/api/field_behavior.proto"; |
||||||
|
import "google/protobuf/timestamp.proto"; |
||||||
|
|
||||||
|
option go_package = "google.golang.org/genproto/googleapis/cloud/common;common"; |
||||||
|
option java_multiple_files = true; |
||||||
|
option java_package = "com.google.cloud.common"; |
||||||
|
|
||||||
|
// Represents the metadata of the long-running operation. |
||||||
|
message OperationMetadata { |
||||||
|
// Output only. The time the operation was created. |
||||||
|
google.protobuf.Timestamp create_time = 1 |
||||||
|
[(google.api.field_behavior) = OUTPUT_ONLY]; |
||||||
|
|
||||||
|
// Output only. The time 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][] 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]; |
||||||
|
} |
Loading…
Reference in new issue