google-cloud-network_connectivity-v1 0.3.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,86 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2022 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Cloud
22
+ module NetworkConnectivity
23
+ module V1
24
+ module PolicyBasedRoutingService
25
+ # Path helper methods for the PolicyBasedRoutingService API.
26
+ module Paths
27
+ ##
28
+ # Create a fully-qualified Location resource string.
29
+ #
30
+ # The resource will be in the following format:
31
+ #
32
+ # `projects/{project}/locations/{location}`
33
+ #
34
+ # @param project [String]
35
+ # @param location [String]
36
+ #
37
+ # @return [::String]
38
+ def location_path project:, location:
39
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
40
+
41
+ "projects/#{project}/locations/#{location}"
42
+ end
43
+
44
+ ##
45
+ # Create a fully-qualified Network resource string.
46
+ #
47
+ # The resource will be in the following format:
48
+ #
49
+ # `projects/{project}/global/networks/{resource_id}`
50
+ #
51
+ # @param project [String]
52
+ # @param resource_id [String]
53
+ #
54
+ # @return [::String]
55
+ def network_path project:, resource_id:
56
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
57
+
58
+ "projects/#{project}/global/networks/#{resource_id}"
59
+ end
60
+
61
+ ##
62
+ # Create a fully-qualified PolicyBasedRoute resource string.
63
+ #
64
+ # The resource will be in the following format:
65
+ #
66
+ # `projects/{project}/{location}/global/PolicyBasedRoutes/{policy_based_route}`
67
+ #
68
+ # @param project [String]
69
+ # @param location [String]
70
+ # @param policy_based_route [String]
71
+ #
72
+ # @return [::String]
73
+ def policy_based_route_path project:, location:, policy_based_route:
74
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
75
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
76
+
77
+ "projects/#{project}/#{location}/global/PolicyBasedRoutes/#{policy_based_route}"
78
+ end
79
+
80
+ extend self
81
+ end
82
+ end
83
+ end
84
+ end
85
+ end
86
+ end
@@ -0,0 +1,51 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2022 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "gapic/common"
20
+ require "gapic/config"
21
+ require "gapic/config/method"
22
+
23
+ require "google/cloud/network_connectivity/v1/version"
24
+
25
+ require "google/cloud/network_connectivity/v1/policy_based_routing_service/credentials"
26
+ require "google/cloud/network_connectivity/v1/policy_based_routing_service/paths"
27
+ require "google/cloud/network_connectivity/v1/policy_based_routing_service/operations"
28
+ require "google/cloud/network_connectivity/v1/policy_based_routing_service/client"
29
+
30
+ module Google
31
+ module Cloud
32
+ module NetworkConnectivity
33
+ module V1
34
+ ##
35
+ # Policy-Based Routing allows GCP customers to specify flexibile routing
36
+ # policies for Layer 4 traffic traversing through the connected service.
37
+ #
38
+ # To load this service and instantiate a client:
39
+ #
40
+ # require "google/cloud/network_connectivity/v1/policy_based_routing_service"
41
+ # client = ::Google::Cloud::NetworkConnectivity::V1::PolicyBasedRoutingService::Client.new
42
+ #
43
+ module PolicyBasedRoutingService
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end
49
+
50
+ helper_path = ::File.join __dir__, "policy_based_routing_service", "helpers.rb"
51
+ require "google/cloud/network_connectivity/v1/policy_based_routing_service/helpers" if ::File.file? helper_path
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module NetworkConnectivity
23
23
  module V1
24
- VERSION = "0.3.0"
24
+ VERSION = "0.4.0"
25
25
  end
26
26
  end
27
27
  end
@@ -17,6 +17,7 @@
17
17
  # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
18
 
19
19
  require "google/cloud/network_connectivity/v1/hub_service"
20
+ require "google/cloud/network_connectivity/v1/policy_based_routing_service"
20
21
  require "google/cloud/network_connectivity/v1/version"
21
22
 
22
23
  module Google
@@ -3,8 +3,8 @@
3
3
 
4
4
  require 'google/protobuf'
5
5
 
6
- require 'google/api/annotations_pb'
7
6
  require 'google/api/field_behavior_pb'
7
+ require 'google/api/resource_pb'
8
8
  require 'google/protobuf/timestamp_pb'
9
9
 
10
10
  Google::Protobuf::DescriptorPool.generated_pool.build do
@@ -103,14 +103,17 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
103
103
  add_message "google.cloud.networkconnectivity.v1.LinkedVpnTunnels" do
104
104
  repeated :uris, :string, 1
105
105
  optional :site_to_site_data_transfer, :bool, 2
106
+ optional :vpc_network, :string, 3
106
107
  end
107
108
  add_message "google.cloud.networkconnectivity.v1.LinkedInterconnectAttachments" do
108
109
  repeated :uris, :string, 1
109
110
  optional :site_to_site_data_transfer, :bool, 2
111
+ optional :vpc_network, :string, 3
110
112
  end
111
113
  add_message "google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstances" do
112
114
  repeated :instances, :message, 1, "google.cloud.networkconnectivity.v1.RouterApplianceInstance"
113
115
  optional :site_to_site_data_transfer, :bool, 2
116
+ optional :vpc_network, :string, 3
114
117
  end
115
118
  add_message "google.cloud.networkconnectivity.v1.RouterApplianceInstance" do
116
119
  optional :virtual_machine, :string, 1
@@ -119,16 +122,17 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
119
122
  add_message "google.cloud.networkconnectivity.v1.LocationMetadata" do
120
123
  repeated :location_features, :enum, 1, "google.cloud.networkconnectivity.v1.LocationFeature"
121
124
  end
125
+ add_enum "google.cloud.networkconnectivity.v1.LocationFeature" do
126
+ value :LOCATION_FEATURE_UNSPECIFIED, 0
127
+ value :SITE_TO_CLOUD_SPOKES, 1
128
+ value :SITE_TO_SITE_SPOKES, 2
129
+ end
122
130
  add_enum "google.cloud.networkconnectivity.v1.State" do
123
131
  value :STATE_UNSPECIFIED, 0
124
132
  value :CREATING, 1
125
133
  value :ACTIVE, 2
126
134
  value :DELETING, 3
127
- end
128
- add_enum "google.cloud.networkconnectivity.v1.LocationFeature" do
129
- value :LOCATION_FEATURE_UNSPECIFIED, 0
130
- value :SITE_TO_CLOUD_SPOKES, 1
131
- value :SITE_TO_SITE_SPOKES, 2
135
+ value :UPDATING, 6
132
136
  end
133
137
  end
134
138
  end
@@ -157,8 +161,8 @@ module Google
157
161
  LinkedRouterApplianceInstances = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstances").msgclass
158
162
  RouterApplianceInstance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkconnectivity.v1.RouterApplianceInstance").msgclass
159
163
  LocationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkconnectivity.v1.LocationMetadata").msgclass
160
- State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkconnectivity.v1.State").enummodule
161
164
  LocationFeature = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkconnectivity.v1.LocationFeature").enummodule
165
+ State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkconnectivity.v1.State").enummodule
162
166
  end
163
167
  end
164
168
  end
@@ -35,25 +35,27 @@ module Google
35
35
  self.unmarshal_class_method = :decode
36
36
  self.service_name = 'google.cloud.networkconnectivity.v1.HubService'
37
37
 
38
- # Lists hubs in a given project.
38
+ # Lists the Network Connectivity Center hubs associated with a given project.
39
39
  rpc :ListHubs, ::Google::Cloud::NetworkConnectivity::V1::ListHubsRequest, ::Google::Cloud::NetworkConnectivity::V1::ListHubsResponse
40
- # Gets details about the specified hub.
40
+ # Gets details about a Network Connectivity Center hub.
41
41
  rpc :GetHub, ::Google::Cloud::NetworkConnectivity::V1::GetHubRequest, ::Google::Cloud::NetworkConnectivity::V1::Hub
42
- # Creates a new hub in the specified project.
42
+ # Creates a new Network Connectivity Center hub in the specified project.
43
43
  rpc :CreateHub, ::Google::Cloud::NetworkConnectivity::V1::CreateHubRequest, ::Google::Longrunning::Operation
44
- # Updates the description and/or labels of the specified hub.
44
+ # Updates the description and/or labels of a Network Connectivity Center
45
+ # hub.
45
46
  rpc :UpdateHub, ::Google::Cloud::NetworkConnectivity::V1::UpdateHubRequest, ::Google::Longrunning::Operation
46
- # Deletes the specified hub.
47
+ # Deletes a Network Connectivity Center hub.
47
48
  rpc :DeleteHub, ::Google::Cloud::NetworkConnectivity::V1::DeleteHubRequest, ::Google::Longrunning::Operation
48
- # Lists the spokes in the specified project and location.
49
+ # Lists the Network Connectivity Center spokes in a specified project and
50
+ # location.
49
51
  rpc :ListSpokes, ::Google::Cloud::NetworkConnectivity::V1::ListSpokesRequest, ::Google::Cloud::NetworkConnectivity::V1::ListSpokesResponse
50
- # Gets details about the specified spoke.
52
+ # Gets details about a Network Connectivity Center spoke.
51
53
  rpc :GetSpoke, ::Google::Cloud::NetworkConnectivity::V1::GetSpokeRequest, ::Google::Cloud::NetworkConnectivity::V1::Spoke
52
- # Creates a spoke in the specified project and location.
54
+ # Creates a Network Connectivity Center spoke.
53
55
  rpc :CreateSpoke, ::Google::Cloud::NetworkConnectivity::V1::CreateSpokeRequest, ::Google::Longrunning::Operation
54
- # Updates the parameters of the specified spoke.
56
+ # Updates the parameters of a Network Connectivity Center spoke.
55
57
  rpc :UpdateSpoke, ::Google::Cloud::NetworkConnectivity::V1::UpdateSpokeRequest, ::Google::Longrunning::Operation
56
- # Deletes the specified spoke.
58
+ # Deletes a Network Connectivity Center spoke.
57
59
  rpc :DeleteSpoke, ::Google::Cloud::NetworkConnectivity::V1::DeleteSpokeRequest, ::Google::Longrunning::Operation
58
60
  end
59
61
 
@@ -0,0 +1,108 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: google/cloud/networkconnectivity/v1/policy_based_routing.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'google/api/annotations_pb'
7
+ require 'google/api/client_pb'
8
+ require 'google/api/field_behavior_pb'
9
+ require 'google/api/resource_pb'
10
+ require 'google/longrunning/operations_pb'
11
+ require 'google/protobuf/timestamp_pb'
12
+
13
+ Google::Protobuf::DescriptorPool.generated_pool.build do
14
+ add_file("google/cloud/networkconnectivity/v1/policy_based_routing.proto", :syntax => :proto3) do
15
+ add_message "google.cloud.networkconnectivity.v1.PolicyBasedRoute" do
16
+ optional :name, :string, 1
17
+ optional :create_time, :message, 2, "google.protobuf.Timestamp"
18
+ optional :update_time, :message, 3, "google.protobuf.Timestamp"
19
+ map :labels, :string, :string, 4
20
+ optional :description, :string, 5
21
+ optional :network, :string, 6
22
+ optional :filter, :message, 10, "google.cloud.networkconnectivity.v1.PolicyBasedRoute.Filter"
23
+ optional :priority, :int32, 11
24
+ repeated :warnings, :message, 14, "google.cloud.networkconnectivity.v1.PolicyBasedRoute.Warnings"
25
+ optional :self_link, :string, 15
26
+ optional :kind, :string, 16
27
+ oneof :target do
28
+ optional :virtual_machine, :message, 18, "google.cloud.networkconnectivity.v1.PolicyBasedRoute.VirtualMachine"
29
+ optional :interconnect_attachment, :message, 9, "google.cloud.networkconnectivity.v1.PolicyBasedRoute.InterconnectAttachment"
30
+ end
31
+ oneof :next_hop do
32
+ optional :next_hop_ilb_ip, :string, 12
33
+ end
34
+ end
35
+ add_message "google.cloud.networkconnectivity.v1.PolicyBasedRoute.VirtualMachine" do
36
+ repeated :tags, :string, 1
37
+ end
38
+ add_message "google.cloud.networkconnectivity.v1.PolicyBasedRoute.InterconnectAttachment" do
39
+ optional :region, :string, 1
40
+ end
41
+ add_message "google.cloud.networkconnectivity.v1.PolicyBasedRoute.Filter" do
42
+ optional :ip_protocol, :string, 1
43
+ optional :src_range, :string, 2
44
+ optional :dest_range, :string, 3
45
+ optional :protocol_version, :enum, 6, "google.cloud.networkconnectivity.v1.PolicyBasedRoute.Filter.ProtocolVersion"
46
+ end
47
+ add_enum "google.cloud.networkconnectivity.v1.PolicyBasedRoute.Filter.ProtocolVersion" do
48
+ value :PROTOCOL_VERSION_UNSPECIFIED, 0
49
+ value :IPV4, 1
50
+ end
51
+ add_message "google.cloud.networkconnectivity.v1.PolicyBasedRoute.Warnings" do
52
+ optional :code, :enum, 1, "google.cloud.networkconnectivity.v1.PolicyBasedRoute.Warnings.Code"
53
+ map :data, :string, :string, 2
54
+ optional :warning_message, :string, 3
55
+ end
56
+ add_enum "google.cloud.networkconnectivity.v1.PolicyBasedRoute.Warnings.Code" do
57
+ value :WARNING_UNSPECIFIED, 0
58
+ value :RESOURCE_NOT_ACTIVE, 1
59
+ value :RESOURCE_BEING_MODIFIED, 2
60
+ end
61
+ add_message "google.cloud.networkconnectivity.v1.ListPolicyBasedRoutesRequest" do
62
+ optional :parent, :string, 1
63
+ optional :page_size, :int32, 2
64
+ optional :page_token, :string, 3
65
+ optional :filter, :string, 4
66
+ optional :order_by, :string, 5
67
+ end
68
+ add_message "google.cloud.networkconnectivity.v1.ListPolicyBasedRoutesResponse" do
69
+ repeated :policy_based_routes, :message, 1, "google.cloud.networkconnectivity.v1.PolicyBasedRoute"
70
+ optional :next_page_token, :string, 2
71
+ repeated :unreachable, :string, 3
72
+ end
73
+ add_message "google.cloud.networkconnectivity.v1.GetPolicyBasedRouteRequest" do
74
+ optional :name, :string, 1
75
+ end
76
+ add_message "google.cloud.networkconnectivity.v1.CreatePolicyBasedRouteRequest" do
77
+ optional :parent, :string, 1
78
+ optional :policy_based_route_id, :string, 2
79
+ optional :policy_based_route, :message, 3, "google.cloud.networkconnectivity.v1.PolicyBasedRoute"
80
+ optional :request_id, :string, 4
81
+ end
82
+ add_message "google.cloud.networkconnectivity.v1.DeletePolicyBasedRouteRequest" do
83
+ optional :name, :string, 1
84
+ optional :request_id, :string, 2
85
+ end
86
+ end
87
+ end
88
+
89
+ module Google
90
+ module Cloud
91
+ module NetworkConnectivity
92
+ module V1
93
+ PolicyBasedRoute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkconnectivity.v1.PolicyBasedRoute").msgclass
94
+ PolicyBasedRoute::VirtualMachine = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkconnectivity.v1.PolicyBasedRoute.VirtualMachine").msgclass
95
+ PolicyBasedRoute::InterconnectAttachment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkconnectivity.v1.PolicyBasedRoute.InterconnectAttachment").msgclass
96
+ PolicyBasedRoute::Filter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkconnectivity.v1.PolicyBasedRoute.Filter").msgclass
97
+ PolicyBasedRoute::Filter::ProtocolVersion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkconnectivity.v1.PolicyBasedRoute.Filter.ProtocolVersion").enummodule
98
+ PolicyBasedRoute::Warnings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkconnectivity.v1.PolicyBasedRoute.Warnings").msgclass
99
+ PolicyBasedRoute::Warnings::Code = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkconnectivity.v1.PolicyBasedRoute.Warnings.Code").enummodule
100
+ ListPolicyBasedRoutesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkconnectivity.v1.ListPolicyBasedRoutesRequest").msgclass
101
+ ListPolicyBasedRoutesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkconnectivity.v1.ListPolicyBasedRoutesResponse").msgclass
102
+ GetPolicyBasedRouteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkconnectivity.v1.GetPolicyBasedRouteRequest").msgclass
103
+ CreatePolicyBasedRouteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkconnectivity.v1.CreatePolicyBasedRouteRequest").msgclass
104
+ DeletePolicyBasedRouteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkconnectivity.v1.DeletePolicyBasedRouteRequest").msgclass
105
+ end
106
+ end
107
+ end
108
+ end
@@ -0,0 +1,52 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # Source: google/cloud/networkconnectivity/v1/policy_based_routing.proto for package 'Google.Cloud.NetworkConnectivity.V1'
3
+ # Original file comments:
4
+ # Copyright 2022 Google LLC
5
+ #
6
+ # Licensed under the Apache License, Version 2.0 (the "License");
7
+ # you may not use this file except in compliance with the License.
8
+ # You may obtain a copy of the License at
9
+ #
10
+ # http://www.apache.org/licenses/LICENSE-2.0
11
+ #
12
+ # Unless required by applicable law or agreed to in writing, software
13
+ # distributed under the License is distributed on an "AS IS" BASIS,
14
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ # See the License for the specific language governing permissions and
16
+ # limitations under the License.
17
+ #
18
+
19
+ require 'grpc'
20
+ require 'google/cloud/networkconnectivity/v1/policy_based_routing_pb'
21
+
22
+ module Google
23
+ module Cloud
24
+ module NetworkConnectivity
25
+ module V1
26
+ module PolicyBasedRoutingService
27
+ # Policy-Based Routing allows GCP customers to specify flexibile routing
28
+ # policies for Layer 4 traffic traversing through the connected service.
29
+ class Service
30
+
31
+ include ::GRPC::GenericService
32
+
33
+ self.marshal_class_method = :encode
34
+ self.unmarshal_class_method = :decode
35
+ self.service_name = 'google.cloud.networkconnectivity.v1.PolicyBasedRoutingService'
36
+
37
+ # Lists PolicyBasedRoutes in a given project and location.
38
+ rpc :ListPolicyBasedRoutes, ::Google::Cloud::NetworkConnectivity::V1::ListPolicyBasedRoutesRequest, ::Google::Cloud::NetworkConnectivity::V1::ListPolicyBasedRoutesResponse
39
+ # Gets details of a single PolicyBasedRoute.
40
+ rpc :GetPolicyBasedRoute, ::Google::Cloud::NetworkConnectivity::V1::GetPolicyBasedRouteRequest, ::Google::Cloud::NetworkConnectivity::V1::PolicyBasedRoute
41
+ # Creates a new PolicyBasedRoute in a given project and location.
42
+ rpc :CreatePolicyBasedRoute, ::Google::Cloud::NetworkConnectivity::V1::CreatePolicyBasedRouteRequest, ::Google::Longrunning::Operation
43
+ # Deletes a single PolicyBasedRoute.
44
+ rpc :DeletePolicyBasedRoute, ::Google::Cloud::NetworkConnectivity::V1::DeletePolicyBasedRouteRequest, ::Google::Longrunning::Operation
45
+ end
46
+
47
+ Stub = Service.rpc_stub_class
48
+ end
49
+ end
50
+ end
51
+ end
52
+ end