Skip to content

Commit

Permalink
feat: add Network Connectivity Center APIs related to VPC spokes
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 569346113
  • Loading branch information
Google APIs authored and Copybara-Service committed Sep 29, 2023
1 parent 14eca8b commit 1df1c4f
Show file tree
Hide file tree
Showing 5 changed files with 988 additions and 147 deletions.
125 changes: 88 additions & 37 deletions google/cloud/networkconnectivity/v1/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -9,44 +9,14 @@
# * extra_protoc_file_parameters
# The complete list of preserved parameters can be found in the source code.

load(
"@com_google_googleapis_imports//:imports.bzl",
"cc_grpc_library",
"cc_proto_library",
"csharp_gapic_assembly_pkg",
"csharp_gapic_library",
"csharp_grpc_library",
"csharp_proto_library",
"go_gapic_assembly_pkg",
"go_gapic_library",
"go_proto_library",
"java_gapic_assembly_gradle_pkg",
"java_gapic_library",
"java_gapic_test",
"java_grpc_library",
"java_proto_library",
"nodejs_gapic_assembly_pkg",
"nodejs_gapic_library",
"php_gapic_assembly_pkg",
"php_gapic_library",
"php_proto_library",
"proto_library_with_info",
"py_gapic_assembly_pkg",
"py_gapic_library",
"py_test",
"ruby_cloud_gapic_library",
"ruby_gapic_assembly_pkg",
"ruby_grpc_library",
"ruby_proto_library",
)
# 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")

# This is an API workspace, having public visibility by default makes perfect sense.
package(default_visibility = ["//visibility:public"])
load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info")

proto_library(
name = "networkconnectivity_proto",
Expand All @@ -72,9 +42,23 @@ proto_library_with_info(
deps = [
":networkconnectivity_proto",
"//google/cloud:common_resources_proto",
"//google/cloud/location:location_proto",
"//google/iam/v1:iam_policy_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 = "networkconnectivity_java_proto",
deps = [":networkconnectivity_proto"],
Expand All @@ -94,9 +78,9 @@ java_gapic_library(
rest_numeric_enums = True,
service_yaml = "networkconnectivity_v1.yaml",
test_deps = [
":networkconnectivity_java_grpc",
"//google/cloud/location:location_java_grpc",
"//google/iam/v1:iam_java_grpc",
":networkconnectivity_java_grpc",
],
transport = "grpc",
deps = [
Expand Down Expand Up @@ -129,6 +113,16 @@ java_gapic_assembly_gradle_pkg(
],
)

##############################################################################
# Go
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"go_gapic_assembly_pkg",
"go_gapic_library",
"go_proto_library",
)

go_proto_library(
name = "networkconnectivity_go_proto",
compilers = ["@io_bazel_rules_go//proto:go_grpc"],
Expand All @@ -137,8 +131,6 @@ go_proto_library(
deps = [
"//google/api:annotations_go_proto",
"//google/longrunning:longrunning_go_proto",
"//google/rpc:errdetails_go_proto",
"//google/rpc:status_go_proto",
],
)

Expand Down Expand Up @@ -174,6 +166,16 @@ go_gapic_assembly_pkg(
],
)

##############################################################################
# Python
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"py_gapic_assembly_pkg",
"py_gapic_library",
"py_test",
)

py_gapic_library(
name = "networkconnectivity_py_gapic",
srcs = [":networkconnectivity_proto"],
Expand Down Expand Up @@ -205,6 +207,16 @@ py_gapic_assembly_pkg(
],
)

##############################################################################
# PHP
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"php_gapic_assembly_pkg",
"php_gapic_library",
"php_proto_library",
)

php_proto_library(
name = "networkconnectivity_php_proto",
deps = [":networkconnectivity_proto"],
Expand Down Expand Up @@ -232,6 +244,15 @@ php_gapic_assembly_pkg(
],
)

##############################################################################
# Node.js
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"nodejs_gapic_assembly_pkg",
"nodejs_gapic_library",
)

nodejs_gapic_library(
name = "networkconnectivity_nodejs_gapic",
package_name = "@google-cloud/network-connectivity",
Expand All @@ -253,6 +274,17 @@ nodejs_gapic_assembly_pkg(
],
)

##############################################################################
# Ruby
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"ruby_cloud_gapic_library",
"ruby_gapic_assembly_pkg",
"ruby_grpc_library",
"ruby_proto_library",
)

ruby_proto_library(
name = "networkconnectivity_ruby_proto",
deps = [":networkconnectivity_proto"],
Expand Down Expand Up @@ -296,9 +328,19 @@ ruby_gapic_assembly_pkg(
],
)

##############################################################################
# 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 = "networkconnectivity_csharp_proto",
extra_opts = [],
deps = [":networkconnectivity_proto"],
)

Expand Down Expand Up @@ -332,6 +374,15 @@ csharp_gapic_assembly_pkg(
],
)

##############################################################################
# C++
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"cc_grpc_library",
"cc_proto_library",
)

cc_proto_library(
name = "networkconnectivity_cc_proto",
deps = [":networkconnectivity_proto"],
Expand Down
13 changes: 8 additions & 5 deletions google/cloud/networkconnectivity/v1/common.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022 Google LLC
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -39,10 +39,12 @@ option (google.api.resource_definition) = {
// 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];
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];
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];
Expand All @@ -55,8 +57,9 @@ message OperationMetadata {

// Output only. Identifies whether the user has requested cancellation
// of the operation. Operations that have been cancelled successfully
// have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
// corresponding to `Code.CANCELLED`.
// have [Operation.error][] value with a
// [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
// `Code.CANCELLED`.
bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. API version used to start the operation.
Expand Down

0 comments on commit 1df1c4f

Please sign in to comment.