google-cloud-service_directory-v1 0.7.1 → 0.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/google/cloud/service_directory/v1/bindings_override.rb +102 -0
- data/lib/google/cloud/service_directory/v1/lookup_service/client.rb +46 -14
- data/lib/google/cloud/service_directory/v1/lookup_service/rest/client.rb +54 -14
- data/lib/google/cloud/service_directory/v1/lookup_service/rest.rb +1 -0
- data/lib/google/cloud/service_directory/v1/registration_service/client.rb +134 -81
- data/lib/google/cloud/service_directory/v1/registration_service/paths.rb +17 -0
- data/lib/google/cloud/service_directory/v1/registration_service/rest/client.rb +143 -82
- data/lib/google/cloud/service_directory/v1/registration_service/rest.rb +1 -0
- data/lib/google/cloud/service_directory/v1/rest.rb +1 -0
- data/lib/google/cloud/service_directory/v1/version.rb +1 -1
- data/lib/google/cloud/servicedirectory/v1/endpoint_pb.rb +1 -1
- data/lib/google/cloud/servicedirectory/v1/namespace_pb.rb +1 -1
- data/lib/google/cloud/servicedirectory/v1/registration_service_services_pb.rb +6 -6
- data/lib/google/cloud/servicedirectory/v1/service_pb.rb +1 -1
- data/proto_docs/google/cloud/servicedirectory/v1/endpoint.rb +40 -25
- data/proto_docs/google/cloud/servicedirectory/v1/lookup_service.rb +32 -14
- data/proto_docs/google/cloud/servicedirectory/v1/namespace.rb +6 -2
- data/proto_docs/google/cloud/servicedirectory/v1/registration_service.rb +116 -77
- data/proto_docs/google/cloud/servicedirectory/v1/service.rb +22 -18
- data/proto_docs/google/iam/v1/policy.rb +8 -4
- data/proto_docs/google/protobuf/any.rb +144 -0
- metadata +24 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8ace4b5ee00729b7f768d3fa8edb4401d318d631c9d60f39cce78677e83eb65e
|
4
|
+
data.tar.gz: bc601930815820dfb8e1d792973d4bc479c929c716deb4b90b1ea8c82ff5100f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f97293ac3720fc9695c82d551b2846187da25a2d0fe2a2fc45f8cc6c8fdf3af16d037db930e35d010e084fe15e5a0ce1872dfed08248f3168fc0725f13748e0d
|
7
|
+
data.tar.gz: 6c4521e83b12d55a15ee99c6711cb0710753acc18e680bdaac67a0dacdaa39b2d16e65bf1ab4eb4623e225d9c40ae0f56aa86ac1099178c53f29b594ab5bc737
|
@@ -0,0 +1,102 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2023 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/config"
|
20
|
+
|
21
|
+
module Google
|
22
|
+
module Cloud
|
23
|
+
module ServiceDirectory
|
24
|
+
##
|
25
|
+
# @example Loading just the REST part of this package, including all its services, and instantiating a REST client
|
26
|
+
#
|
27
|
+
# require "google/cloud/service_directory/v1/rest"
|
28
|
+
# client = ::Google::Cloud::ServiceDirectory::V1::LookupService::Rest::Client.new
|
29
|
+
#
|
30
|
+
module V1
|
31
|
+
##
|
32
|
+
# @private
|
33
|
+
# Initialize the mixin bindings configuration
|
34
|
+
#
|
35
|
+
def self.configure
|
36
|
+
@configure ||= begin
|
37
|
+
namespace = ["Google", "Cloud", "ServiceDirectory"]
|
38
|
+
parent_config = while namespace.any?
|
39
|
+
parent_name = namespace.join "::"
|
40
|
+
parent_const = const_get parent_name
|
41
|
+
break parent_const.configure if parent_const.respond_to? :configure
|
42
|
+
namespace.pop
|
43
|
+
end
|
44
|
+
|
45
|
+
default_config = Configuration.new parent_config
|
46
|
+
default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [
|
47
|
+
Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
|
48
|
+
uri_method: :get,
|
49
|
+
uri_template: "/v1/{name}",
|
50
|
+
matches: [
|
51
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
|
52
|
+
],
|
53
|
+
body: nil
|
54
|
+
)
|
55
|
+
]
|
56
|
+
default_config.bindings_override["google.cloud.location.Locations.ListLocations"] = [
|
57
|
+
|
58
|
+
Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
|
59
|
+
uri_method: :get,
|
60
|
+
uri_template: "/v1/{name}/locations",
|
61
|
+
matches: [
|
62
|
+
["name", %r{^projects/[^/]+/?$}, false]
|
63
|
+
],
|
64
|
+
body: nil
|
65
|
+
)
|
66
|
+
]
|
67
|
+
default_config
|
68
|
+
end
|
69
|
+
yield @configure if block_given?
|
70
|
+
@configure
|
71
|
+
end
|
72
|
+
|
73
|
+
##
|
74
|
+
# @private
|
75
|
+
# Configuration class for the google.cloud.servicedirectory.v1 package.
|
76
|
+
#
|
77
|
+
# This class contains common configuration for all services
|
78
|
+
# of the google.cloud.servicedirectory.v1 package.
|
79
|
+
#
|
80
|
+
# This configuration is for internal use of the client library classes,
|
81
|
+
# and it is not intended that the end-users will read or change it.
|
82
|
+
#
|
83
|
+
class Configuration
|
84
|
+
extend ::Gapic::Config
|
85
|
+
|
86
|
+
# @private
|
87
|
+
# Overrides for http bindings for the RPC of the mixins for this package.
|
88
|
+
# Services in this package should use these when creating clients for the mixin services.
|
89
|
+
# @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
|
90
|
+
config_attr :bindings_override, {}, ::Hash, nil
|
91
|
+
|
92
|
+
# @private
|
93
|
+
def initialize parent_config = nil
|
94
|
+
@parent_config = parent_config unless parent_config.nil?
|
95
|
+
|
96
|
+
yield self if block_given?
|
97
|
+
end
|
98
|
+
end
|
99
|
+
end
|
100
|
+
end
|
101
|
+
end
|
102
|
+
end
|
@@ -18,6 +18,7 @@
|
|
18
18
|
|
19
19
|
require "google/cloud/errors"
|
20
20
|
require "google/cloud/servicedirectory/v1/lookup_service_pb"
|
21
|
+
require "google/cloud/location"
|
21
22
|
|
22
23
|
module Google
|
23
24
|
module Cloud
|
@@ -138,6 +139,12 @@ module Google
|
|
138
139
|
@quota_project_id = @config.quota_project
|
139
140
|
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
140
141
|
|
142
|
+
@location_client = Google::Cloud::Location::Locations::Client.new do |config|
|
143
|
+
config.credentials = credentials
|
144
|
+
config.quota_project = @quota_project_id
|
145
|
+
config.endpoint = @config.endpoint
|
146
|
+
end
|
147
|
+
|
141
148
|
@lookup_service_stub = ::Gapic::ServiceStub.new(
|
142
149
|
::Google::Cloud::ServiceDirectory::V1::LookupService::Stub,
|
143
150
|
credentials: credentials,
|
@@ -147,6 +154,13 @@ module Google
|
|
147
154
|
)
|
148
155
|
end
|
149
156
|
|
157
|
+
##
|
158
|
+
# Get the associated client for mix-in of the Locations.
|
159
|
+
#
|
160
|
+
# @return [Google::Cloud::Location::Locations::Client]
|
161
|
+
#
|
162
|
+
attr_reader :location_client
|
163
|
+
|
150
164
|
# Service calls
|
151
165
|
|
152
166
|
##
|
@@ -178,22 +192,40 @@ module Google
|
|
178
192
|
# @param endpoint_filter [::String]
|
179
193
|
# Optional. The filter applied to the endpoints of the resolved service.
|
180
194
|
#
|
181
|
-
# General filter string syntax:
|
182
|
-
#
|
183
|
-
#
|
184
|
-
#
|
185
|
-
#
|
186
|
-
#
|
187
|
-
#
|
195
|
+
# General `filter` string syntax:
|
196
|
+
# `<field> <operator> <value> (<logical connector>)`
|
197
|
+
#
|
198
|
+
# * `<field>` can be `name`, `address`, `port`, or `annotations.<key>` for
|
199
|
+
# map field
|
200
|
+
# * `<operator>` can be `<`, `>`, `<=`, `>=`, `!=`, `=`, `:`. Of which `:`
|
201
|
+
# means `HAS`, and is roughly the same as `=`
|
202
|
+
# * `<value>` must be the same data type as field
|
203
|
+
# * `<logical connector>` can be `AND`, `OR`, `NOT`
|
188
204
|
#
|
189
205
|
# Examples of valid filters:
|
190
|
-
#
|
191
|
-
#
|
192
|
-
#
|
193
|
-
#
|
194
|
-
#
|
195
|
-
#
|
196
|
-
#
|
206
|
+
#
|
207
|
+
# * `annotations.owner` returns endpoints that have a annotation with the
|
208
|
+
# key `owner`, this is the same as `annotations:owner`
|
209
|
+
# * `annotations.protocol=gRPC` returns endpoints that have key/value
|
210
|
+
# `protocol=gRPC`
|
211
|
+
# * `address=192.108.1.105` returns endpoints that have this address
|
212
|
+
# * `port>8080` returns endpoints that have port number larger than 8080
|
213
|
+
# *
|
214
|
+
# `name>projects/my-project/locations/us-east1/namespaces/my-namespace/services/my-service/endpoints/endpoint-c`
|
215
|
+
# returns endpoints that have name that is alphabetically later than the
|
216
|
+
# string, so "endpoint-e" is returned but "endpoint-a" is not
|
217
|
+
# *
|
218
|
+
# `name=projects/my-project/locations/us-central1/namespaces/my-namespace/services/my-service/endpoints/ep-1`
|
219
|
+
# returns the endpoint that has an endpoint_id equal to `ep-1`
|
220
|
+
# * `annotations.owner!=sd AND annotations.foo=bar` returns endpoints that
|
221
|
+
# have `owner` in annotation key but value is not `sd` AND have
|
222
|
+
# key/value `foo=bar`
|
223
|
+
# * `doesnotexist.foo=bar` returns an empty list. Note that endpoint
|
224
|
+
# doesn't have a field called "doesnotexist". Since the filter does not
|
225
|
+
# match any endpoint, it returns no results
|
226
|
+
#
|
227
|
+
# For more information about filtering, see
|
228
|
+
# [API Filtering](https://aip.dev/160).
|
197
229
|
#
|
198
230
|
# @yield [response, operation] Access the result along with the RPC operation
|
199
231
|
# @yieldparam response [::Google::Cloud::ServiceDirectory::V1::ResolveServiceResponse]
|
@@ -19,6 +19,7 @@
|
|
19
19
|
require "google/cloud/errors"
|
20
20
|
require "google/cloud/servicedirectory/v1/lookup_service_pb"
|
21
21
|
require "google/cloud/service_directory/v1/lookup_service/rest/service_stub"
|
22
|
+
require "google/cloud/location/rest"
|
22
23
|
|
23
24
|
module Google
|
24
25
|
module Cloud
|
@@ -135,9 +136,23 @@ module Google
|
|
135
136
|
@quota_project_id = @config.quota_project
|
136
137
|
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
137
138
|
|
139
|
+
@location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
|
140
|
+
config.credentials = credentials
|
141
|
+
config.quota_project = @quota_project_id
|
142
|
+
config.endpoint = @config.endpoint
|
143
|
+
config.bindings_override = @config.bindings_override
|
144
|
+
end
|
145
|
+
|
138
146
|
@lookup_service_stub = ::Google::Cloud::ServiceDirectory::V1::LookupService::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
|
139
147
|
end
|
140
148
|
|
149
|
+
##
|
150
|
+
# Get the associated client for mix-in of the Locations.
|
151
|
+
#
|
152
|
+
# @return [Google::Cloud::Location::Locations::Rest::Client]
|
153
|
+
#
|
154
|
+
attr_reader :location_client
|
155
|
+
|
141
156
|
# Service calls
|
142
157
|
|
143
158
|
##
|
@@ -169,22 +184,40 @@ module Google
|
|
169
184
|
# @param endpoint_filter [::String]
|
170
185
|
# Optional. The filter applied to the endpoints of the resolved service.
|
171
186
|
#
|
172
|
-
# General filter string syntax:
|
173
|
-
#
|
174
|
-
#
|
175
|
-
#
|
176
|
-
#
|
177
|
-
#
|
178
|
-
#
|
187
|
+
# General `filter` string syntax:
|
188
|
+
# `<field> <operator> <value> (<logical connector>)`
|
189
|
+
#
|
190
|
+
# * `<field>` can be `name`, `address`, `port`, or `annotations.<key>` for
|
191
|
+
# map field
|
192
|
+
# * `<operator>` can be `<`, `>`, `<=`, `>=`, `!=`, `=`, `:`. Of which `:`
|
193
|
+
# means `HAS`, and is roughly the same as `=`
|
194
|
+
# * `<value>` must be the same data type as field
|
195
|
+
# * `<logical connector>` can be `AND`, `OR`, `NOT`
|
179
196
|
#
|
180
197
|
# Examples of valid filters:
|
181
|
-
#
|
182
|
-
#
|
183
|
-
#
|
184
|
-
#
|
185
|
-
#
|
186
|
-
#
|
187
|
-
#
|
198
|
+
#
|
199
|
+
# * `annotations.owner` returns endpoints that have a annotation with the
|
200
|
+
# key `owner`, this is the same as `annotations:owner`
|
201
|
+
# * `annotations.protocol=gRPC` returns endpoints that have key/value
|
202
|
+
# `protocol=gRPC`
|
203
|
+
# * `address=192.108.1.105` returns endpoints that have this address
|
204
|
+
# * `port>8080` returns endpoints that have port number larger than 8080
|
205
|
+
# *
|
206
|
+
# `name>projects/my-project/locations/us-east1/namespaces/my-namespace/services/my-service/endpoints/endpoint-c`
|
207
|
+
# returns endpoints that have name that is alphabetically later than the
|
208
|
+
# string, so "endpoint-e" is returned but "endpoint-a" is not
|
209
|
+
# *
|
210
|
+
# `name=projects/my-project/locations/us-central1/namespaces/my-namespace/services/my-service/endpoints/ep-1`
|
211
|
+
# returns the endpoint that has an endpoint_id equal to `ep-1`
|
212
|
+
# * `annotations.owner!=sd AND annotations.foo=bar` returns endpoints that
|
213
|
+
# have `owner` in annotation key but value is not `sd` AND have
|
214
|
+
# key/value `foo=bar`
|
215
|
+
# * `doesnotexist.foo=bar` returns an empty list. Note that endpoint
|
216
|
+
# doesn't have a field called "doesnotexist". Since the filter does not
|
217
|
+
# match any endpoint, it returns no results
|
218
|
+
#
|
219
|
+
# For more information about filtering, see
|
220
|
+
# [API Filtering](https://aip.dev/160).
|
188
221
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
189
222
|
# @yieldparam result [::Google::Cloud::ServiceDirectory::V1::ResolveServiceResponse]
|
190
223
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -315,6 +348,13 @@ module Google
|
|
315
348
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
316
349
|
config_attr :quota_project, nil, ::String, nil
|
317
350
|
|
351
|
+
# @private
|
352
|
+
# Overrides for http bindings for the RPCs of this service
|
353
|
+
# are only used when this service is used as mixin, and only
|
354
|
+
# by the host service.
|
355
|
+
# @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
|
356
|
+
config_attr :bindings_override, {}, ::Hash, nil
|
357
|
+
|
318
358
|
# @private
|
319
359
|
def initialize parent_config = nil
|
320
360
|
@parent_config = parent_config unless parent_config.nil?
|
@@ -21,6 +21,7 @@ require "gapic/config"
|
|
21
21
|
require "gapic/config/method"
|
22
22
|
|
23
23
|
require "google/cloud/service_directory/v1/version"
|
24
|
+
require "google/cloud/service_directory/v1/bindings_override"
|
24
25
|
|
25
26
|
require "google/cloud/service_directory/v1/lookup_service/credentials"
|
26
27
|
require "google/cloud/service_directory/v1/lookup_service/paths"
|