google-cloud-service_directory-v1 0.7.1 → 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 +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/protobuf/any.rb +144 -0
- metadata +24 -2
@@ -19,6 +19,7 @@
|
|
19
19
|
require "google/cloud/errors"
|
20
20
|
require "google/cloud/servicedirectory/v1/registration_service_pb"
|
21
21
|
require "google/cloud/service_directory/v1/registration_service/rest/service_stub"
|
22
|
+
require "google/cloud/location/rest"
|
22
23
|
|
23
24
|
module Google
|
24
25
|
module Cloud
|
@@ -149,13 +150,27 @@ 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::V1::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
|
##
|
158
|
-
# Creates a namespace, and returns the new
|
173
|
+
# Creates a namespace, and returns the new namespace.
|
159
174
|
#
|
160
175
|
# @overload create_namespace(request, options = nil)
|
161
176
|
# Pass arguments to `create_namespace` via a request object, either of type
|
@@ -247,46 +262,52 @@ module Google
|
|
247
262
|
#
|
248
263
|
# @param parent [::String]
|
249
264
|
# Required. The resource name of the project and location whose namespaces
|
250
|
-
#
|
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
269
|
# Optional. The next_page_token value returned from a previous List request,
|
255
270
|
# if any.
|
256
271
|
# @param filter [::String]
|
257
|
-
# Optional. The filter to list
|
272
|
+
# Optional. The filter to list results by.
|
258
273
|
#
|
259
|
-
# General filter string syntax:
|
260
|
-
#
|
261
|
-
#
|
262
|
-
#
|
263
|
-
#
|
264
|
-
#
|
265
|
-
#
|
274
|
+
# General `filter` string syntax:
|
275
|
+
# `<field> <operator> <value> (<logical connector>)`
|
276
|
+
#
|
277
|
+
# * `<field>` can be `name` or `labels.<key>` for map field
|
278
|
+
# * `<operator>` can be `<`, `>`, `<=`, `>=`, `!=`, `=`, `:`. Of which `:`
|
279
|
+
# means `HAS`, and is roughly the same as `=`
|
280
|
+
# * `<value>` must be the same data type as field
|
281
|
+
# * `<logical connector>` can be `AND`, `OR`, `NOT`
|
266
282
|
#
|
267
283
|
# Examples of valid filters:
|
268
|
-
#
|
269
|
-
#
|
270
|
-
#
|
271
|
-
#
|
272
|
-
#
|
273
|
-
#
|
274
|
-
#
|
275
|
-
#
|
276
|
-
#
|
277
|
-
#
|
278
|
-
#
|
279
|
-
#
|
284
|
+
#
|
285
|
+
# * `labels.owner` returns namespaces that have a label with the key
|
286
|
+
# `owner`, this is the same as `labels:owner`
|
287
|
+
# * `labels.owner=sd` returns namespaces that have key/value
|
288
|
+
# `owner=sd`
|
289
|
+
# * `name>projects/my-project/locations/us-east1/namespaces/namespace-c`
|
290
|
+
# returns namespaces that have name that is alphabetically later than the
|
291
|
+
# string, so "namespace-e" is returned but "namespace-a" is not
|
292
|
+
# * `labels.owner!=sd AND labels.foo=bar` returns namespaces that have
|
293
|
+
# `owner` in label key but value is not `sd` AND have key/value `foo=bar`
|
294
|
+
# * `doesnotexist.foo=bar` returns an empty list. Note that namespace
|
295
|
+
# doesn't have a field called "doesnotexist". Since the filter does not
|
296
|
+
# match any namespaces, it returns no results
|
297
|
+
#
|
298
|
+
# For more information about filtering, see
|
299
|
+
# [API Filtering](https://aip.dev/160).
|
280
300
|
# @param order_by [::String]
|
281
|
-
# Optional. The order to list
|
282
|
-
#
|
283
|
-
# General
|
284
|
-
#
|
285
|
-
#
|
286
|
-
#
|
287
|
-
#
|
288
|
-
#
|
289
|
-
#
|
301
|
+
# Optional. The order to list results by.
|
302
|
+
#
|
303
|
+
# General `order_by` string syntax: `<field> (<asc|desc>) (,)`
|
304
|
+
#
|
305
|
+
# * `<field>` allows value: `name`
|
306
|
+
# * `<asc|desc>` ascending or descending order by `<field>`. If this is
|
307
|
+
# left blank, `asc` is used
|
308
|
+
#
|
309
|
+
# Note that an empty `order_by` string results in default order, which is
|
310
|
+
# order by `name` in ascending order.
|
290
311
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
291
312
|
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ServiceDirectory::V1::Namespace>]
|
292
313
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -520,7 +541,7 @@ module Google
|
|
520
541
|
end
|
521
542
|
|
522
543
|
##
|
523
|
-
# Creates a service, and returns the new
|
544
|
+
# Creates a service, and returns the new service.
|
524
545
|
#
|
525
546
|
# @overload create_service(request, options = nil)
|
526
547
|
# Pass arguments to `create_service` via a request object, either of type
|
@@ -610,7 +631,7 @@ module Google
|
|
610
631
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
611
632
|
#
|
612
633
|
# @param parent [::String]
|
613
|
-
# Required. The resource name of the namespace whose services
|
634
|
+
# Required. The resource name of the namespace whose services you'd
|
614
635
|
# like to list.
|
615
636
|
# @param page_size [::Integer]
|
616
637
|
# Optional. The maximum number of items to return.
|
@@ -618,31 +639,47 @@ module Google
|
|
618
639
|
# Optional. The next_page_token value returned from a previous List request,
|
619
640
|
# if any.
|
620
641
|
# @param filter [::String]
|
621
|
-
# Optional. The filter to list
|
642
|
+
# Optional. The filter to list results by.
|
643
|
+
#
|
644
|
+
# General `filter` string syntax:
|
645
|
+
# `<field> <operator> <value> (<logical connector>)`
|
622
646
|
#
|
623
|
-
#
|
624
|
-
#
|
625
|
-
#
|
626
|
-
#
|
627
|
-
#
|
628
|
-
# <value> must be the same data type as field.
|
629
|
-
# <logical connector> can be "AND, OR, NOT".
|
647
|
+
# * `<field>` can be `name` or `annotations.<key>` for map field
|
648
|
+
# * `<operator>` can be `<`, `>`, `<=`, `>=`, `!=`, `=`, `:`. Of which `:`
|
649
|
+
# means `HAS`, and is roughly the same as `=`
|
650
|
+
# * `<value>` must be the same data type as field
|
651
|
+
# * `<logical connector>` can be `AND`, `OR`, `NOT`
|
630
652
|
#
|
631
653
|
# Examples of valid filters:
|
632
|
-
#
|
633
|
-
#
|
634
|
-
#
|
635
|
-
#
|
636
|
-
#
|
637
|
-
#
|
638
|
-
#
|
639
|
-
#
|
640
|
-
#
|
641
|
-
# *
|
642
|
-
#
|
643
|
-
#
|
654
|
+
#
|
655
|
+
# * `annotations.owner` returns services that have a annotation with the
|
656
|
+
# key `owner`, this is the same as `annotations:owner`
|
657
|
+
# * `annotations.protocol=gRPC` returns services that have key/value
|
658
|
+
# `protocol=gRPC`
|
659
|
+
# *
|
660
|
+
# `name>projects/my-project/locations/us-east1/namespaces/my-namespace/services/service-c`
|
661
|
+
# returns services that have name that is alphabetically later than the
|
662
|
+
# string, so "service-e" is returned but "service-a" is not
|
663
|
+
# * `annotations.owner!=sd AND annotations.foo=bar` returns services that
|
664
|
+
# have `owner` in annotation key but value is not `sd` AND have
|
665
|
+
# key/value `foo=bar`
|
666
|
+
# * `doesnotexist.foo=bar` returns an empty list. Note that service
|
667
|
+
# doesn't have a field called "doesnotexist". Since the filter does not
|
668
|
+
# match any services, it returns no results
|
669
|
+
#
|
670
|
+
# For more information about filtering, see
|
671
|
+
# [API Filtering](https://aip.dev/160).
|
644
672
|
# @param order_by [::String]
|
645
|
-
# Optional. The order to list
|
673
|
+
# Optional. The order to list results by.
|
674
|
+
#
|
675
|
+
# General `order_by` string syntax: `<field> (<asc|desc>) (,)`
|
676
|
+
#
|
677
|
+
# * `<field>` allows value: `name`
|
678
|
+
# * `<asc|desc>` ascending or descending order by `<field>`. If this is
|
679
|
+
# left blank, `asc` is used
|
680
|
+
#
|
681
|
+
# Note that an empty `order_by` string results in default order, which is
|
682
|
+
# order by `name` in ascending order.
|
646
683
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
647
684
|
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ServiceDirectory::V1::Service>]
|
648
685
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -876,7 +913,7 @@ module Google
|
|
876
913
|
end
|
877
914
|
|
878
915
|
##
|
879
|
-
# Creates
|
916
|
+
# Creates an endpoint, and returns the new endpoint.
|
880
917
|
#
|
881
918
|
# @overload create_endpoint(request, options = nil)
|
882
919
|
# Pass arguments to `create_endpoint` via a request object, either of type
|
@@ -966,7 +1003,7 @@ module Google
|
|
966
1003
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
967
1004
|
#
|
968
1005
|
# @param parent [::String]
|
969
|
-
# Required. The resource name of the service whose endpoints
|
1006
|
+
# Required. The resource name of the service whose endpoints you'd like to
|
970
1007
|
# list.
|
971
1008
|
# @param page_size [::Integer]
|
972
1009
|
# Optional. The maximum number of items to return.
|
@@ -974,33 +1011,50 @@ module Google
|
|
974
1011
|
# Optional. The next_page_token value returned from a previous List request,
|
975
1012
|
# if any.
|
976
1013
|
# @param filter [::String]
|
977
|
-
# Optional. The filter to list
|
1014
|
+
# Optional. The filter to list results by.
|
1015
|
+
#
|
1016
|
+
# General `filter` string syntax:
|
1017
|
+
# `<field> <operator> <value> (<logical connector>)`
|
978
1018
|
#
|
979
|
-
#
|
980
|
-
#
|
981
|
-
#
|
982
|
-
#
|
983
|
-
#
|
984
|
-
#
|
985
|
-
# <logical connector> can be "AND, OR, NOT".
|
1019
|
+
# * `<field>` can be `name`, `address`, `port`, or `annotations.<key>` for
|
1020
|
+
# map field
|
1021
|
+
# * `<operator>` can be `<`, `>`, `<=`, `>=`, `!=`, `=`, `:`. Of which `:`
|
1022
|
+
# means `HAS`, and is roughly the same as `=`
|
1023
|
+
# * `<value>` must be the same data type as field
|
1024
|
+
# * `<logical connector>` can be `AND`, `OR`, `NOT`
|
986
1025
|
#
|
987
1026
|
# Examples of valid filters:
|
988
|
-
#
|
989
|
-
#
|
990
|
-
#
|
991
|
-
#
|
992
|
-
#
|
993
|
-
# *
|
994
|
-
# *
|
995
|
-
#
|
996
|
-
#
|
997
|
-
#
|
998
|
-
#
|
999
|
-
# *
|
1000
|
-
#
|
1001
|
-
#
|
1027
|
+
#
|
1028
|
+
# * `annotations.owner` returns endpoints that have a annotation with the
|
1029
|
+
# key `owner`, this is the same as `annotations:owner`
|
1030
|
+
# * `annotations.protocol=gRPC` returns endpoints that have key/value
|
1031
|
+
# `protocol=gRPC`
|
1032
|
+
# * `address=192.108.1.105` returns endpoints that have this address
|
1033
|
+
# * `port>8080` returns endpoints that have port number larger than 8080
|
1034
|
+
# *
|
1035
|
+
# `name>projects/my-project/locations/us-east1/namespaces/my-namespace/services/my-service/endpoints/endpoint-c`
|
1036
|
+
# returns endpoints that have name that is alphabetically later than the
|
1037
|
+
# string, so "endpoint-e" is returned but "endpoint-a" is not
|
1038
|
+
# * `annotations.owner!=sd AND annotations.foo=bar` returns endpoints that
|
1039
|
+
# have `owner` in annotation key but value is not `sd` AND have
|
1040
|
+
# key/value `foo=bar`
|
1041
|
+
# * `doesnotexist.foo=bar` returns an empty list. Note that endpoint
|
1042
|
+
# doesn't have a field called "doesnotexist". Since the filter does not
|
1043
|
+
# match any endpoints, it returns no results
|
1044
|
+
#
|
1045
|
+
# For more information about filtering, see
|
1046
|
+
# [API Filtering](https://aip.dev/160).
|
1002
1047
|
# @param order_by [::String]
|
1003
|
-
# Optional. The order to list
|
1048
|
+
# Optional. The order to list results by.
|
1049
|
+
#
|
1050
|
+
# General `order_by` string syntax: `<field> (<asc|desc>) (,)`
|
1051
|
+
#
|
1052
|
+
# * `<field>` allows values: `name`, `address`, `port`
|
1053
|
+
# * `<asc|desc>` ascending or descending order by `<field>`. If this is
|
1054
|
+
# left blank, `asc` is used
|
1055
|
+
#
|
1056
|
+
# Note that an empty `order_by` string results in default order, which is
|
1057
|
+
# order by `name` in ascending order.
|
1004
1058
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
1005
1059
|
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ServiceDirectory::V1::Endpoint>]
|
1006
1060
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -1045,7 +1099,7 @@ module Google
|
|
1045
1099
|
end
|
1046
1100
|
|
1047
1101
|
##
|
1048
|
-
# Gets
|
1102
|
+
# Gets an endpoint.
|
1049
1103
|
#
|
1050
1104
|
# @overload get_endpoint(request, options = nil)
|
1051
1105
|
# Pass arguments to `get_endpoint` via a request object, either of type
|
@@ -1107,7 +1161,7 @@ module Google
|
|
1107
1161
|
end
|
1108
1162
|
|
1109
1163
|
##
|
1110
|
-
# Updates
|
1164
|
+
# Updates an endpoint.
|
1111
1165
|
#
|
1112
1166
|
# @overload update_endpoint(request, options = nil)
|
1113
1167
|
# Pass arguments to `update_endpoint` via a request object, either of type
|
@@ -1171,7 +1225,7 @@ module Google
|
|
1171
1225
|
end
|
1172
1226
|
|
1173
1227
|
##
|
1174
|
-
# Deletes
|
1228
|
+
# Deletes an endpoint.
|
1175
1229
|
#
|
1176
1230
|
# @overload delete_endpoint(request, options = nil)
|
1177
1231
|
# Pass arguments to `delete_endpoint` via a request object, either of type
|
@@ -1528,6 +1582,13 @@ module Google
|
|
1528
1582
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
1529
1583
|
config_attr :quota_project, nil, ::String, nil
|
1530
1584
|
|
1585
|
+
# @private
|
1586
|
+
# Overrides for http bindings for the RPCs of this service
|
1587
|
+
# are only used when this service is used as mixin, and only
|
1588
|
+
# by the host service.
|
1589
|
+
# @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
|
1590
|
+
config_attr :bindings_override, {}, ::Hash, nil
|
1591
|
+
|
1531
1592
|
# @private
|
1532
1593
|
def initialize parent_config = nil
|
1533
1594
|
@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/registration_service/credentials"
|
26
27
|
require "google/cloud/service_directory/v1/registration_service/paths"
|
@@ -18,6 +18,7 @@
|
|
18
18
|
|
19
19
|
require "google/cloud/service_directory/v1/lookup_service/rest"
|
20
20
|
require "google/cloud/service_directory/v1/registration_service/rest"
|
21
|
+
require "google/cloud/service_directory/v1/bindings_override"
|
21
22
|
require "google/cloud/service_directory/v1/version"
|
22
23
|
|
23
24
|
module Google
|
@@ -8,7 +8,7 @@ require 'google/api/field_behavior_pb'
|
|
8
8
|
require 'google/api/resource_pb'
|
9
9
|
|
10
10
|
|
11
|
-
descriptor_data = "\n/google/cloud/servicedirectory/v1/endpoint.proto\x12 google.cloud.servicedirectory.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\
|
11
|
+
descriptor_data = "\n/google/cloud/servicedirectory/v1/endpoint.proto\x12 google.cloud.servicedirectory.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xbe\x03\n\x08\x45ndpoint\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12\x14\n\x07\x61\x64\x64ress\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04port\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12U\n\x0b\x61nnotations\x18\x05 \x03(\x0b\x32;.google.cloud.servicedirectory.v1.Endpoint.AnnotationsEntryB\x03\xe0\x41\x01\x12@\n\x07network\x18\x08 \x01(\tB/\xe0\x41\x05\xfa\x41)\n\'servicedirectory.googleapis.com/Network\x12\x10\n\x03uid\x18\t \x01(\tB\x03\xe0\x41\x03\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x96\x01\xea\x41\x92\x01\n(servicedirectory.googleapis.com/Endpoint\x12\x66projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}/endpoints/{endpoint}B\xdc\x02\n$com.google.cloud.servicedirectory.v1B\rEndpointProtoP\x01ZPcloud.google.com/go/servicedirectory/apiv1/servicedirectorypb;servicedirectorypb\xf8\x01\x01\xaa\x02 Google.Cloud.ServiceDirectory.V1\xca\x02 Google\\Cloud\\ServiceDirectory\\V1\xea\x02#Google::Cloud::ServiceDirectory::V1\xea\x41\x61\n\'servicedirectory.googleapis.com/Network\x12\x36projects/{project}/locations/global/networks/{network}b\x06proto3"
|
12
12
|
|
13
13
|
pool = Google::Protobuf::DescriptorPool.generated_pool
|
14
14
|
|
@@ -8,7 +8,7 @@ require 'google/api/field_behavior_pb'
|
|
8
8
|
require 'google/api/resource_pb'
|
9
9
|
|
10
10
|
|
11
|
-
descriptor_data = "\n0google/cloud/servicedirectory/v1/namespace.proto\x12 google.cloud.servicedirectory.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\
|
11
|
+
descriptor_data = "\n0google/cloud/servicedirectory/v1/namespace.proto\x12 google.cloud.servicedirectory.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x9d\x02\n\tNamespace\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12L\n\x06labels\x18\x02 \x03(\x0b\x32\x37.google.cloud.servicedirectory.v1.Namespace.LabelsEntryB\x03\xe0\x41\x01\x12\x10\n\x03uid\x18\x05 \x01(\tB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:n\xea\x41k\n)servicedirectory.googleapis.com/Namespace\x12>projects/{project}/locations/{location}/namespaces/{namespace}B\xf9\x01\n$com.google.cloud.servicedirectory.v1B\x0eNamespaceProtoP\x01ZPcloud.google.com/go/servicedirectory/apiv1/servicedirectorypb;servicedirectorypb\xf8\x01\x01\xaa\x02 Google.Cloud.ServiceDirectory.V1\xca\x02 Google\\Cloud\\ServiceDirectory\\V1\xea\x02#Google::Cloud::ServiceDirectory::V1b\x06proto3"
|
12
12
|
|
13
13
|
pool = Google::Protobuf::DescriptorPool.generated_pool
|
14
14
|
|
@@ -47,7 +47,7 @@ module Google
|
|
47
47
|
self.unmarshal_class_method = :decode
|
48
48
|
self.service_name = 'google.cloud.servicedirectory.v1.RegistrationService'
|
49
49
|
|
50
|
-
# Creates a namespace, and returns the new
|
50
|
+
# Creates a namespace, and returns the new namespace.
|
51
51
|
rpc :CreateNamespace, ::Google::Cloud::ServiceDirectory::V1::CreateNamespaceRequest, ::Google::Cloud::ServiceDirectory::V1::Namespace
|
52
52
|
# Lists all namespaces.
|
53
53
|
rpc :ListNamespaces, ::Google::Cloud::ServiceDirectory::V1::ListNamespacesRequest, ::Google::Cloud::ServiceDirectory::V1::ListNamespacesResponse
|
@@ -58,7 +58,7 @@ module Google
|
|
58
58
|
# Deletes a namespace. This also deletes all services and endpoints in
|
59
59
|
# the namespace.
|
60
60
|
rpc :DeleteNamespace, ::Google::Cloud::ServiceDirectory::V1::DeleteNamespaceRequest, ::Google::Protobuf::Empty
|
61
|
-
# Creates a service, and returns the new
|
61
|
+
# Creates a service, and returns the new service.
|
62
62
|
rpc :CreateService, ::Google::Cloud::ServiceDirectory::V1::CreateServiceRequest, ::Google::Cloud::ServiceDirectory::V1::Service
|
63
63
|
# Lists all services belonging to a namespace.
|
64
64
|
rpc :ListServices, ::Google::Cloud::ServiceDirectory::V1::ListServicesRequest, ::Google::Cloud::ServiceDirectory::V1::ListServicesResponse
|
@@ -69,15 +69,15 @@ module Google
|
|
69
69
|
# Deletes a service. This also deletes all endpoints associated with
|
70
70
|
# the service.
|
71
71
|
rpc :DeleteService, ::Google::Cloud::ServiceDirectory::V1::DeleteServiceRequest, ::Google::Protobuf::Empty
|
72
|
-
# Creates
|
72
|
+
# Creates an endpoint, and returns the new endpoint.
|
73
73
|
rpc :CreateEndpoint, ::Google::Cloud::ServiceDirectory::V1::CreateEndpointRequest, ::Google::Cloud::ServiceDirectory::V1::Endpoint
|
74
74
|
# Lists all endpoints.
|
75
75
|
rpc :ListEndpoints, ::Google::Cloud::ServiceDirectory::V1::ListEndpointsRequest, ::Google::Cloud::ServiceDirectory::V1::ListEndpointsResponse
|
76
|
-
# Gets
|
76
|
+
# Gets an endpoint.
|
77
77
|
rpc :GetEndpoint, ::Google::Cloud::ServiceDirectory::V1::GetEndpointRequest, ::Google::Cloud::ServiceDirectory::V1::Endpoint
|
78
|
-
# Updates
|
78
|
+
# Updates an endpoint.
|
79
79
|
rpc :UpdateEndpoint, ::Google::Cloud::ServiceDirectory::V1::UpdateEndpointRequest, ::Google::Cloud::ServiceDirectory::V1::Endpoint
|
80
|
-
# Deletes
|
80
|
+
# Deletes an endpoint.
|
81
81
|
rpc :DeleteEndpoint, ::Google::Cloud::ServiceDirectory::V1::DeleteEndpointRequest, ::Google::Protobuf::Empty
|
82
82
|
# Gets the IAM Policy for a resource (namespace or service only).
|
83
83
|
rpc :GetIamPolicy, ::Google::Iam::V1::GetIamPolicyRequest, ::Google::Iam::V1::Policy
|
@@ -9,7 +9,7 @@ require 'google/api/resource_pb'
|
|
9
9
|
require 'google/cloud/servicedirectory/v1/endpoint_pb'
|
10
10
|
|
11
11
|
|
12
|
-
descriptor_data = "\n.google/cloud/servicedirectory/v1/service.proto\x12 google.cloud.servicedirectory.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a/google/cloud/servicedirectory/v1/endpoint.proto\"\
|
12
|
+
descriptor_data = "\n.google/cloud/servicedirectory/v1/service.proto\x12 google.cloud.servicedirectory.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a/google/cloud/servicedirectory/v1/endpoint.proto\"\xfd\x02\n\x07Service\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12T\n\x0b\x61nnotations\x18\x04 \x03(\x0b\x32:.google.cloud.servicedirectory.v1.Service.AnnotationsEntryB\x03\xe0\x41\x01\x12\x42\n\tendpoints\x18\x03 \x03(\x0b\x32*.google.cloud.servicedirectory.v1.EndpointB\x03\xe0\x41\x03\x12\x10\n\x03uid\x18\x07 \x01(\tB\x03\xe0\x41\x03\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x7f\xea\x41|\n\'servicedirectory.googleapis.com/Service\x12Qprojects/{project}/locations/{location}/namespaces/{namespace}/services/{service}B\xf7\x01\n$com.google.cloud.servicedirectory.v1B\x0cServiceProtoP\x01ZPcloud.google.com/go/servicedirectory/apiv1/servicedirectorypb;servicedirectorypb\xf8\x01\x01\xaa\x02 Google.Cloud.ServiceDirectory.V1\xca\x02 Google\\Cloud\\ServiceDirectory\\V1\xea\x02#Google::Cloud::ServiceDirectory::V1b\x06proto3"
|
13
13
|
|
14
14
|
pool = Google::Protobuf::DescriptorPool.generated_pool
|
15
15
|
|
@@ -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
|