google-cloud-service_directory-v1 0.7.0 → 0.8.0
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 +50 -16
- data/lib/google/cloud/service_directory/v1/lookup_service/rest/client.rb +58 -16
- data/lib/google/cloud/service_directory/v1/lookup_service/rest/service_stub.rb +1 -1
- data/lib/google/cloud/service_directory/v1/lookup_service/rest.rb +1 -0
- data/lib/google/cloud/service_directory/v1/registration_service/client.rb +138 -83
- 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 +147 -84
- data/lib/google/cloud/service_directory/v1/registration_service/rest/service_stub.rb +18 -18
- 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/protobuf/any.rb +144 -0
- metadata +26 -4
@@ -30,39 +30,54 @@ module Google
|
|
30
30
|
# `projects/*/locations/*/namespaces/*/services/*/endpoints/*`.
|
31
31
|
# @!attribute [rw] address
|
32
32
|
# @return [::String]
|
33
|
-
# Optional. An IPv4 or IPv6 address. Service Directory
|
34
|
-
#
|
35
|
-
#
|
36
|
-
#
|
37
|
-
#
|
38
|
-
#
|
39
|
-
#
|
33
|
+
# Optional. An IPv4 or IPv6 address. Service Directory rejects bad addresses
|
34
|
+
# like:
|
35
|
+
#
|
36
|
+
# * `8.8.8`
|
37
|
+
# * `8.8.8.8:53`
|
38
|
+
# * `test:bad:address`
|
39
|
+
# * `[::1]`
|
40
|
+
# * `[::1]:8080`
|
41
|
+
#
|
40
42
|
# Limited to 45 characters.
|
41
43
|
# @!attribute [rw] port
|
42
44
|
# @return [::Integer]
|
43
|
-
# Optional. Service Directory
|
45
|
+
# Optional. Service Directory rejects values outside of `[0, 65535]`.
|
44
46
|
# @!attribute [rw] annotations
|
45
47
|
# @return [::Google::Protobuf::Map{::String => ::String}]
|
46
48
|
# Optional. Annotations for the endpoint. This data can be consumed by
|
47
|
-
# service clients.
|
48
|
-
#
|
49
|
-
#
|
50
|
-
#
|
51
|
-
#
|
52
|
-
#
|
53
|
-
#
|
54
|
-
#
|
55
|
-
#
|
56
|
-
#
|
57
|
-
#
|
58
|
-
#
|
59
|
-
#
|
60
|
-
#
|
61
|
-
#
|
62
|
-
#
|
63
|
-
# Note: This field is equivalent to the
|
49
|
+
# service clients.
|
50
|
+
#
|
51
|
+
# Restrictions:
|
52
|
+
#
|
53
|
+
# * The entire annotations dictionary may contain up to 512 characters,
|
54
|
+
# spread accoss all key-value pairs. Annotations that go beyond this
|
55
|
+
# limit are rejected
|
56
|
+
# * Valid annotation keys have two segments: an optional prefix and name,
|
57
|
+
# separated by a slash (/). The name segment is required and must be 63
|
58
|
+
# characters or less, beginning and ending with an alphanumeric character
|
59
|
+
# ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and
|
60
|
+
# alphanumerics between. The prefix is optional. If specified, the prefix
|
61
|
+
# must be a DNS subdomain: a series of DNS labels separated by dots (.),
|
62
|
+
# not longer than 253 characters in total, followed by a slash (/)
|
63
|
+
# Annotations that fails to meet these requirements are rejected.
|
64
|
+
#
|
65
|
+
# Note: This field is equivalent to the `metadata` field in the v1beta1 API.
|
64
66
|
# They have the same syntax and read/write to the same location in Service
|
65
67
|
# Directory.
|
68
|
+
# @!attribute [rw] network
|
69
|
+
# @return [::String]
|
70
|
+
# Immutable. The Google Compute Engine network (VPC) of the endpoint in the
|
71
|
+
# format `projects/<project number>/locations/global/networks/*`.
|
72
|
+
#
|
73
|
+
# The project must be specified by project number (project id is rejected).
|
74
|
+
# Incorrectly formatted networks are rejected, we also check to make sure
|
75
|
+
# that you have the servicedirectory.networks.attach permission on the
|
76
|
+
# project specified.
|
77
|
+
# @!attribute [r] uid
|
78
|
+
# @return [::String]
|
79
|
+
# Output only. The globally unique identifier of the endpoint in the UUID4
|
80
|
+
# format.
|
66
81
|
class Endpoint
|
67
82
|
include ::Google::Protobuf::MessageExts
|
68
83
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -36,22 +36,40 @@ module Google
|
|
36
36
|
# @return [::String]
|
37
37
|
# Optional. The filter applied to the endpoints of the resolved service.
|
38
38
|
#
|
39
|
-
# General filter string syntax:
|
40
|
-
#
|
41
|
-
#
|
42
|
-
#
|
43
|
-
#
|
44
|
-
#
|
45
|
-
#
|
39
|
+
# General `filter` string syntax:
|
40
|
+
# `<field> <operator> <value> (<logical connector>)`
|
41
|
+
#
|
42
|
+
# * `<field>` can be `name`, `address`, `port`, or `annotations.<key>` for
|
43
|
+
# map field
|
44
|
+
# * `<operator>` can be `<`, `>`, `<=`, `>=`, `!=`, `=`, `:`. Of which `:`
|
45
|
+
# means `HAS`, and is roughly the same as `=`
|
46
|
+
# * `<value>` must be the same data type as field
|
47
|
+
# * `<logical connector>` can be `AND`, `OR`, `NOT`
|
46
48
|
#
|
47
49
|
# Examples of valid filters:
|
48
|
-
#
|
49
|
-
#
|
50
|
-
#
|
51
|
-
#
|
52
|
-
#
|
53
|
-
#
|
54
|
-
#
|
50
|
+
#
|
51
|
+
# * `annotations.owner` returns endpoints that have a annotation with the
|
52
|
+
# key `owner`, this is the same as `annotations:owner`
|
53
|
+
# * `annotations.protocol=gRPC` returns endpoints that have key/value
|
54
|
+
# `protocol=gRPC`
|
55
|
+
# * `address=192.108.1.105` returns endpoints that have this address
|
56
|
+
# * `port>8080` returns endpoints that have port number larger than 8080
|
57
|
+
# *
|
58
|
+
# `name>projects/my-project/locations/us-east1/namespaces/my-namespace/services/my-service/endpoints/endpoint-c`
|
59
|
+
# returns endpoints that have name that is alphabetically later than the
|
60
|
+
# string, so "endpoint-e" is returned but "endpoint-a" is not
|
61
|
+
# *
|
62
|
+
# `name=projects/my-project/locations/us-central1/namespaces/my-namespace/services/my-service/endpoints/ep-1`
|
63
|
+
# returns the endpoint that has an endpoint_id equal to `ep-1`
|
64
|
+
# * `annotations.owner!=sd AND annotations.foo=bar` returns endpoints that
|
65
|
+
# have `owner` in annotation key but value is not `sd` AND have
|
66
|
+
# key/value `foo=bar`
|
67
|
+
# * `doesnotexist.foo=bar` returns an empty list. Note that endpoint
|
68
|
+
# doesn't have a field called "doesnotexist". Since the filter does not
|
69
|
+
# match any endpoint, it returns no results
|
70
|
+
#
|
71
|
+
# For more information about filtering, see
|
72
|
+
# [API Filtering](https://aip.dev/160).
|
55
73
|
class ResolveServiceRequest
|
56
74
|
include ::Google::Protobuf::MessageExts
|
57
75
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -30,9 +30,13 @@ module Google
|
|
30
30
|
# `projects/*/locations/*/namespaces/*`.
|
31
31
|
# @!attribute [rw] labels
|
32
32
|
# @return [::Google::Protobuf::Map{::String => ::String}]
|
33
|
-
# Optional. Resource labels associated with this
|
34
|
-
# No more than 64 user labels can be associated with a given resource.
|
33
|
+
# Optional. Resource labels associated with this namespace.
|
34
|
+
# No more than 64 user labels can be associated with a given resource. Label
|
35
35
|
# keys and values can be no longer than 63 characters.
|
36
|
+
# @!attribute [r] uid
|
37
|
+
# @return [::String]
|
38
|
+
# Output only. The globally unique identifier of the namespace in the UUID4
|
39
|
+
# format.
|
36
40
|
class Namespace
|
37
41
|
include ::Google::Protobuf::MessageExts
|
38
42
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -49,7 +49,7 @@ module Google
|
|
49
49
|
# @!attribute [rw] parent
|
50
50
|
# @return [::String]
|
51
51
|
# Required. The resource name of the project and location whose namespaces
|
52
|
-
#
|
52
|
+
# you'd like to list.
|
53
53
|
# @!attribute [rw] page_size
|
54
54
|
# @return [::Integer]
|
55
55
|
# Optional. The maximum number of items to return.
|
@@ -59,40 +59,46 @@ module Google
|
|
59
59
|
# if any.
|
60
60
|
# @!attribute [rw] filter
|
61
61
|
# @return [::String]
|
62
|
-
# Optional. The filter to list
|
62
|
+
# Optional. The filter to list results by.
|
63
63
|
#
|
64
|
-
# General filter string syntax:
|
65
|
-
#
|
66
|
-
#
|
67
|
-
#
|
68
|
-
#
|
69
|
-
#
|
70
|
-
#
|
64
|
+
# General `filter` string syntax:
|
65
|
+
# `<field> <operator> <value> (<logical connector>)`
|
66
|
+
#
|
67
|
+
# * `<field>` can be `name` or `labels.<key>` for map field
|
68
|
+
# * `<operator>` can be `<`, `>`, `<=`, `>=`, `!=`, `=`, `:`. Of which `:`
|
69
|
+
# means `HAS`, and is roughly the same as `=`
|
70
|
+
# * `<value>` must be the same data type as field
|
71
|
+
# * `<logical connector>` can be `AND`, `OR`, `NOT`
|
71
72
|
#
|
72
73
|
# Examples of valid filters:
|
73
|
-
#
|
74
|
-
#
|
75
|
-
#
|
76
|
-
#
|
77
|
-
#
|
78
|
-
#
|
79
|
-
#
|
80
|
-
#
|
81
|
-
#
|
82
|
-
#
|
83
|
-
#
|
84
|
-
#
|
74
|
+
#
|
75
|
+
# * `labels.owner` returns namespaces that have a label with the key
|
76
|
+
# `owner`, this is the same as `labels:owner`
|
77
|
+
# * `labels.owner=sd` returns namespaces that have key/value
|
78
|
+
# `owner=sd`
|
79
|
+
# * `name>projects/my-project/locations/us-east1/namespaces/namespace-c`
|
80
|
+
# returns namespaces that have name that is alphabetically later than the
|
81
|
+
# string, so "namespace-e" is returned but "namespace-a" is not
|
82
|
+
# * `labels.owner!=sd AND labels.foo=bar` returns namespaces that have
|
83
|
+
# `owner` in label key but value is not `sd` AND have key/value `foo=bar`
|
84
|
+
# * `doesnotexist.foo=bar` returns an empty list. Note that namespace
|
85
|
+
# doesn't have a field called "doesnotexist". Since the filter does not
|
86
|
+
# match any namespaces, it returns no results
|
87
|
+
#
|
88
|
+
# For more information about filtering, see
|
89
|
+
# [API Filtering](https://aip.dev/160).
|
85
90
|
# @!attribute [rw] order_by
|
86
91
|
# @return [::String]
|
87
|
-
# Optional. The order to list
|
92
|
+
# Optional. The order to list results by.
|
93
|
+
#
|
94
|
+
# General `order_by` string syntax: `<field> (<asc|desc>) (,)`
|
95
|
+
#
|
96
|
+
# * `<field>` allows value: `name`
|
97
|
+
# * `<asc|desc>` ascending or descending order by `<field>`. If this is
|
98
|
+
# left blank, `asc` is used
|
88
99
|
#
|
89
|
-
#
|
90
|
-
#
|
91
|
-
# <field> allows values \\{"name"}
|
92
|
-
# <asc/desc> ascending or descending order by <field>. If this is left
|
93
|
-
# blank, "asc" is used.
|
94
|
-
# Note that an empty order_by string result in default order, which is order
|
95
|
-
# by name in ascending order.
|
100
|
+
# Note that an empty `order_by` string results in default order, which is
|
101
|
+
# order by `name` in ascending order.
|
96
102
|
class ListNamespacesRequest
|
97
103
|
include ::Google::Protobuf::MessageExts
|
98
104
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -171,7 +177,7 @@ module Google
|
|
171
177
|
# {::Google::Cloud::ServiceDirectory::V1::RegistrationService::Client#list_services RegistrationService.ListServices}.
|
172
178
|
# @!attribute [rw] parent
|
173
179
|
# @return [::String]
|
174
|
-
# Required. The resource name of the namespace whose services
|
180
|
+
# Required. The resource name of the namespace whose services you'd
|
175
181
|
# like to list.
|
176
182
|
# @!attribute [rw] page_size
|
177
183
|
# @return [::Integer]
|
@@ -182,32 +188,48 @@ module Google
|
|
182
188
|
# if any.
|
183
189
|
# @!attribute [rw] filter
|
184
190
|
# @return [::String]
|
185
|
-
# Optional. The filter to list
|
191
|
+
# Optional. The filter to list results by.
|
186
192
|
#
|
187
|
-
# General filter string syntax:
|
188
|
-
#
|
189
|
-
#
|
190
|
-
#
|
191
|
-
#
|
192
|
-
#
|
193
|
-
#
|
193
|
+
# General `filter` string syntax:
|
194
|
+
# `<field> <operator> <value> (<logical connector>)`
|
195
|
+
#
|
196
|
+
# * `<field>` can be `name` or `annotations.<key>` for map field
|
197
|
+
# * `<operator>` can be `<`, `>`, `<=`, `>=`, `!=`, `=`, `:`. Of which `:`
|
198
|
+
# means `HAS`, and is roughly the same as `=`
|
199
|
+
# * `<value>` must be the same data type as field
|
200
|
+
# * `<logical connector>` can be `AND`, `OR`, `NOT`
|
194
201
|
#
|
195
202
|
# Examples of valid filters:
|
196
|
-
#
|
197
|
-
#
|
198
|
-
#
|
199
|
-
#
|
200
|
-
#
|
201
|
-
#
|
202
|
-
#
|
203
|
-
#
|
204
|
-
#
|
205
|
-
# *
|
206
|
-
#
|
207
|
-
#
|
203
|
+
#
|
204
|
+
# * `annotations.owner` returns services that have a annotation with the
|
205
|
+
# key `owner`, this is the same as `annotations:owner`
|
206
|
+
# * `annotations.protocol=gRPC` returns services that have key/value
|
207
|
+
# `protocol=gRPC`
|
208
|
+
# *
|
209
|
+
# `name>projects/my-project/locations/us-east1/namespaces/my-namespace/services/service-c`
|
210
|
+
# returns services that have name that is alphabetically later than the
|
211
|
+
# string, so "service-e" is returned but "service-a" is not
|
212
|
+
# * `annotations.owner!=sd AND annotations.foo=bar` returns services 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 service
|
216
|
+
# doesn't have a field called "doesnotexist". Since the filter does not
|
217
|
+
# match any services, it returns no results
|
218
|
+
#
|
219
|
+
# For more information about filtering, see
|
220
|
+
# [API Filtering](https://aip.dev/160).
|
208
221
|
# @!attribute [rw] order_by
|
209
222
|
# @return [::String]
|
210
|
-
# Optional. The order to list
|
223
|
+
# Optional. The order to list results by.
|
224
|
+
#
|
225
|
+
# General `order_by` string syntax: `<field> (<asc|desc>) (,)`
|
226
|
+
#
|
227
|
+
# * `<field>` allows value: `name`
|
228
|
+
# * `<asc|desc>` ascending or descending order by `<field>`. If this is
|
229
|
+
# left blank, `asc` is used
|
230
|
+
#
|
231
|
+
# Note that an empty `order_by` string results in default order, which is
|
232
|
+
# order by `name` in ascending order.
|
211
233
|
class ListServicesRequest
|
212
234
|
include ::Google::Protobuf::MessageExts
|
213
235
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -229,8 +251,8 @@ module Google
|
|
229
251
|
|
230
252
|
# The request message for
|
231
253
|
# {::Google::Cloud::ServiceDirectory::V1::RegistrationService::Client#get_service RegistrationService.GetService}.
|
232
|
-
# This should not be used for looking up a service.
|
233
|
-
# method as it
|
254
|
+
# This should not be used for looking up a service. Instead, use the `resolve`
|
255
|
+
# method as it contains all endpoints and associated annotations.
|
234
256
|
# @!attribute [rw] name
|
235
257
|
# @return [::String]
|
236
258
|
# Required. The name of the service to get.
|
@@ -288,7 +310,7 @@ module Google
|
|
288
310
|
# {::Google::Cloud::ServiceDirectory::V1::RegistrationService::Client#list_endpoints RegistrationService.ListEndpoints}.
|
289
311
|
# @!attribute [rw] parent
|
290
312
|
# @return [::String]
|
291
|
-
# Required. The resource name of the service whose endpoints
|
313
|
+
# Required. The resource name of the service whose endpoints you'd like to
|
292
314
|
# list.
|
293
315
|
# @!attribute [rw] page_size
|
294
316
|
# @return [::Integer]
|
@@ -299,34 +321,51 @@ module Google
|
|
299
321
|
# if any.
|
300
322
|
# @!attribute [rw] filter
|
301
323
|
# @return [::String]
|
302
|
-
# Optional. The filter to list
|
324
|
+
# Optional. The filter to list results by.
|
303
325
|
#
|
304
|
-
# General filter string syntax:
|
305
|
-
#
|
306
|
-
#
|
307
|
-
#
|
308
|
-
#
|
309
|
-
#
|
310
|
-
#
|
326
|
+
# General `filter` string syntax:
|
327
|
+
# `<field> <operator> <value> (<logical connector>)`
|
328
|
+
#
|
329
|
+
# * `<field>` can be `name`, `address`, `port`, or `annotations.<key>` for
|
330
|
+
# map field
|
331
|
+
# * `<operator>` can be `<`, `>`, `<=`, `>=`, `!=`, `=`, `:`. Of which `:`
|
332
|
+
# means `HAS`, and is roughly the same as `=`
|
333
|
+
# * `<value>` must be the same data type as field
|
334
|
+
# * `<logical connector>` can be `AND`, `OR`, `NOT`
|
311
335
|
#
|
312
336
|
# Examples of valid filters:
|
313
|
-
#
|
314
|
-
#
|
315
|
-
#
|
316
|
-
#
|
317
|
-
#
|
318
|
-
# *
|
319
|
-
# *
|
320
|
-
#
|
321
|
-
#
|
322
|
-
#
|
323
|
-
#
|
324
|
-
# *
|
325
|
-
#
|
326
|
-
#
|
337
|
+
#
|
338
|
+
# * `annotations.owner` returns endpoints that have a annotation with the
|
339
|
+
# key `owner`, this is the same as `annotations:owner`
|
340
|
+
# * `annotations.protocol=gRPC` returns endpoints that have key/value
|
341
|
+
# `protocol=gRPC`
|
342
|
+
# * `address=192.108.1.105` returns endpoints that have this address
|
343
|
+
# * `port>8080` returns endpoints that have port number larger than 8080
|
344
|
+
# *
|
345
|
+
# `name>projects/my-project/locations/us-east1/namespaces/my-namespace/services/my-service/endpoints/endpoint-c`
|
346
|
+
# returns endpoints that have name that is alphabetically later than the
|
347
|
+
# string, so "endpoint-e" is returned but "endpoint-a" is not
|
348
|
+
# * `annotations.owner!=sd AND annotations.foo=bar` returns endpoints that
|
349
|
+
# have `owner` in annotation key but value is not `sd` AND have
|
350
|
+
# key/value `foo=bar`
|
351
|
+
# * `doesnotexist.foo=bar` returns an empty list. Note that endpoint
|
352
|
+
# doesn't have a field called "doesnotexist". Since the filter does not
|
353
|
+
# match any endpoints, it returns no results
|
354
|
+
#
|
355
|
+
# For more information about filtering, see
|
356
|
+
# [API Filtering](https://aip.dev/160).
|
327
357
|
# @!attribute [rw] order_by
|
328
358
|
# @return [::String]
|
329
|
-
# Optional. The order to list
|
359
|
+
# Optional. The order to list results by.
|
360
|
+
#
|
361
|
+
# General `order_by` string syntax: `<field> (<asc|desc>) (,)`
|
362
|
+
#
|
363
|
+
# * `<field>` allows values: `name`, `address`, `port`
|
364
|
+
# * `<asc|desc>` ascending or descending order by `<field>`. If this is
|
365
|
+
# left blank, `asc` is used
|
366
|
+
#
|
367
|
+
# Note that an empty `order_by` string results in default order, which is
|
368
|
+
# order by `name` in ascending order.
|
330
369
|
class ListEndpointsRequest
|
331
370
|
include ::Google::Protobuf::MessageExts
|
332
371
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -33,30 +33,34 @@ module Google
|
|
33
33
|
# @return [::Google::Protobuf::Map{::String => ::String}]
|
34
34
|
# Optional. Annotations for the service. This data can be consumed by service
|
35
35
|
# clients.
|
36
|
+
#
|
36
37
|
# Restrictions:
|
37
|
-
#
|
38
|
-
#
|
39
|
-
#
|
40
|
-
#
|
41
|
-
#
|
42
|
-
#
|
43
|
-
#
|
44
|
-
#
|
45
|
-
#
|
46
|
-
#
|
47
|
-
#
|
48
|
-
#
|
49
|
-
#
|
50
|
-
#
|
51
|
-
# the system.
|
52
|
-
# Note: This field is equivalent to the 'metadata' field in the v1beta1 API.
|
38
|
+
#
|
39
|
+
# * The entire annotations dictionary may contain up to 2000 characters,
|
40
|
+
# spread accoss all key-value pairs. Annotations that go beyond this
|
41
|
+
# limit are rejected
|
42
|
+
# * Valid annotation keys have two segments: an optional prefix and name,
|
43
|
+
# separated by a slash (/). The name segment is required and must be 63
|
44
|
+
# characters or less, beginning and ending with an alphanumeric character
|
45
|
+
# ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and
|
46
|
+
# alphanumerics between. The prefix is optional. If specified, the prefix
|
47
|
+
# must be a DNS subdomain: a series of DNS labels separated by dots (.),
|
48
|
+
# not longer than 253 characters in total, followed by a slash (/).
|
49
|
+
# Annotations that fails to meet these requirements are rejected
|
50
|
+
#
|
51
|
+
# Note: This field is equivalent to the `metadata` field in the v1beta1 API.
|
53
52
|
# They have the same syntax and read/write to the same location in Service
|
54
53
|
# Directory.
|
55
54
|
# @!attribute [r] endpoints
|
56
55
|
# @return [::Array<::Google::Cloud::ServiceDirectory::V1::Endpoint>]
|
57
56
|
# Output only. Endpoints associated with this service. Returned on
|
58
|
-
# LookupService.
|
59
|
-
#
|
57
|
+
# {::Google::Cloud::ServiceDirectory::V1::LookupService::Client#resolve_service LookupService.ResolveService}.
|
58
|
+
# Control plane clients should use
|
59
|
+
# {::Google::Cloud::ServiceDirectory::V1::RegistrationService::Client#list_endpoints RegistrationService.ListEndpoints}.
|
60
|
+
# @!attribute [r] uid
|
61
|
+
# @return [::String]
|
62
|
+
# Output only. The globally unique identifier of the service in the UUID4
|
63
|
+
# format.
|
60
64
|
class Service
|
61
65
|
include ::Google::Protobuf::MessageExts
|
62
66
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -0,0 +1,144 @@
|
|
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
|
+
|
20
|
+
module Google
|
21
|
+
module Protobuf
|
22
|
+
# `Any` contains an arbitrary serialized protocol buffer message along with a
|
23
|
+
# URL that describes the type of the serialized message.
|
24
|
+
#
|
25
|
+
# Protobuf library provides support to pack/unpack Any values in the form
|
26
|
+
# of utility functions or additional generated methods of the Any type.
|
27
|
+
#
|
28
|
+
# Example 1: Pack and unpack a message in C++.
|
29
|
+
#
|
30
|
+
# Foo foo = ...;
|
31
|
+
# Any any;
|
32
|
+
# any.PackFrom(foo);
|
33
|
+
# ...
|
34
|
+
# if (any.UnpackTo(&foo)) {
|
35
|
+
# ...
|
36
|
+
# }
|
37
|
+
#
|
38
|
+
# Example 2: Pack and unpack a message in Java.
|
39
|
+
#
|
40
|
+
# Foo foo = ...;
|
41
|
+
# Any any = Any.pack(foo);
|
42
|
+
# ...
|
43
|
+
# if (any.is(Foo.class)) {
|
44
|
+
# foo = any.unpack(Foo.class);
|
45
|
+
# }
|
46
|
+
# // or ...
|
47
|
+
# if (any.isSameTypeAs(Foo.getDefaultInstance())) {
|
48
|
+
# foo = any.unpack(Foo.getDefaultInstance());
|
49
|
+
# }
|
50
|
+
#
|
51
|
+
# Example 3: Pack and unpack a message in Python.
|
52
|
+
#
|
53
|
+
# foo = Foo(...)
|
54
|
+
# any = Any()
|
55
|
+
# any.Pack(foo)
|
56
|
+
# ...
|
57
|
+
# if any.Is(Foo.DESCRIPTOR):
|
58
|
+
# any.Unpack(foo)
|
59
|
+
# ...
|
60
|
+
#
|
61
|
+
# Example 4: Pack and unpack a message in Go
|
62
|
+
#
|
63
|
+
# foo := &pb.Foo{...}
|
64
|
+
# any, err := anypb.New(foo)
|
65
|
+
# if err != nil {
|
66
|
+
# ...
|
67
|
+
# }
|
68
|
+
# ...
|
69
|
+
# foo := &pb.Foo{}
|
70
|
+
# if err := any.UnmarshalTo(foo); err != nil {
|
71
|
+
# ...
|
72
|
+
# }
|
73
|
+
#
|
74
|
+
# The pack methods provided by protobuf library will by default use
|
75
|
+
# 'type.googleapis.com/full.type.name' as the type URL and the unpack
|
76
|
+
# methods only use the fully qualified type name after the last '/'
|
77
|
+
# in the type URL, for example "foo.bar.com/x/y.z" will yield type
|
78
|
+
# name "y.z".
|
79
|
+
#
|
80
|
+
# JSON
|
81
|
+
# ====
|
82
|
+
# The JSON representation of an `Any` value uses the regular
|
83
|
+
# representation of the deserialized, embedded message, with an
|
84
|
+
# additional field `@type` which contains the type URL. Example:
|
85
|
+
#
|
86
|
+
# package google.profile;
|
87
|
+
# message Person {
|
88
|
+
# string first_name = 1;
|
89
|
+
# string last_name = 2;
|
90
|
+
# }
|
91
|
+
#
|
92
|
+
# {
|
93
|
+
# "@type": "type.googleapis.com/google.profile.Person",
|
94
|
+
# "firstName": <string>,
|
95
|
+
# "lastName": <string>
|
96
|
+
# }
|
97
|
+
#
|
98
|
+
# If the embedded message type is well-known and has a custom JSON
|
99
|
+
# representation, that representation will be embedded adding a field
|
100
|
+
# `value` which holds the custom JSON in addition to the `@type`
|
101
|
+
# field. Example (for message [google.protobuf.Duration][]):
|
102
|
+
#
|
103
|
+
# {
|
104
|
+
# "@type": "type.googleapis.com/google.protobuf.Duration",
|
105
|
+
# "value": "1.212s"
|
106
|
+
# }
|
107
|
+
# @!attribute [rw] type_url
|
108
|
+
# @return [::String]
|
109
|
+
# A URL/resource name that uniquely identifies the type of the serialized
|
110
|
+
# protocol buffer message. This string must contain at least
|
111
|
+
# one "/" character. The last segment of the URL's path must represent
|
112
|
+
# the fully qualified name of the type (as in
|
113
|
+
# `path/google.protobuf.Duration`). The name should be in a canonical form
|
114
|
+
# (e.g., leading "." is not accepted).
|
115
|
+
#
|
116
|
+
# In practice, teams usually precompile into the binary all types that they
|
117
|
+
# expect it to use in the context of Any. However, for URLs which use the
|
118
|
+
# scheme `http`, `https`, or no scheme, one can optionally set up a type
|
119
|
+
# server that maps type URLs to message definitions as follows:
|
120
|
+
#
|
121
|
+
# * If no scheme is provided, `https` is assumed.
|
122
|
+
# * An HTTP GET on the URL must yield a [google.protobuf.Type][]
|
123
|
+
# value in binary format, or produce an error.
|
124
|
+
# * Applications are allowed to cache lookup results based on the
|
125
|
+
# URL, or have them precompiled into a binary to avoid any
|
126
|
+
# lookup. Therefore, binary compatibility needs to be preserved
|
127
|
+
# on changes to types. (Use versioned type names to manage
|
128
|
+
# breaking changes.)
|
129
|
+
#
|
130
|
+
# Note: this functionality is not currently available in the official
|
131
|
+
# protobuf release, and it is not used for type URLs beginning with
|
132
|
+
# type.googleapis.com.
|
133
|
+
#
|
134
|
+
# Schemes other than `http`, `https` (or the empty scheme) might be
|
135
|
+
# used with implementation specific semantics.
|
136
|
+
# @!attribute [rw] value
|
137
|
+
# @return [::String]
|
138
|
+
# Must be a valid serialized protocol buffer of the above specified type.
|
139
|
+
class Any
|
140
|
+
include ::Google::Protobuf::MessageExts
|
141
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
142
|
+
end
|
143
|
+
end
|
144
|
+
end
|