diff --git a/google/cloud/networkconnectivity/v1alpha1/BUILD.bazel b/google/cloud/networkconnectivity/v1alpha1/BUILD.bazel new file mode 100644 index 00000000..526fe7c1 --- /dev/null +++ b/google/cloud/networkconnectivity/v1alpha1/BUILD.bazel @@ -0,0 +1,341 @@ +# 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 = "networkconnectivity_proto", + srcs = [ + "common.proto", + "hub.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 = "networkconnectivity_proto_with_info", + deps = [ + ":networkconnectivity_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 = "networkconnectivity_java_proto", + deps = [":networkconnectivity_proto"], +) + +java_grpc_library( + name = "networkconnectivity_java_grpc", + srcs = [":networkconnectivity_proto"], + deps = [":networkconnectivity_java_proto"], +) + +java_gapic_library( + name = "networkconnectivity_java_gapic", + srcs = [":networkconnectivity_proto_with_info"], + grpc_service_config = "networkconnectivity_grpc_service_config.json", + package = "google.cloud.networkconnectivity.v1alpha1", + test_deps = [ + ":networkconnectivity_java_grpc", + ], + deps = [ + ":networkconnectivity_java_proto", + ], +) + +java_gapic_test( + name = "networkconnectivity_java_gapic_test_suite", + test_classes = [ + + ], + runtime_deps = [":networkconnectivity_java_gapic_test"], +) + +# Open Source Packages +java_gapic_assembly_gradle_pkg( + name = "google-cloud-networkconnectivity-v1alpha1-java", + deps = [ + ":networkconnectivity_java_gapic", + ":networkconnectivity_java_grpc", + ":networkconnectivity_java_proto", + ":networkconnectivity_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 = "networkconnectivity_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/networkconnectivity/v1alpha1", + protos = [":networkconnectivity_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/longrunning:longrunning_go_proto", + ], +) + +go_gapic_library( + name = "networkconnectivity_go_gapic", + srcs = [":networkconnectivity_proto_with_info"], + grpc_service_config = "networkconnectivity_grpc_service_config.json", + importpath = "cloud.google.com/go/networkconnectivity/apiv1alpha1;networkconnectivity", + service_yaml = "networkconnectivity_v1alpha1.yaml", + deps = [ + ":networkconnectivity_go_proto", + "//google/longrunning:longrunning_go_proto", + "@com_google_cloud_go//longrunning/autogen:go_default_library", + "@com_google_cloud_go//longrunning:go_default_library", + ], +) + +go_test( + name = "networkconnectivity_go_gapic_test", + srcs = [":networkconnectivity_go_gapic_srcjar_test"], + embed = [":networkconnectivity_go_gapic"], + importpath = "cloud.google.com/go/networkconnectivity/apiv1alpha1", +) + +# Open Source Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-networkconnectivity-v1alpha1-go", + deps = [ + ":networkconnectivity_go_gapic", + ":networkconnectivity_go_gapic_srcjar-test.srcjar", + ":networkconnectivity_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "py_gapic_assembly_pkg", + "py_gapic_library", +) + +py_gapic_library( + name = "networkconnectivity_py_gapic", + srcs = [":networkconnectivity_proto"], + grpc_service_config = "networkconnectivity_grpc_service_config.json", +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "networkconnectivity-v1alpha1-py", + deps = [ + ":networkconnectivity_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 = "networkconnectivity_php_proto", + deps = [":networkconnectivity_proto"], +) + +php_grpc_library( + name = "networkconnectivity_php_grpc", + srcs = [":networkconnectivity_proto"], + deps = [":networkconnectivity_php_proto"], +) + +php_gapic_library( + name = "networkconnectivity_php_gapic", + src = ":networkconnectivity_proto_with_info", + gapic_yaml = "networkconnectivity_gapic.yaml", + grpc_service_config = "networkconnectivity_grpc_service_config.json", + package = "google.cloud.networkconnectivity.v1alpha1", + service_yaml = "networkconnectivity_v1alpha1.yaml", + deps = [ + ":networkconnectivity_php_grpc", + ":networkconnectivity_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-networkconnectivity-v1alpha1-php", + deps = [ + ":networkconnectivity_php_gapic", + ":networkconnectivity_php_grpc", + ":networkconnectivity_php_proto", + ], +) + +############################################################################## +# 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/networkconnectivity", + src = ":networkconnectivity_proto_with_info", + extra_protoc_parameters = ["metadata"], + grpc_service_config = "networkconnectivity_grpc_service_config.json", + package = "google.cloud.networkconnectivity.v1alpha1", + service_yaml = "networkconnectivity_v1alpha1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "networkconnectivity-v1alpha1-nodejs", + deps = [ + ":networkconnectivity_nodejs_gapic", + ":networkconnectivity_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 = "networkconnectivity_ruby_proto", + deps = [":networkconnectivity_proto"], +) + +ruby_grpc_library( + name = "networkconnectivity_ruby_grpc", + srcs = [":networkconnectivity_proto"], + deps = [":networkconnectivity_ruby_proto"], +) + +ruby_gapic_library( + name = "networkconnectivity_ruby_gapic", + src = ":networkconnectivity_proto_with_info", + gapic_yaml = "networkconnectivity_gapic.yaml", + grpc_service_config = "networkconnectivity_grpc_service_config.json", + package = "google.cloud.networkconnectivity.v1alpha1", + service_yaml = "networkconnectivity_v1alpha1.yaml", + deps = [ + ":networkconnectivity_ruby_grpc", + ":networkconnectivity_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-networkconnectivity-v1alpha1-ruby", + deps = [ + ":networkconnectivity_ruby_gapic", + ":networkconnectivity_ruby_grpc", + ":networkconnectivity_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 = "networkconnectivity_csharp_proto", + deps = [":networkconnectivity_proto"], +) + +csharp_grpc_library( + name = "networkconnectivity_csharp_grpc", + srcs = [":networkconnectivity_proto"], + deps = [":networkconnectivity_csharp_proto"], +) + +csharp_gapic_library( + name = "networkconnectivity_csharp_gapic", + srcs = [":networkconnectivity_proto_with_info"], + common_resources_config = "@gax_dotnet//:Google.Api.Gax/ResourceNames/CommonResourcesConfig.json", + grpc_service_config = "networkconnectivity_grpc_service_config.json", + deps = [ + ":networkconnectivity_csharp_grpc", + ":networkconnectivity_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-networkconnectivity-v1alpha1-csharp", + deps = [ + ":networkconnectivity_csharp_gapic", + ":networkconnectivity_csharp_grpc", + ":networkconnectivity_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/cloud/networkconnectivity/v1alpha1/common.proto b/google/cloud/networkconnectivity/v1alpha1/common.proto new file mode 100644 index 00000000..fbf806af --- /dev/null +++ b/google/cloud/networkconnectivity/v1alpha1/common.proto @@ -0,0 +1,53 @@ +// 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.networkconnectivity.v1alpha1; + +import "google/api/field_behavior.proto"; +import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/networkconnectivity/v1alpha1;networkconnectivity"; +option java_multiple_files = true; +option java_outer_classname = "CommonProto"; +option java_package = "com.google.cloud.networkconnectivity.v1alpha1"; + +// 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_message = 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 requested_cancellation = 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]; +} diff --git a/google/cloud/networkconnectivity/v1alpha1/hub.proto b/google/cloud/networkconnectivity/v1alpha1/hub.proto new file mode 100644 index 00000000..970559cb --- /dev/null +++ b/google/cloud/networkconnectivity/v1alpha1/hub.proto @@ -0,0 +1,525 @@ +// 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.networkconnectivity.v1alpha1; + +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/networkconnectivity/v1alpha1;networkconnectivity"; +option java_multiple_files = true; +option java_outer_classname = "HubProto"; +option java_package = "com.google.cloud.networkconnectivity.v1alpha1"; +option (google.api.resource_definition) = { + type: "compute.googleapis.com/VpnTunnel" + pattern: "projects/{project}/regions/{region}/vpnTunnels/{resource_id}" +}; +option (google.api.resource_definition) = { + type: "compute.googleapis.com/InterconnectAttachment" + pattern: "projects/{project}/regions/{region}/interconnectAttachments/{resource_id}" +}; +option (google.api.resource_definition) = { + type: "compute.googleapis.com/Instance" + pattern: "projects/{project}/zones/{zone}/instances/{instance}" +}; + +// Connectivity Hub is a hub-and-spoke abstraction for network connectivity +// management in Google Cloud. The Hub aims to reduce operational complexity +// through a simple, centralized connectivity management model. +service HubService { + option (google.api.default_host) = "networkconnectivity.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Lists Hubs in a given project and location. + rpc ListHubs(ListHubsRequest) returns (ListHubsResponse) { + option (google.api.http) = { + get: "/v1alpha1/{parent=projects/*/locations/global}/hubs" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single Hub. + rpc GetHub(GetHubRequest) returns (Hub) { + option (google.api.http) = { + get: "/v1alpha1/{name=projects/*/locations/global/hubs/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new Hub in a given project and location. + rpc CreateHub(CreateHubRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1alpha1/{parent=projects/*/locations/global}/hubs" + body: "hub" + }; + option (google.api.method_signature) = "parent,hub,hub_id"; + option (google.longrunning.operation_info) = { + response_type: "Hub" + metadata_type: "OperationMetadata" + }; + } + + // Updates the parameters of a single Hub. + rpc UpdateHub(UpdateHubRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1alpha1/{hub.name=projects/*/locations/global/hubs/*}" + body: "hub" + }; + option (google.api.method_signature) = "hub,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Hub" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a single Hub. + rpc DeleteHub(DeleteHubRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1alpha1/{name=projects/*/locations/global/hubs/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Lists Spokes in a given project and location. + rpc ListSpokes(ListSpokesRequest) returns (ListSpokesResponse) { + option (google.api.http) = { + get: "/v1alpha1/{parent=projects/*/locations/*}/spokes" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single Spoke. + rpc GetSpoke(GetSpokeRequest) returns (Spoke) { + option (google.api.http) = { + get: "/v1alpha1/{name=projects/*/locations/*/spokes/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new Spoke in a given project and location. + rpc CreateSpoke(CreateSpokeRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1alpha1/{parent=projects/*/locations/*}/spokes" + body: "spoke" + }; + option (google.api.method_signature) = "parent,spoke,spoke_id"; + option (google.longrunning.operation_info) = { + response_type: "Spoke" + metadata_type: "OperationMetadata" + }; + } + + // Updates the parameters of a single Spoke. + rpc UpdateSpoke(UpdateSpokeRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1alpha1/{spoke.name=projects/*/locations/*/spokes/*}" + body: "spoke" + }; + option (google.api.method_signature) = "spoke,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Spoke" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a single Spoke. + rpc DeleteSpoke(DeleteSpokeRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1alpha1/{name=projects/*/locations/*/spokes/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } +} + +// The Connectivity Hub is a hub-and-spoke abstraction for network connectivity +// management in Google Cloud. It aims to reduce operational complexity +// through a simple, centralized connectivity management model. Here is the +// resource message of a Hub. +message Hub { + option (google.api.resource) = { + type: "networkconnectivity.googleapis.com/Hub" + pattern: "projects/{project}/locations/global/hubs/{hub}" + }; + + // Immutable. The name of a Hub resource. + string name = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // Time when the Hub was created. + google.protobuf.Timestamp create_time = 2; + + // Time when the Hub was updated. + google.protobuf.Timestamp update_time = 3; + + // User-defined labels. + map labels = 4; + + // Short description of the hub resource. + string description = 5; + + // Output only. A list of the URIs of all attached spokes + repeated string spokes = 6 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "networkconnectivity.googleapis.com/Spoke" + } + ]; + + // Output only. Google-generated UUID for this resource. This is unique across all Hub + // resources. If a Hub resource is deleted and another with the same name is + // created, it gets a different unique_id. + string unique_id = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A Spoke is an abstraction of a network attachment being attached +// to a Hub. A Spoke can be underlying a VPN tunnel, a +// VLAN (interconnect) attachment, a Router appliance, etc. +message Spoke { + option (google.api.resource) = { + type: "networkconnectivity.googleapis.com/Spoke" + pattern: "projects/{project}/locations/{location}/spokes/{spoke}" + }; + + // Immutable. The name of a Spoke resource. + string name = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // The time when the Spoke was created. + google.protobuf.Timestamp create_time = 2; + + // The time when the Spoke was updated. + google.protobuf.Timestamp update_time = 3; + + // User-defined labels. + map labels = 4; + + // Short description of the spoke resource + string description = 5; + + // The resource URL of the hub resource that the spoke is attached to + string hub = 6 [(google.api.resource_reference) = { + type: "networkconnectivity.googleapis.com/Hub" + }]; + + // The URIs of linked VPN tunnel resources + repeated string linked_vpn_tunnels = 12 [(google.api.resource_reference) = { + type: "compute.googleapis.com/VpnTunnel" + }]; + + // The URIs of linked interconnect attachment resources + repeated string linked_interconnect_attachments = 13 [(google.api.resource_reference) = { + type: "compute.googleapis.com/InterconnectAttachment" + }]; + + // The URIs of linked Router appliance resources + repeated RouterApplianceInstance linked_router_appliance_instances = 14; + + // Output only. Google-generated UUID for this resource. This is unique across all Spoke + // resources. If a Spoke resource is deleted and another with the same name is + // created, it gets a different unique_id. + string unique_id = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Request for [HubService.ListHubs][google.cloud.networkconnectivity.v1alpha1.HubService.ListHubs] method. +message ListHubsRequest { + // Required. The parent resource's name. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // The maximum number of results per page that should be returned. + int32 page_size = 2; + + // The page token. + string page_token = 3; + + // A filter expression that filters the results listed in the response. + string filter = 4; + + // Sort the results by a certain order. + string order_by = 5; +} + +// Response for [HubService.ListHubs][google.cloud.networkconnectivity.v1alpha1.HubService.ListHubs] method. +message ListHubsResponse { + // Hubs to be returned. + repeated Hub hubs = 1; + + // The next pagination token in the List response. It should be used as + // page_token for the following request. An empty value means no more result. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Request for [HubService.GetHub][google.cloud.networkconnectivity.v1alpha1.HubService.GetHub] method. +message GetHubRequest { + // Required. Name of the Hub resource to get. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "networkconnectivity.googleapis.com/Hub" + } + ]; +} + +// Request for [HubService.CreateHub][google.cloud.networkconnectivity.v1alpha1.HubService.CreateHub] method. +message CreateHubRequest { + // Required. The parent resource's name of the Hub. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Optional. Unique id for the Hub to create. + string hub_id = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Initial values for a new Hub. + Hub hub = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique request ID + // so that if you must retry your request, the server will know to ignore + // the request if it has already been completed. The server will guarantee + // that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and t + // he request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request for [HubService.UpdateHub][google.cloud.networkconnectivity.v1alpha1.HubService.UpdateHub] method. +message UpdateHubRequest { + // Optional. Field mask is used to specify the fields to be overwritten in the + // Hub resource by the update. + // The fields specified in the update_mask are relative to the resource, not + // the full request. A field will be overwritten if it is in the mask. If the + // user does not provide a mask then all fields will be overwritten. + google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The state that the Hub should be in after the update. + Hub hub = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique request ID + // so that if you must retry your request, the server will know to ignore + // the request if it has already been completed. The server will guarantee + // that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and t + // he request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request for [HubService.DeleteHub][google.cloud.networkconnectivity.v1alpha1.HubService.DeleteHub]. +message DeleteHubRequest { + // Required. The name of the Hub to delete. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "networkconnectivity.googleapis.com/Hub" + } + ]; + + // Optional. An optional request ID to identify requests. Specify a unique request ID + // so that if you must retry your request, the server will know to ignore + // the request if it has already been completed. The server will guarantee + // that for at least 60 minutes after the first request. + // + // For example, consider a situation where you make an initial request and t + // he request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request for [HubService.ListSpokes][google.cloud.networkconnectivity.v1alpha1.HubService.ListSpokes]. +message ListSpokesRequest { + // Required. The parent's resource name. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // The maximum number of results per page that should be returned. + int32 page_size = 2; + + // The page token. + string page_token = 3; + + // A filter expression that filters the results listed in the response. + string filter = 4; + + // Sort the results by a certain order. + string order_by = 5; +} + +// The response for [HubService.ListSpokes][google.cloud.networkconnectivity.v1alpha1.HubService.ListSpokes]. +message ListSpokesResponse { + // Spokes to be returned. + repeated Spoke spokes = 1; + + // The next pagination token in the List response. It should be used as + // page_token for the following request. An empty value means no more result. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// The request for [HubService.GetSpoke][google.cloud.networkconnectivity.v1alpha1.HubService.GetSpoke]. +message GetSpokeRequest { + // Required. The name of Spoke resource. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "networkconnectivity.googleapis.com/Spoke" + } + ]; +} + +// The request for [HubService.CreateSpoke][google.cloud.networkconnectivity.v1alpha1.HubService.CreateSpoke]. +message CreateSpokeRequest { + // Required. The parent's resource name of the Spoke. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Optional. Unique id for the Spoke to create. + string spoke_id = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Initial values for a new Hub. + Spoke spoke = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique request ID + // so that if you must retry your request, the server will know to ignore + // the request if it has already been completed. The server will guarantee + // that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and t + // he request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request for [HubService.UpdateSpoke][google.cloud.networkconnectivity.v1alpha1.HubService.UpdateSpoke] method. +message UpdateSpokeRequest { + // Optional. Field mask is used to specify the fields to be overwritten in the + // Spoke resource by the update. + // The fields specified in the update_mask are relative to the resource, not + // the full request. A field will be overwritten if it is in the mask. If the + // user does not provide a mask then all fields will be overwritten. + google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The state that the Spoke should be in after the update. + Spoke spoke = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique request ID + // so that if you must retry your request, the server will know to ignore + // the request if it has already been completed. The server will guarantee + // that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and t + // he request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request for [HubService.DeleteSpoke][google.cloud.networkconnectivity.v1alpha1.HubService.DeleteSpoke]. +message DeleteSpokeRequest { + // Required. The name of the Spoke to delete. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "networkconnectivity.googleapis.com/Spoke" + } + ]; + + // Optional. An optional request ID to identify requests. Specify a unique request ID + // so that if you must retry your request, the server will know to ignore + // the request if it has already been completed. The server will guarantee + // that for at least 60 minutes after the first request. + // + // For example, consider a situation where you make an initial request and t + // he request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// RouterAppliance represents a Router appliance which is specified by a VM URI +// and a NIC address. +message RouterApplianceInstance { + // The URI of the virtual machine resource + string virtual_machine = 1 [(google.api.resource_reference) = { + type: "compute.googleapis.com/Instance" + }]; + + // The IP address of the network interface to use for peering. + string ip_address = 3; + + string network_interface = 2 [deprecated = true]; +} diff --git a/google/cloud/networkconnectivity/v1alpha1/networkconnectivity_gapic.yaml b/google/cloud/networkconnectivity/v1alpha1/networkconnectivity_gapic.yaml new file mode 100644 index 00000000..fa8f7981 --- /dev/null +++ b/google/cloud/networkconnectivity/v1alpha1/networkconnectivity_gapic.yaml @@ -0,0 +1,16 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 2.0.0 +language_settings: + python: + package_name: google.cloud.networkconnectivity.v1alpha1.gapic + go: + package_name: cloud.google.com/go/cloud/networkconnectivity/apiv1alpha1 + csharp: + package_name: Google.Cloud.NetworkConnectivity.V1Alpha1 + ruby: + package_name: Google::Cloud::NetworkConnectivity::V1Alpha1 + php: + package_name: Google\Cloud\NetworkConnectivity\V1Alpha1 + nodejs: + package_name: networkconnectivity.v1alpha1 + domain_layer_location: google-cloud diff --git a/google/cloud/networkconnectivity/v1alpha1/networkconnectivity_grpc_service_config.json b/google/cloud/networkconnectivity/v1alpha1/networkconnectivity_grpc_service_config.json new file mode 100644 index 00000000..d2db7958 --- /dev/null +++ b/google/cloud/networkconnectivity/v1alpha1/networkconnectivity_grpc_service_config.json @@ -0,0 +1,24 @@ +{ + "methodConfig": [{ + "name": [{ "service": "google.cloud.networkconnectivity.v1alpha1.HubService" }], + "timeout": "60s", + "retryPolicy": { + "maxAttempts": 5, + "initialBackoff": "1s", + "maxBackoff": "10s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": ["UNAVAILABLE"] + } + }, + { + "name": [ + { "service": "google.cloud.networkconnectivity.v1alpha1.HubService", "method": "CreateHub" }, + { "service": "google.cloud.networkconnectivity.v1alpha1.HubService", "method": "UpdateHub" }, + { "service": "google.cloud.networkconnectivity.v1alpha1.HubService", "method": "DeleteHub" }, + { "service": "google.cloud.networkconnectivity.v1alpha1.HubService", "method": "CreateSpoke" }, + { "service": "google.cloud.networkconnectivity.v1alpha1.HubService", "method": "UpdateSpoke" }, + { "service": "google.cloud.networkconnectivity.v1alpha1.HubService", "method": "DeleteSpoke" } + ], + "timeout": "60s" + }] +} diff --git a/google/cloud/networkconnectivity/v1alpha1/networkconnectivity_v1alpha1.yaml b/google/cloud/networkconnectivity/v1alpha1/networkconnectivity_v1alpha1.yaml new file mode 100644 index 00000000..65b594b4 --- /dev/null +++ b/google/cloud/networkconnectivity/v1alpha1/networkconnectivity_v1alpha1.yaml @@ -0,0 +1,97 @@ +type: google.api.Service +config_version: 3 +name: networkconnectivity.googleapis.com +title: Network Connectivity API + +apis: +- name: google.cloud.networkconnectivity.v1alpha1.HubService + +types: +- name: google.cloud.networkconnectivity.v1alpha1.OperationMetadata + +documentation: + summary: |- + The Network Connectivity API will be home to various services which provide + information pertaining to network connectivity. + overview: |- + The Network Connectivity API will be home to various services which + provide information pertaining to network connectivity. This includes + information like interconnects, VPNs, VPCs, routing information, ip + address details, etc. This information will help customers verify their + network configurations and helps them to discover misconfigurations, + inconsistencies, etc. + 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.networkconnectivity.v1alpha1.HubService.*' + deadline: 60.0 + - selector: 'google.iam.v1.IAMPolicy.*' + deadline: 60.0 + - selector: 'google.longrunning.Operations.*' + deadline: 60.0 + +http: + rules: + - selector: google.iam.v1.IAMPolicy.GetIamPolicy + get: '/v1alpha1/{resource=projects/*/locations/global/hubs/*}:getIamPolicy' + additional_bindings: + - get: '/v1alpha1/{resource=projects/*/locations/*/spokes/*}:getIamPolicy' + - selector: google.iam.v1.IAMPolicy.SetIamPolicy + post: '/v1alpha1/{resource=projects/*/locations/global/hubs/*}:setIamPolicy' + body: '*' + additional_bindings: + - post: '/v1alpha1/{resource=projects/*/locations/*/spokes/*}:setIamPolicy' + body: '*' + - selector: google.iam.v1.IAMPolicy.TestIamPermissions + post: '/v1alpha1/{resource=projects/*/locations/global/hubs/*}:testIamPermissions' + body: '*' + additional_bindings: + - post: '/v1alpha1/{resource=projects/*/locations/*/spokes/*}:testIamPermissions' + body: '*' + - selector: google.longrunning.Operations.CancelOperation + post: '/v1alpha1/{name=projects/*/locations/*/operations/*}:cancel' + body: '*' + - selector: google.longrunning.Operations.DeleteOperation + delete: '/v1alpha1/{name=projects/*/locations/*/operations/*}' + - selector: google.longrunning.Operations.GetOperation + get: '/v1alpha1/{name=projects/*/locations/*/operations/*}' + - selector: google.longrunning.Operations.ListOperations + get: '/v1alpha1/{name=projects/*/locations/*}/operations' + +authentication: + rules: + - selector: 'google.cloud.networkconnectivity.v1alpha1.HubService.*' + 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