google-cloud-service_directory-v1beta1 0.11.0 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/google/cloud/service_directory/v1beta1/bindings_override.rb +102 -0
- data/lib/google/cloud/service_directory/v1beta1/lookup_service/client.rb +23 -4
- data/lib/google/cloud/service_directory/v1beta1/lookup_service/rest/client.rb +31 -4
- data/lib/google/cloud/service_directory/v1beta1/lookup_service/rest/service_stub.rb +1 -1
- data/lib/google/cloud/service_directory/v1beta1/lookup_service/rest.rb +1 -0
- data/lib/google/cloud/service_directory/v1beta1/registration_service/client.rb +37 -11
- data/lib/google/cloud/service_directory/v1beta1/registration_service/rest/client.rb +45 -11
- data/lib/google/cloud/service_directory/v1beta1/registration_service/rest/service_stub.rb +42 -18
- data/lib/google/cloud/service_directory/v1beta1/registration_service/rest.rb +1 -0
- data/lib/google/cloud/service_directory/v1beta1/rest.rb +1 -0
- data/lib/google/cloud/service_directory/v1beta1/version.rb +1 -1
- data/lib/google/cloud/servicedirectory/v1beta1/endpoint_pb.rb +1 -1
- data/lib/google/cloud/servicedirectory/v1beta1/lookup_service_pb.rb +2 -2
- data/lib/google/cloud/servicedirectory/v1beta1/namespace_pb.rb +1 -1
- data/lib/google/cloud/servicedirectory/v1beta1/registration_service_pb.rb +1 -1
- data/lib/google/cloud/servicedirectory/v1beta1/registration_service_services_pb.rb +4 -3
- data/lib/google/cloud/servicedirectory/v1beta1/service_pb.rb +1 -1
- data/proto_docs/google/cloud/servicedirectory/v1beta1/endpoint.rb +8 -7
- data/proto_docs/google/cloud/servicedirectory/v1beta1/lookup_service.rb +9 -4
- data/proto_docs/google/cloud/servicedirectory/v1beta1/namespace.rb +4 -0
- data/proto_docs/google/cloud/servicedirectory/v1beta1/registration_service.rb +52 -25
- data/proto_docs/google/cloud/servicedirectory/v1beta1/service.rb +9 -8
- data/proto_docs/google/protobuf/any.rb +144 -0
- metadata +26 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 905499e1010925fa4a789ea0d5a53f264f495a904c626988213dfe5040b7efdf
|
4
|
+
data.tar.gz: a7de58fca2d4d1aa14eed872280f1697eb24fd402ab509aefd0c7f00551d25e9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ef8042b209d87b37000cc707325b5d3ece34dc7e7a35e938da6c5df1a0962cbaa2e77e186082787a8aaedab45725ccc6cbe56f34396e84fd40ab307f827e15db
|
7
|
+
data.tar.gz: 2f55eec1d5d003cc91f9af4390200f784fd0848b95f2f62b8ff535ba422feaac134095cacc45ac20ca8bef1f5bb5f0c90e8fb3ac27a4171529870fcfd2b1b8a6
|
@@ -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/v1beta1/rest"
|
28
|
+
# client = ::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Rest::Client.new
|
29
|
+
#
|
30
|
+
module V1beta1
|
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: "/v1beta1/{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: "/v1beta1/{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.v1beta1 package.
|
76
|
+
#
|
77
|
+
# This class contains common configuration for all services
|
78
|
+
# of the google.cloud.servicedirectory.v1beta1 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/v1beta1/lookup_service_pb"
|
21
|
+
require "google/cloud/location"
|
21
22
|
|
22
23
|
module Google
|
23
24
|
module Cloud
|
@@ -128,7 +129,7 @@ module Google
|
|
128
129
|
credentials = @config.credentials
|
129
130
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
130
131
|
# but only if the default endpoint does not have a region prefix.
|
131
|
-
enable_self_signed_jwt = @config.endpoint ==
|
132
|
+
enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
132
133
|
!@config.endpoint.split(".").first.include?("-")
|
133
134
|
credentials ||= Credentials.default scope: @config.scope,
|
134
135
|
enable_self_signed_jwt: enable_self_signed_jwt
|
@@ -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::V1beta1::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
|
##
|
@@ -172,8 +186,8 @@ module Google
|
|
172
186
|
# @param name [::String]
|
173
187
|
# Required. The name of the service to resolve.
|
174
188
|
# @param max_endpoints [::Integer]
|
175
|
-
# Optional. The maximum number of endpoints to return. Defaults to 25.
|
176
|
-
# If a value less than one is specified, the Default is used.
|
189
|
+
# Optional. The maximum number of endpoints to return. Defaults to 25.
|
190
|
+
# Maximum is 100. If a value less than one is specified, the Default is used.
|
177
191
|
# If a value greater than the Maximum is specified, the Maximum is used.
|
178
192
|
# @param endpoint_filter [::String]
|
179
193
|
# Optional. The filter applied to the endpoints of the resolved service.
|
@@ -200,6 +214,9 @@ module Google
|
|
200
214
|
# `name>projects/my-project/locations/us-east1/namespaces/my-namespace/services/my-service/endpoints/endpoint-c`
|
201
215
|
# returns endpoints that have name that is alphabetically later than the
|
202
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`
|
203
220
|
# * `metadata.owner!=sd AND metadata.foo=bar` returns endpoints that have
|
204
221
|
# `owner` in annotation key but value is not `sd` AND have key/value
|
205
222
|
# `foo=bar`
|
@@ -356,7 +373,9 @@ module Google
|
|
356
373
|
class Configuration
|
357
374
|
extend ::Gapic::Config
|
358
375
|
|
359
|
-
|
376
|
+
DEFAULT_ENDPOINT = "servicedirectory.googleapis.com"
|
377
|
+
|
378
|
+
config_attr :endpoint, DEFAULT_ENDPOINT, ::String
|
360
379
|
config_attr :credentials, nil do |value|
|
361
380
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
362
381
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
@@ -19,6 +19,7 @@
|
|
19
19
|
require "google/cloud/errors"
|
20
20
|
require "google/cloud/servicedirectory/v1beta1/lookup_service_pb"
|
21
21
|
require "google/cloud/service_directory/v1beta1/lookup_service/rest/service_stub"
|
22
|
+
require "google/cloud/location/rest"
|
22
23
|
|
23
24
|
module Google
|
24
25
|
module Cloud
|
@@ -124,7 +125,7 @@ module Google
|
|
124
125
|
credentials = @config.credentials
|
125
126
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
126
127
|
# but only if the default endpoint does not have a region prefix.
|
127
|
-
enable_self_signed_jwt = @config.endpoint ==
|
128
|
+
enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
128
129
|
!@config.endpoint.split(".").first.include?("-")
|
129
130
|
credentials ||= Credentials.default scope: @config.scope,
|
130
131
|
enable_self_signed_jwt: enable_self_signed_jwt
|
@@ -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::V1beta1::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
|
##
|
@@ -163,8 +178,8 @@ module Google
|
|
163
178
|
# @param name [::String]
|
164
179
|
# Required. The name of the service to resolve.
|
165
180
|
# @param max_endpoints [::Integer]
|
166
|
-
# Optional. The maximum number of endpoints to return. Defaults to 25.
|
167
|
-
# If a value less than one is specified, the Default is used.
|
181
|
+
# Optional. The maximum number of endpoints to return. Defaults to 25.
|
182
|
+
# Maximum is 100. If a value less than one is specified, the Default is used.
|
168
183
|
# If a value greater than the Maximum is specified, the Maximum is used.
|
169
184
|
# @param endpoint_filter [::String]
|
170
185
|
# Optional. The filter applied to the endpoints of the resolved service.
|
@@ -191,6 +206,9 @@ module Google
|
|
191
206
|
# `name>projects/my-project/locations/us-east1/namespaces/my-namespace/services/my-service/endpoints/endpoint-c`
|
192
207
|
# returns endpoints that have name that is alphabetically later than the
|
193
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`
|
194
212
|
# * `metadata.owner!=sd AND metadata.foo=bar` returns endpoints that have
|
195
213
|
# `owner` in annotation key but value is not `sd` AND have key/value
|
196
214
|
# `foo=bar`
|
@@ -315,7 +333,9 @@ module Google
|
|
315
333
|
class Configuration
|
316
334
|
extend ::Gapic::Config
|
317
335
|
|
318
|
-
|
336
|
+
DEFAULT_ENDPOINT = "servicedirectory.googleapis.com"
|
337
|
+
|
338
|
+
config_attr :endpoint, DEFAULT_ENDPOINT, ::String
|
319
339
|
config_attr :credentials, nil do |value|
|
320
340
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
321
341
|
allowed.any? { |klass| klass === value }
|
@@ -328,6 +348,13 @@ module Google
|
|
328
348
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
329
349
|
config_attr :quota_project, nil, ::String, nil
|
330
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
|
+
|
331
358
|
# @private
|
332
359
|
def initialize parent_config = nil
|
333
360
|
@parent_config = parent_config unless parent_config.nil?
|
@@ -59,7 +59,7 @@ module Google
|
|
59
59
|
|
60
60
|
verb, uri, query_string_params, body = ServiceStub.transcode_resolve_service_request request_pb
|
61
61
|
query_string_params = if query_string_params.any?
|
62
|
-
query_string_params.to_h { |p| p.split
|
62
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
63
63
|
else
|
64
64
|
{}
|
65
65
|
end
|
@@ -21,6 +21,7 @@ require "gapic/config"
|
|
21
21
|
require "gapic/config/method"
|
22
22
|
|
23
23
|
require "google/cloud/service_directory/v1beta1/version"
|
24
|
+
require "google/cloud/service_directory/v1beta1/bindings_override"
|
24
25
|
|
25
26
|
require "google/cloud/service_directory/v1beta1/lookup_service/credentials"
|
26
27
|
require "google/cloud/service_directory/v1beta1/lookup_service/paths"
|
@@ -18,6 +18,7 @@
|
|
18
18
|
|
19
19
|
require "google/cloud/errors"
|
20
20
|
require "google/cloud/servicedirectory/v1beta1/registration_service_pb"
|
21
|
+
require "google/cloud/location"
|
21
22
|
|
22
23
|
module Google
|
23
24
|
module Cloud
|
@@ -142,7 +143,7 @@ module Google
|
|
142
143
|
credentials = @config.credentials
|
143
144
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
144
145
|
# but only if the default endpoint does not have a region prefix.
|
145
|
-
enable_self_signed_jwt = @config.endpoint ==
|
146
|
+
enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
146
147
|
!@config.endpoint.split(".").first.include?("-")
|
147
148
|
credentials ||= Credentials.default scope: @config.scope,
|
148
149
|
enable_self_signed_jwt: enable_self_signed_jwt
|
@@ -152,6 +153,12 @@ module Google
|
|
152
153
|
@quota_project_id = @config.quota_project
|
153
154
|
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
154
155
|
|
156
|
+
@location_client = Google::Cloud::Location::Locations::Client.new do |config|
|
157
|
+
config.credentials = credentials
|
158
|
+
config.quota_project = @quota_project_id
|
159
|
+
config.endpoint = @config.endpoint
|
160
|
+
end
|
161
|
+
|
155
162
|
@registration_service_stub = ::Gapic::ServiceStub.new(
|
156
163
|
::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Stub,
|
157
164
|
credentials: credentials,
|
@@ -161,6 +168,13 @@ module Google
|
|
161
168
|
)
|
162
169
|
end
|
163
170
|
|
171
|
+
##
|
172
|
+
# Get the associated client for mix-in of the Locations.
|
173
|
+
#
|
174
|
+
# @return [Google::Cloud::Location::Locations::Client]
|
175
|
+
#
|
176
|
+
attr_reader :location_client
|
177
|
+
|
164
178
|
# Service calls
|
165
179
|
|
166
180
|
##
|
@@ -278,19 +292,21 @@ module Google
|
|
278
292
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
279
293
|
#
|
280
294
|
# @param parent [::String]
|
281
|
-
# Required. The resource name of the project and location whose namespaces
|
282
|
-
# to list.
|
295
|
+
# Required. The resource name of the project and location whose namespaces
|
296
|
+
# you'd like to list.
|
283
297
|
# @param page_size [::Integer]
|
284
298
|
# Optional. The maximum number of items to return.
|
285
299
|
# @param page_token [::String]
|
286
|
-
# Optional. The next_page_token value returned from a previous List request,
|
300
|
+
# Optional. The next_page_token value returned from a previous List request,
|
301
|
+
# if any.
|
287
302
|
# @param filter [::String]
|
288
303
|
# Optional. The filter to list results by.
|
289
304
|
#
|
290
305
|
# General `filter` string syntax:
|
291
306
|
# `<field> <operator> <value> (<logical connector>)`
|
292
307
|
#
|
293
|
-
# * `<field>` can be `name
|
308
|
+
# * `<field>` can be `name`, `labels.<key>` for map field, or
|
309
|
+
# `attributes.<field>` for attributes field
|
294
310
|
# * `<operator>` can be `<`, `>`, `<=`, `>=`, `!=`, `=`, `:`. Of which `:`
|
295
311
|
# means `HAS`, and is roughly the same as `=`
|
296
312
|
# * `<value>` must be the same data type as field
|
@@ -309,6 +325,8 @@ module Google
|
|
309
325
|
# * `doesnotexist.foo=bar` returns an empty list. Note that namespace
|
310
326
|
# doesn't have a field called "doesnotexist". Since the filter does not
|
311
327
|
# match any namespaces, it returns no results
|
328
|
+
# * `attributes.managed_registration=true` returns namespaces that are
|
329
|
+
# managed by a GCP product or service
|
312
330
|
#
|
313
331
|
# For more information about filtering, see
|
314
332
|
# [API Filtering](https://aip.dev/160).
|
@@ -800,6 +818,9 @@ module Google
|
|
800
818
|
# * `doesnotexist.foo=bar` returns an empty list. Note that service
|
801
819
|
# doesn't have a field called "doesnotexist". Since the filter does not
|
802
820
|
# match any services, it returns no results
|
821
|
+
# * `attributes.managed_registration=true` returns services that are
|
822
|
+
# managed
|
823
|
+
# by a GCP product or service
|
803
824
|
#
|
804
825
|
# For more information about filtering, see
|
805
826
|
# [API Filtering](https://aip.dev/160).
|
@@ -1269,8 +1290,8 @@ module Google
|
|
1269
1290
|
# General `filter` string syntax:
|
1270
1291
|
# `<field> <operator> <value> (<logical connector>)`
|
1271
1292
|
#
|
1272
|
-
# * `<field>` can be `name`, `address`, `port`,
|
1273
|
-
# field
|
1293
|
+
# * `<field>` can be `name`, `address`, `port`, `metadata.<key>` for map
|
1294
|
+
# field, or `attributes.<field>` for attributes field
|
1274
1295
|
# * `<operator>` can be `<`, `>`, `<=`, `>=`, `!=`, `=`, `:`. Of which `:`
|
1275
1296
|
# means `HAS`, and is roughly the same as `=`
|
1276
1297
|
# * `<value>` must be the same data type as field
|
@@ -1294,6 +1315,8 @@ module Google
|
|
1294
1315
|
# * `doesnotexist.foo=bar` returns an empty list. Note that endpoint
|
1295
1316
|
# doesn't have a field called "doesnotexist". Since the filter does not
|
1296
1317
|
# match any endpoints, it returns no results
|
1318
|
+
# * `attributes.kubernetes_resource_type=KUBERNETES_RESOURCE_TYPE_CLUSTER_
|
1319
|
+
# IP` returns endpoints with the corresponding kubernetes_resource_type
|
1297
1320
|
#
|
1298
1321
|
# For more information about filtering, see
|
1299
1322
|
# [API Filtering](https://aip.dev/160).
|
@@ -1636,7 +1659,7 @@ module Google
|
|
1636
1659
|
end
|
1637
1660
|
|
1638
1661
|
##
|
1639
|
-
# Gets the IAM Policy for a resource
|
1662
|
+
# Gets the IAM Policy for a resource
|
1640
1663
|
#
|
1641
1664
|
# @overload get_iam_policy(request, options = nil)
|
1642
1665
|
# Pass arguments to `get_iam_policy` via a request object, either of type
|
@@ -1725,7 +1748,7 @@ module Google
|
|
1725
1748
|
end
|
1726
1749
|
|
1727
1750
|
##
|
1728
|
-
# Sets the IAM Policy for a resource
|
1751
|
+
# Sets the IAM Policy for a resource
|
1729
1752
|
#
|
1730
1753
|
# @overload set_iam_policy(request, options = nil)
|
1731
1754
|
# Pass arguments to `set_iam_policy` via a request object, either of type
|
@@ -1822,7 +1845,8 @@ module Google
|
|
1822
1845
|
end
|
1823
1846
|
|
1824
1847
|
##
|
1825
|
-
# Tests IAM permissions for a resource (namespace or
|
1848
|
+
# Tests IAM permissions for a resource (namespace, service or
|
1849
|
+
# service workload only).
|
1826
1850
|
#
|
1827
1851
|
# @overload test_iam_permissions(request, options = nil)
|
1828
1852
|
# Pass arguments to `test_iam_permissions` via a request object, either of type
|
@@ -1994,7 +2018,9 @@ module Google
|
|
1994
2018
|
class Configuration
|
1995
2019
|
extend ::Gapic::Config
|
1996
2020
|
|
1997
|
-
|
2021
|
+
DEFAULT_ENDPOINT = "servicedirectory.googleapis.com"
|
2022
|
+
|
2023
|
+
config_attr :endpoint, DEFAULT_ENDPOINT, ::String
|
1998
2024
|
config_attr :credentials, nil do |value|
|
1999
2025
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
2000
2026
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
@@ -19,6 +19,7 @@
|
|
19
19
|
require "google/cloud/errors"
|
20
20
|
require "google/cloud/servicedirectory/v1beta1/registration_service_pb"
|
21
21
|
require "google/cloud/service_directory/v1beta1/registration_service/rest/service_stub"
|
22
|
+
require "google/cloud/location/rest"
|
22
23
|
|
23
24
|
module Google
|
24
25
|
module Cloud
|
@@ -138,7 +139,7 @@ module Google
|
|
138
139
|
credentials = @config.credentials
|
139
140
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
140
141
|
# but only if the default endpoint does not have a region prefix.
|
141
|
-
enable_self_signed_jwt = @config.endpoint ==
|
142
|
+
enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
142
143
|
!@config.endpoint.split(".").first.include?("-")
|
143
144
|
credentials ||= Credentials.default scope: @config.scope,
|
144
145
|
enable_self_signed_jwt: enable_self_signed_jwt
|
@@ -149,9 +150,23 @@ module Google
|
|
149
150
|
@quota_project_id = @config.quota_project
|
150
151
|
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
151
152
|
|
153
|
+
@location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
|
154
|
+
config.credentials = credentials
|
155
|
+
config.quota_project = @quota_project_id
|
156
|
+
config.endpoint = @config.endpoint
|
157
|
+
config.bindings_override = @config.bindings_override
|
158
|
+
end
|
159
|
+
|
152
160
|
@registration_service_stub = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
|
153
161
|
end
|
154
162
|
|
163
|
+
##
|
164
|
+
# Get the associated client for mix-in of the Locations.
|
165
|
+
#
|
166
|
+
# @return [Google::Cloud::Location::Locations::Rest::Client]
|
167
|
+
#
|
168
|
+
attr_reader :location_client
|
169
|
+
|
155
170
|
# Service calls
|
156
171
|
|
157
172
|
##
|
@@ -246,19 +261,21 @@ module Google
|
|
246
261
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
247
262
|
#
|
248
263
|
# @param parent [::String]
|
249
|
-
# Required. The resource name of the project and location whose namespaces
|
250
|
-
# to list.
|
264
|
+
# Required. The resource name of the project and location whose namespaces
|
265
|
+
# you'd like to list.
|
251
266
|
# @param page_size [::Integer]
|
252
267
|
# Optional. The maximum number of items to return.
|
253
268
|
# @param page_token [::String]
|
254
|
-
# Optional. The next_page_token value returned from a previous List request,
|
269
|
+
# Optional. The next_page_token value returned from a previous List request,
|
270
|
+
# if any.
|
255
271
|
# @param filter [::String]
|
256
272
|
# Optional. The filter to list results by.
|
257
273
|
#
|
258
274
|
# General `filter` string syntax:
|
259
275
|
# `<field> <operator> <value> (<logical connector>)`
|
260
276
|
#
|
261
|
-
# * `<field>` can be `name
|
277
|
+
# * `<field>` can be `name`, `labels.<key>` for map field, or
|
278
|
+
# `attributes.<field>` for attributes field
|
262
279
|
# * `<operator>` can be `<`, `>`, `<=`, `>=`, `!=`, `=`, `:`. Of which `:`
|
263
280
|
# means `HAS`, and is roughly the same as `=`
|
264
281
|
# * `<value>` must be the same data type as field
|
@@ -277,6 +294,8 @@ module Google
|
|
277
294
|
# * `doesnotexist.foo=bar` returns an empty list. Note that namespace
|
278
295
|
# doesn't have a field called "doesnotexist". Since the filter does not
|
279
296
|
# match any namespaces, it returns no results
|
297
|
+
# * `attributes.managed_registration=true` returns namespaces that are
|
298
|
+
# managed by a GCP product or service
|
280
299
|
#
|
281
300
|
# For more information about filtering, see
|
282
301
|
# [API Filtering](https://aip.dev/160).
|
@@ -649,6 +668,9 @@ module Google
|
|
649
668
|
# * `doesnotexist.foo=bar` returns an empty list. Note that service
|
650
669
|
# doesn't have a field called "doesnotexist". Since the filter does not
|
651
670
|
# match any services, it returns no results
|
671
|
+
# * `attributes.managed_registration=true` returns services that are
|
672
|
+
# managed
|
673
|
+
# by a GCP product or service
|
652
674
|
#
|
653
675
|
# For more information about filtering, see
|
654
676
|
# [API Filtering](https://aip.dev/160).
|
@@ -999,8 +1021,8 @@ module Google
|
|
999
1021
|
# General `filter` string syntax:
|
1000
1022
|
# `<field> <operator> <value> (<logical connector>)`
|
1001
1023
|
#
|
1002
|
-
# * `<field>` can be `name`, `address`, `port`,
|
1003
|
-
# field
|
1024
|
+
# * `<field>` can be `name`, `address`, `port`, `metadata.<key>` for map
|
1025
|
+
# field, or `attributes.<field>` for attributes field
|
1004
1026
|
# * `<operator>` can be `<`, `>`, `<=`, `>=`, `!=`, `=`, `:`. Of which `:`
|
1005
1027
|
# means `HAS`, and is roughly the same as `=`
|
1006
1028
|
# * `<value>` must be the same data type as field
|
@@ -1024,6 +1046,8 @@ module Google
|
|
1024
1046
|
# * `doesnotexist.foo=bar` returns an empty list. Note that endpoint
|
1025
1047
|
# doesn't have a field called "doesnotexist". Since the filter does not
|
1026
1048
|
# match any endpoints, it returns no results
|
1049
|
+
# * `attributes.kubernetes_resource_type=KUBERNETES_RESOURCE_TYPE_CLUSTER_
|
1050
|
+
# IP` returns endpoints with the corresponding kubernetes_resource_type
|
1027
1051
|
#
|
1028
1052
|
# For more information about filtering, see
|
1029
1053
|
# [API Filtering](https://aip.dev/160).
|
@@ -1270,7 +1294,7 @@ module Google
|
|
1270
1294
|
end
|
1271
1295
|
|
1272
1296
|
##
|
1273
|
-
# Gets the IAM Policy for a resource
|
1297
|
+
# Gets the IAM Policy for a resource
|
1274
1298
|
#
|
1275
1299
|
# @overload get_iam_policy(request, options = nil)
|
1276
1300
|
# Pass arguments to `get_iam_policy` via a request object, either of type
|
@@ -1336,7 +1360,7 @@ module Google
|
|
1336
1360
|
end
|
1337
1361
|
|
1338
1362
|
##
|
1339
|
-
# Sets the IAM Policy for a resource
|
1363
|
+
# Sets the IAM Policy for a resource
|
1340
1364
|
#
|
1341
1365
|
# @overload set_iam_policy(request, options = nil)
|
1342
1366
|
# Pass arguments to `set_iam_policy` via a request object, either of type
|
@@ -1410,7 +1434,8 @@ module Google
|
|
1410
1434
|
end
|
1411
1435
|
|
1412
1436
|
##
|
1413
|
-
# Tests IAM permissions for a resource (namespace or
|
1437
|
+
# Tests IAM permissions for a resource (namespace, service or
|
1438
|
+
# service workload only).
|
1414
1439
|
#
|
1415
1440
|
# @overload test_iam_permissions(request, options = nil)
|
1416
1441
|
# Pass arguments to `test_iam_permissions` via a request object, either of type
|
@@ -1550,7 +1575,9 @@ module Google
|
|
1550
1575
|
class Configuration
|
1551
1576
|
extend ::Gapic::Config
|
1552
1577
|
|
1553
|
-
|
1578
|
+
DEFAULT_ENDPOINT = "servicedirectory.googleapis.com"
|
1579
|
+
|
1580
|
+
config_attr :endpoint, DEFAULT_ENDPOINT, ::String
|
1554
1581
|
config_attr :credentials, nil do |value|
|
1555
1582
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
1556
1583
|
allowed.any? { |klass| klass === value }
|
@@ -1563,6 +1590,13 @@ module Google
|
|
1563
1590
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
1564
1591
|
config_attr :quota_project, nil, ::String, nil
|
1565
1592
|
|
1593
|
+
# @private
|
1594
|
+
# Overrides for http bindings for the RPCs of this service
|
1595
|
+
# are only used when this service is used as mixin, and only
|
1596
|
+
# by the host service.
|
1597
|
+
# @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
|
1598
|
+
config_attr :bindings_override, {}, ::Hash, nil
|
1599
|
+
|
1566
1600
|
# @private
|
1567
1601
|
def initialize parent_config = nil
|
1568
1602
|
@parent_config = parent_config unless parent_config.nil?
|