google-cloud-service_directory-v1beta1 0.6.1 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 289a35f625ed3a5939f0351d28cd1e64fe90018261e8cd7a1bb7f12a6fd6934e
4
- data.tar.gz: bd2b1d891bac45ee8c379bd951d0e88bebc1164c844456097891aeeb1c7b3b00
3
+ metadata.gz: 9dbd5753cd1f9cdaa0ef5ea57d5c720ebc2731900c3224c9a4296bfb50a942b0
4
+ data.tar.gz: 42125fbf91f807801f8171b3424538221d4a713b5233ac8c75e49e946506d2ae
5
5
  SHA512:
6
- metadata.gz: b102661112782775c3078e48dc4a2ea34e91886107afb9e2d02d94a7415cf31ec6e64d09f472e539b176522cf3341faffb932dc827c7092a0c705eb0dad9312e
7
- data.tar.gz: d58904adaaa3fe5f8cdc658e20f2ff56914169fe565802d14e6f4bf90df9ea7b987ccbe483d96d4f986944a4cb59e83deade76b5465934821698e341873b07dc
6
+ metadata.gz: 878b03786e5fb06d9dd4a1e829759a5f24496f80c1a76cc020ef42455f6b7286a5258c200682b1d6aa4f1a760affeff10527322b169d0e56ef4f89a50f60887c
7
+ data.tar.gz: '03561611104928b7ff027601d15b442359344c18ed55985d4e8de01dbf974a4403a4fddbc8778334d982a127a0ba16a258421a6cb55520c5ae9bb3eaf182cacb'
@@ -187,22 +187,37 @@ module Google
187
187
  # @param endpoint_filter [::String]
188
188
  # Optional. The filter applied to the endpoints of the resolved service.
189
189
  #
190
- # General filter string syntax:
191
- # <field> <operator> <value> (<logical connector>)
192
- # <field> can be "name" or "metadata.<key>" for map field.
193
- # <operator> can be "<, >, <=, >=, !=, =, :". Of which ":" means HAS and is
194
- # roughly the same as "=".
195
- # <value> must be the same data type as the field.
196
- # <logical connector> can be "AND, OR, NOT".
190
+ # General `filter` string syntax:
191
+ # `<field> <operator> <value> (<logical connector>)`
192
+ #
193
+ # * `<field>` can be `name`, `address`, `port`, or `metadata.<key>` for
194
+ # map field
195
+ # * `<operator>` can be `<`, `>`, `<=`, `>=`, `!=`, `=`, `:`. Of which `:`
196
+ # means `HAS`, and is roughly the same as `=`
197
+ # * `<value>` must be the same data type as field
198
+ # * `<logical connector>` can be `AND`, `OR`, `NOT`
197
199
  #
198
200
  # Examples of valid filters:
199
- # * "metadata.owner" returns Endpoints that have a label with the
200
- # key "owner", this is the same as "metadata:owner"
201
- # * "metadata.protocol=gRPC" returns Endpoints that have key/value
202
- # "protocol=gRPC"
203
- # * "metadata.owner!=sd AND metadata.foo=bar" returns
204
- # Endpoints that have "owner" field in metadata with a value that is not
205
- # "sd" AND have the key/value foo=bar.
201
+ #
202
+ # * `metadata.owner` returns endpoints that have a annotation with the key
203
+ # `owner`, this is the same as `metadata:owner`
204
+ # * `metadata.protocol=gRPC` returns endpoints that have key/value
205
+ # `protocol=gRPC`
206
+ # * `address=192.108.1.105` returns endpoints that have this address
207
+ # * `port>8080` returns endpoints that have port number larger than 8080
208
+ # *
209
+ # `name>projects/my-project/locations/us-east1/namespaces/my-namespace/services/my-service/endpoints/endpoint-c`
210
+ # returns endpoints that have name that is alphabetically later than the
211
+ # string, so "endpoint-e" is returned but "endpoint-a" is not
212
+ # * `metadata.owner!=sd AND metadata.foo=bar` returns endpoints that have
213
+ # `owner` in annotation key but value is not `sd` AND have key/value
214
+ # `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).
206
221
  #
207
222
  # @yield [response, operation] Access the result along with the RPC operation
208
223
  # @yieldparam response [::Google::Cloud::ServiceDirectory::V1beta1::ResolveServiceResponse]
@@ -173,7 +173,7 @@ module Google
173
173
  # Service calls
174
174
 
175
175
  ##
176
- # Creates a namespace, and returns the new Namespace.
176
+ # Creates a namespace, and returns the new namespace.
177
177
  #
178
178
  # @overload create_namespace(request, options = nil)
179
179
  # Pass arguments to `create_namespace` via a request object, either of type
@@ -268,46 +268,51 @@ module Google
268
268
  # the default parameter values, pass an empty Hash as a request object (see above).
269
269
  #
270
270
  # @param parent [::String]
271
- # Required. The resource name of the project and location whose namespaces we'd like to
272
- # list.
271
+ # Required. The resource name of the project and location whose namespaces you'd like
272
+ # to list.
273
273
  # @param page_size [::Integer]
274
274
  # Optional. The maximum number of items to return.
275
275
  # @param page_token [::String]
276
276
  # Optional. The next_page_token value returned from a previous List request, if any.
277
277
  # @param filter [::String]
278
- # Optional. The filter to list result by.
278
+ # Optional. The filter to list results by.
279
+ #
280
+ # General `filter` string syntax:
281
+ # `<field> <operator> <value> (<logical connector>)`
279
282
  #
280
- # General filter string syntax:
281
- # <field> <operator> <value> (<logical connector>)
282
- # <field> can be "name", or "labels.<key>" for map field.
283
- # <operator> can be "<, >, <=, >=, !=, =, :". Of which ":" means HAS, and
284
- # is roughly the same as "=".
285
- # <value> must be the same data type as field.
286
- # <logical connector> can be "AND, OR, NOT".
283
+ # * `<field>` can be `name` or `labels.<key>` for map field
284
+ # * `<operator>` can be `<`, `>`, `<=`, `>=`, `!=`, `=`, `:`. Of which `:`
285
+ # means `HAS`, and is roughly the same as `=`
286
+ # * `<value>` must be the same data type as field
287
+ # * `<logical connector>` can be `AND`, `OR`, `NOT`
287
288
  #
288
289
  # Examples of valid filters:
289
- # * "labels.owner" returns Namespaces that have a label with the key "owner"
290
- # this is the same as "labels:owner".
291
- # * "labels.protocol=gRPC" returns Namespaces that have key/value
292
- # "protocol=gRPC".
293
- # * "name>projects/my-project/locations/us-east/namespaces/namespace-c"
294
- # returns Namespaces that have name that is alphabetically later than the
295
- # string, so "namespace-e" will be returned but "namespace-a" will not be.
296
- # * "labels.owner!=sd AND labels.foo=bar" returns Namespaces that have
297
- # "owner" in label key but value is not "sd" AND have key/value foo=bar.
298
- # * "doesnotexist.foo=bar" returns an empty list. Note that Namespace doesn't
299
- # have a field called "doesnotexist". Since the filter does not match any
300
- # Namespaces, it returns no results.
290
+ #
291
+ # * `labels.owner` returns namespaces that have a label with the key
292
+ # `owner`, this is the same as `labels:owner`
293
+ # * `labels.owner=sd` returns namespaces that have key/value `owner=sd`
294
+ # * `name>projects/my-project/locations/us-east1/namespaces/namespace-c`
295
+ # returns namespaces that have name that is alphabetically later than the
296
+ # string, so "namespace-e" is returned but "namespace-a" is not
297
+ # * `labels.owner!=sd AND labels.foo=bar` returns namespaces that have
298
+ # `owner` in label key but value is not `sd` AND have key/value `foo=bar`
299
+ # * `doesnotexist.foo=bar` returns an empty list. Note that namespace
300
+ # doesn't have a field called "doesnotexist". Since the filter does not
301
+ # match any namespaces, it returns no results
302
+ #
303
+ # For more information about filtering, see
304
+ # [API Filtering](https://aip.dev/160).
301
305
  # @param order_by [::String]
302
- # Optional. The order to list result by.
306
+ # Optional. The order to list results by.
307
+ #
308
+ # General `order_by` string syntax: `<field> (<asc|desc>) (,)`
303
309
  #
304
- # General order by string syntax:
305
- # <field> (<asc|desc>) (,)
306
- # <field> allows values \\{"name"}
307
- # <asc/desc> ascending or descending order by <field>. If this is left
308
- # blank, "asc" is used.
309
- # Note that an empty order_by string result in default order, which is order
310
- # by name in ascending order.
310
+ # * `<field>` allows value: `name`
311
+ # * `<asc|desc>` ascending or descending order by `<field>`. If this is
312
+ # left blank, `asc` is used
313
+ #
314
+ # Note that an empty `order_by` string results in default order, which is
315
+ # order by `name` in ascending order.
311
316
  #
312
317
  # @yield [response, operation] Access the result along with the RPC operation
313
318
  # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ServiceDirectory::V1beta1::Namespace>]
@@ -557,7 +562,7 @@ module Google
557
562
  end
558
563
 
559
564
  ##
560
- # Creates a service, and returns the new Service.
565
+ # Creates a service, and returns the new service.
561
566
  #
562
567
  # @overload create_service(request, options = nil)
563
568
  # Pass arguments to `create_service` via a request object, either of type
@@ -651,7 +656,7 @@ module Google
651
656
  # the default parameter values, pass an empty Hash as a request object (see above).
652
657
  #
653
658
  # @param parent [::String]
654
- # Required. The resource name of the namespace whose services we'd
659
+ # Required. The resource name of the namespace whose services you'd
655
660
  # like to list.
656
661
  # @param page_size [::Integer]
657
662
  # Optional. The maximum number of items to return.
@@ -659,31 +664,47 @@ module Google
659
664
  # Optional. The next_page_token value returned from a previous List request,
660
665
  # if any.
661
666
  # @param filter [::String]
662
- # Optional. The filter to list result by.
667
+ # Optional. The filter to list results by.
668
+ #
669
+ # General `filter` string syntax:
670
+ # `<field> <operator> <value> (<logical connector>)`
663
671
  #
664
- # General filter string syntax:
665
- # <field> <operator> <value> (<logical connector>)
666
- # <field> can be "name", or "metadata.<key>" for map field.
667
- # <operator> can be "<, >, <=, >=, !=, =, :". Of which ":" means HAS, and
668
- # is roughly the same as "=".
669
- # <value> must be the same data type as field.
670
- # <logical connector> can be "AND, OR, NOT".
672
+ # * `<field>` can be `name` or `metadata.<key>` for map field
673
+ # * `<operator>` can be `<`, `>`, `<=`, `>=`, `!=`, `=`, `:`. Of which `:`
674
+ # means `HAS`, and is roughly the same as `=`
675
+ # * `<value>` must be the same data type as field
676
+ # * `<logical connector>` can be `AND`, `OR`, `NOT`
671
677
  #
672
678
  # Examples of valid filters:
673
- # * "metadata.owner" returns Services that have a label with the key "owner"
674
- # this is the same as "metadata:owner".
675
- # * "metadata.protocol=gRPC" returns Services that have key/value
676
- # "protocol=gRPC".
677
- # * "name>projects/my-project/locations/us-east/namespaces/my-namespace/services/service-c"
678
- # returns Services that have name that is alphabetically later than the
679
- # string, so "service-e" will be returned but "service-a" will not be.
680
- # * "metadata.owner!=sd AND metadata.foo=bar" returns Services that have
681
- # "owner" in label key but value is not "sd" AND have key/value foo=bar.
682
- # * "doesnotexist.foo=bar" returns an empty list. Note that Service doesn't
683
- # have a field called "doesnotexist". Since the filter does not match any
684
- # Services, it returns no results.
679
+ #
680
+ # * `metadata.owner` returns services that have a metadata with the key
681
+ # `owner`, this is the same as `metadata:owner`
682
+ # * `metadata.protocol=gRPC` returns services that have key/value
683
+ # `protocol=gRPC`
684
+ # *
685
+ # `name>projects/my-project/locations/us-east1/namespaces/my-namespace/services/service-c`
686
+ # returns services that have name that is alphabetically later than the
687
+ # string, so "service-e" is returned but "service-a" is not
688
+ # * `metadata.owner!=sd AND metadata.foo=bar` returns services that have
689
+ # `owner` in metadata key but value is not `sd` AND have key/value
690
+ # `foo=bar`
691
+ # * `doesnotexist.foo=bar` returns an empty list. Note that service
692
+ # doesn't have a field called "doesnotexist". Since the filter does not
693
+ # match any services, it returns no results
694
+ #
695
+ # For more information about filtering, see
696
+ # [API Filtering](https://aip.dev/160).
685
697
  # @param order_by [::String]
686
- # Optional. The order to list result by.
698
+ # Optional. The order to list results by.
699
+ #
700
+ # General `order_by` string syntax: `<field> (<asc|desc>) (,)`
701
+ #
702
+ # * `<field>` allows value: `name`
703
+ # * `<asc|desc>` ascending or descending order by `<field>`. If this is
704
+ # left blank, `asc` is used
705
+ #
706
+ # Note that an empty `order_by` string results in default order, which is
707
+ # order by `name` in ascending order.
687
708
  #
688
709
  # @yield [response, operation] Access the result along with the RPC operation
689
710
  # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ServiceDirectory::V1beta1::Service>]
@@ -933,7 +954,7 @@ module Google
933
954
  end
934
955
 
935
956
  ##
936
- # Creates a endpoint, and returns the new Endpoint.
957
+ # Creates an endpoint, and returns the new endpoint.
937
958
  #
938
959
  # @overload create_endpoint(request, options = nil)
939
960
  # Pass arguments to `create_endpoint` via a request object, either of type
@@ -1027,7 +1048,7 @@ module Google
1027
1048
  # the default parameter values, pass an empty Hash as a request object (see above).
1028
1049
  #
1029
1050
  # @param parent [::String]
1030
- # Required. The resource name of the service whose endpoints we'd like to
1051
+ # Required. The resource name of the service whose endpoints you'd like to
1031
1052
  # list.
1032
1053
  # @param page_size [::Integer]
1033
1054
  # Optional. The maximum number of items to return.
@@ -1035,33 +1056,50 @@ module Google
1035
1056
  # Optional. The next_page_token value returned from a previous List request,
1036
1057
  # if any.
1037
1058
  # @param filter [::String]
1038
- # Optional. The filter to list result by.
1059
+ # Optional. The filter to list results by.
1039
1060
  #
1040
- # General filter string syntax:
1041
- # <field> <operator> <value> (<logical connector>)
1042
- # <field> can be "name", "address", "port" or "metadata.<key>" for map field.
1043
- # <operator> can be "<, >, <=, >=, !=, =, :". Of which ":" means HAS, and
1044
- # is roughly the same as "=".
1045
- # <value> must be the same data type as field.
1046
- # <logical connector> can be "AND, OR, NOT".
1061
+ # General `filter` string syntax:
1062
+ # `<field> <operator> <value> (<logical connector>)`
1063
+ #
1064
+ # * `<field>` can be `name`, `address`, `port`, or `metadata.<key>` for map
1065
+ # field
1066
+ # * `<operator>` can be `<`, `>`, `<=`, `>=`, `!=`, `=`, `:`. Of which `:`
1067
+ # means `HAS`, and is roughly the same as `=`
1068
+ # * `<value>` must be the same data type as field
1069
+ # * `<logical connector>` can be `AND`, `OR`, `NOT`
1047
1070
  #
1048
1071
  # Examples of valid filters:
1049
- # * "metadata.owner" returns Endpoints that have a label with the key "owner"
1050
- # this is the same as "metadata:owner".
1051
- # * "metadata.protocol=gRPC" returns Endpoints that have key/value
1052
- # "protocol=gRPC".
1053
- # * "address=192.108.1.105" returns Endpoints that have this address.
1054
- # * "port>8080" returns Endpoints that have port number larger than 8080.
1055
- # * "name>projects/my-project/locations/us-east/namespaces/my-namespace/services/my-service/endpoints/endpoint-c"
1056
- # returns Endpoints that have name that is alphabetically later than the
1057
- # string, so "endpoint-e" will be returned but "endpoint-a" will not be.
1058
- # * "metadata.owner!=sd AND metadata.foo=bar" returns Endpoints that have
1059
- # "owner" in label key but value is not "sd" AND have key/value foo=bar.
1060
- # * "doesnotexist.foo=bar" returns an empty list. Note that Endpoint doesn't
1061
- # have a field called "doesnotexist". Since the filter does not match any
1062
- # Endpoints, it returns no results.
1072
+ #
1073
+ # * `metadata.owner` returns endpoints that have a metadata with the key
1074
+ # `owner`, this is the same as `metadata:owner`
1075
+ # * `metadata.protocol=gRPC` returns endpoints that have key/value
1076
+ # `protocol=gRPC`
1077
+ # * `address=192.108.1.105` returns endpoints that have this address
1078
+ # * `port>8080` returns endpoints that have port number larger than 8080
1079
+ # *
1080
+ # `name>projects/my-project/locations/us-east1/namespaces/my-namespace/services/my-service/endpoints/endpoint-c`
1081
+ # returns endpoints that have name that is alphabetically later than the
1082
+ # string, so "endpoint-e" is returned but "endpoint-a" is not
1083
+ # * `metadata.owner!=sd AND metadata.foo=bar` returns endpoints that have
1084
+ # `owner` in metadata key but value is not `sd` AND have key/value
1085
+ # `foo=bar`
1086
+ # * `doesnotexist.foo=bar` returns an empty list. Note that endpoint
1087
+ # doesn't have a field called "doesnotexist". Since the filter does not
1088
+ # match any endpoints, it returns no results
1089
+ #
1090
+ # For more information about filtering, see
1091
+ # [API Filtering](https://aip.dev/160).
1063
1092
  # @param order_by [::String]
1064
- # Optional. The order to list result by.
1093
+ # Optional. The order to list results by.
1094
+ #
1095
+ # General `order_by` string syntax: `<field> (<asc|desc>) (,)`
1096
+ #
1097
+ # * `<field>` allows values: `name`, `address`, `port`
1098
+ # * `<asc|desc>` ascending or descending order by `<field>`. If this is
1099
+ # left blank, `asc` is used
1100
+ #
1101
+ # Note that an empty `order_by` string results in default order, which is
1102
+ # order by `name` in ascending order.
1065
1103
  #
1066
1104
  # @yield [response, operation] Access the result along with the RPC operation
1067
1105
  # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ServiceDirectory::V1beta1::Endpoint>]
@@ -1110,7 +1148,7 @@ module Google
1110
1148
  end
1111
1149
 
1112
1150
  ##
1113
- # Gets a endpoint.
1151
+ # Gets an endpoint.
1114
1152
  #
1115
1153
  # @overload get_endpoint(request, options = nil)
1116
1154
  # Pass arguments to `get_endpoint` via a request object, either of type
@@ -1176,7 +1214,7 @@ module Google
1176
1214
  end
1177
1215
 
1178
1216
  ##
1179
- # Updates a endpoint.
1217
+ # Updates an endpoint.
1180
1218
  #
1181
1219
  # @overload update_endpoint(request, options = nil)
1182
1220
  # Pass arguments to `update_endpoint` via a request object, either of type
@@ -1244,7 +1282,7 @@ module Google
1244
1282
  end
1245
1283
 
1246
1284
  ##
1247
- # Deletes a endpoint.
1285
+ # Deletes an endpoint.
1248
1286
  #
1249
1287
  # @overload delete_endpoint(request, options = nil)
1250
1288
  # Pass arguments to `delete_endpoint` via a request object, either of type
@@ -83,6 +83,23 @@ module Google
83
83
  "projects/#{project}/locations/#{location}/namespaces/#{namespace}"
84
84
  end
85
85
 
86
+ ##
87
+ # Create a fully-qualified Network resource string.
88
+ #
89
+ # The resource will be in the following format:
90
+ #
91
+ # `projects/{project}/locations/global/networks/{network}`
92
+ #
93
+ # @param project [String]
94
+ # @param network [String]
95
+ #
96
+ # @return [::String]
97
+ def network_path project:, network:
98
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
99
+
100
+ "projects/#{project}/locations/global/networks/#{network}"
101
+ end
102
+
86
103
  ##
87
104
  # Create a fully-qualified Service resource string.
88
105
  #
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module ServiceDirectory
23
23
  module V1beta1
24
- VERSION = "0.6.1"
24
+ VERSION = "0.7.0"
25
25
  end
26
26
  end
27
27
  end
@@ -5,6 +5,7 @@ require 'google/protobuf'
5
5
 
6
6
  require 'google/api/field_behavior_pb'
7
7
  require 'google/api/resource_pb'
8
+ require 'google/protobuf/timestamp_pb'
8
9
  require 'google/api/annotations_pb'
9
10
  Google::Protobuf::DescriptorPool.generated_pool.build do
10
11
  add_file("google/cloud/servicedirectory/v1beta1/endpoint.proto", :syntax => :proto3) do
@@ -13,6 +14,9 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
13
14
  optional :address, :string, 2
14
15
  optional :port, :int32, 3
15
16
  map :metadata, :string, :string, 4
17
+ optional :network, :string, 5
18
+ optional :create_time, :message, 6, "google.protobuf.Timestamp"
19
+ optional :update_time, :message, 7, "google.protobuf.Timestamp"
16
20
  end
17
21
  end
18
22
  end
@@ -5,12 +5,15 @@ require 'google/protobuf'
5
5
 
6
6
  require 'google/api/field_behavior_pb'
7
7
  require 'google/api/resource_pb'
8
+ require 'google/protobuf/timestamp_pb'
8
9
  require 'google/api/annotations_pb'
9
10
  Google::Protobuf::DescriptorPool.generated_pool.build do
10
11
  add_file("google/cloud/servicedirectory/v1beta1/namespace.proto", :syntax => :proto3) do
11
12
  add_message "google.cloud.servicedirectory.v1beta1.Namespace" do
12
13
  optional :name, :string, 1
13
14
  map :labels, :string, :string, 2
15
+ optional :create_time, :message, 4, "google.protobuf.Timestamp"
16
+ optional :update_time, :message, 5, "google.protobuf.Timestamp"
14
17
  end
15
18
  end
16
19
  end
@@ -47,7 +47,7 @@ module Google
47
47
  self.unmarshal_class_method = :decode
48
48
  self.service_name = 'google.cloud.servicedirectory.v1beta1.RegistrationService'
49
49
 
50
- # Creates a namespace, and returns the new Namespace.
50
+ # Creates a namespace, and returns the new namespace.
51
51
  rpc :CreateNamespace, ::Google::Cloud::ServiceDirectory::V1beta1::CreateNamespaceRequest, ::Google::Cloud::ServiceDirectory::V1beta1::Namespace
52
52
  # Lists all namespaces.
53
53
  rpc :ListNamespaces, ::Google::Cloud::ServiceDirectory::V1beta1::ListNamespacesRequest, ::Google::Cloud::ServiceDirectory::V1beta1::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::V1beta1::DeleteNamespaceRequest, ::Google::Protobuf::Empty
61
- # Creates a service, and returns the new Service.
61
+ # Creates a service, and returns the new service.
62
62
  rpc :CreateService, ::Google::Cloud::ServiceDirectory::V1beta1::CreateServiceRequest, ::Google::Cloud::ServiceDirectory::V1beta1::Service
63
63
  # Lists all services belonging to a namespace.
64
64
  rpc :ListServices, ::Google::Cloud::ServiceDirectory::V1beta1::ListServicesRequest, ::Google::Cloud::ServiceDirectory::V1beta1::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::V1beta1::DeleteServiceRequest, ::Google::Protobuf::Empty
72
- # Creates a endpoint, and returns the new Endpoint.
72
+ # Creates an endpoint, and returns the new endpoint.
73
73
  rpc :CreateEndpoint, ::Google::Cloud::ServiceDirectory::V1beta1::CreateEndpointRequest, ::Google::Cloud::ServiceDirectory::V1beta1::Endpoint
74
74
  # Lists all endpoints.
75
75
  rpc :ListEndpoints, ::Google::Cloud::ServiceDirectory::V1beta1::ListEndpointsRequest, ::Google::Cloud::ServiceDirectory::V1beta1::ListEndpointsResponse
76
- # Gets a endpoint.
76
+ # Gets an endpoint.
77
77
  rpc :GetEndpoint, ::Google::Cloud::ServiceDirectory::V1beta1::GetEndpointRequest, ::Google::Cloud::ServiceDirectory::V1beta1::Endpoint
78
- # Updates a endpoint.
78
+ # Updates an endpoint.
79
79
  rpc :UpdateEndpoint, ::Google::Cloud::ServiceDirectory::V1beta1::UpdateEndpointRequest, ::Google::Cloud::ServiceDirectory::V1beta1::Endpoint
80
- # Deletes a endpoint.
80
+ # Deletes an endpoint.
81
81
  rpc :DeleteEndpoint, ::Google::Cloud::ServiceDirectory::V1beta1::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
@@ -6,6 +6,7 @@ require 'google/protobuf'
6
6
  require 'google/api/field_behavior_pb'
7
7
  require 'google/api/resource_pb'
8
8
  require 'google/cloud/servicedirectory/v1beta1/endpoint_pb'
9
+ require 'google/protobuf/timestamp_pb'
9
10
  require 'google/api/annotations_pb'
10
11
  Google::Protobuf::DescriptorPool.generated_pool.build do
11
12
  add_file("google/cloud/servicedirectory/v1beta1/service.proto", :syntax => :proto3) do
@@ -13,6 +14,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
13
14
  optional :name, :string, 1
14
15
  map :metadata, :string, :string, 2
15
16
  repeated :endpoints, :message, 3, "google.cloud.servicedirectory.v1beta1.Endpoint"
17
+ optional :create_time, :message, 6, "google.protobuf.Timestamp"
18
+ optional :update_time, :message, 7, "google.protobuf.Timestamp"
16
19
  end
17
20
  end
18
21
  end
@@ -27,26 +27,62 @@ module Google
27
27
  # @!attribute [rw] name
28
28
  # @return [::String]
29
29
  # Immutable. The resource name for the endpoint in the format
30
- # 'projects/*/locations/*/namespaces/*/services/*/endpoints/*'.
30
+ # `projects/*/locations/*/namespaces/*/services/*/endpoints/*`.
31
31
  # @!attribute [rw] address
32
32
  # @return [::String]
33
- # Optional. An IPv4 or IPv6 address. Service Directory will reject bad
34
- # addresses like:
35
- # "8.8.8"
36
- # "8.8.8.8:53"
37
- # "test:bad:address"
38
- # "[::1]"
39
- # "[::1]:8080"
33
+ # Optional. An IPv4 or IPv6 address. Service Directory rejects bad addresses like:
34
+ #
35
+ # * `8.8.8`
36
+ # * `8.8.8.8:53`
37
+ # * `test:bad:address`
38
+ # * `[::1]`
39
+ # * `[::1]:8080`
40
+ #
40
41
  # Limited to 45 characters.
41
42
  # @!attribute [rw] port
42
43
  # @return [::Integer]
43
- # Optional. Service Directory will reject values outside of [0, 65535].
44
+ # Optional. Service Directory rejects values outside of `[0, 65535]`.
44
45
  # @!attribute [rw] metadata
45
46
  # @return [::Google::Protobuf::Map{::String => ::String}]
46
47
  # Optional. Metadata for the endpoint. This data can be consumed by service
47
- # clients. The entire metadata dictionary may contain up to 512 characters,
48
- # spread accoss all key-value pairs. Metadata that goes beyond any these
49
- # limits will be rejected.
48
+ # clients.
49
+ #
50
+ # Restrictions:
51
+ #
52
+ # * The entire metadata dictionary may contain up to 512 characters,
53
+ # spread accoss all key-value pairs. Metadata that goes beyond this
54
+ # limit are rejected
55
+ # * Valid metadata keys have two segments: an optional prefix and name,
56
+ # separated by a slash (/). The name segment is required and must be 63
57
+ # characters or less, beginning and ending with an alphanumeric character
58
+ # ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and
59
+ # alphanumerics between. The prefix is optional. If specified, the prefix
60
+ # must be a DNS subdomain: a series of DNS labels separated by dots (.),
61
+ # not longer than 253 characters in total, followed by a slash (/).
62
+ # Metadata that fails to meet these requirements are rejected
63
+ # * The `(*.)google.com/` and `(*.)googleapis.com/` prefixes are reserved
64
+ # for system metadata managed by Service Directory. If the user tries
65
+ # to write to these keyspaces, those entries are silently ignored by
66
+ # the system
67
+ #
68
+ # Note: This field is equivalent to the `annotations` field in the v1 API.
69
+ # They have the same syntax and read/write to the same location in Service
70
+ # Directory.
71
+ # @!attribute [rw] network
72
+ # @return [::String]
73
+ # Immutable. The Google Compute Engine network (VPC) of the endpoint in the format
74
+ # `projects/<project number>/locations/global/networks/*`.
75
+ #
76
+ # The project must be specified by project number (project id is rejected).
77
+ # Incorrectly formatted networks are rejected, but no other validation
78
+ # is performed on this field (ex. network or project existence, reachability,
79
+ # or permissions).
80
+ # @!attribute [r] create_time
81
+ # @return [::Google::Protobuf::Timestamp]
82
+ # Output only. The timestamp when the endpoint was created.
83
+ # @!attribute [r] update_time
84
+ # @return [::Google::Protobuf::Timestamp]
85
+ # Output only. The timestamp when the endpoint was last updated.
50
86
  class Endpoint
51
87
  include ::Google::Protobuf::MessageExts
52
88
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -35,22 +35,37 @@ module Google
35
35
  # @return [::String]
36
36
  # Optional. The filter applied to the endpoints of the resolved service.
37
37
  #
38
- # General filter string syntax:
39
- # <field> <operator> <value> (<logical connector>)
40
- # <field> can be "name" or "metadata.<key>" for map field.
41
- # <operator> can be "<, >, <=, >=, !=, =, :". Of which ":" means HAS and is
42
- # roughly the same as "=".
43
- # <value> must be the same data type as the field.
44
- # <logical connector> can be "AND, OR, NOT".
38
+ # General `filter` string syntax:
39
+ # `<field> <operator> <value> (<logical connector>)`
40
+ #
41
+ # * `<field>` can be `name`, `address`, `port`, or `metadata.<key>` for
42
+ # map field
43
+ # * `<operator>` can be `<`, `>`, `<=`, `>=`, `!=`, `=`, `:`. Of which `:`
44
+ # means `HAS`, and is roughly the same as `=`
45
+ # * `<value>` must be the same data type as field
46
+ # * `<logical connector>` can be `AND`, `OR`, `NOT`
45
47
  #
46
48
  # Examples of valid filters:
47
- # * "metadata.owner" returns Endpoints that have a label with the
48
- # key "owner", this is the same as "metadata:owner"
49
- # * "metadata.protocol=gRPC" returns Endpoints that have key/value
50
- # "protocol=gRPC"
51
- # * "metadata.owner!=sd AND metadata.foo=bar" returns
52
- # Endpoints that have "owner" field in metadata with a value that is not
53
- # "sd" AND have the key/value foo=bar.
49
+ #
50
+ # * `metadata.owner` returns endpoints that have a annotation with the key
51
+ # `owner`, this is the same as `metadata:owner`
52
+ # * `metadata.protocol=gRPC` returns endpoints that have key/value
53
+ # `protocol=gRPC`
54
+ # * `address=192.108.1.105` returns endpoints that have this address
55
+ # * `port>8080` returns endpoints that have port number larger than 8080
56
+ # *
57
+ # `name>projects/my-project/locations/us-east1/namespaces/my-namespace/services/my-service/endpoints/endpoint-c`
58
+ # returns endpoints that have name that is alphabetically later than the
59
+ # string, so "endpoint-e" is returned but "endpoint-a" is not
60
+ # * `metadata.owner!=sd AND metadata.foo=bar` returns endpoints that have
61
+ # `owner` in annotation key but value is not `sd` AND have key/value
62
+ # `foo=bar`
63
+ # * `doesnotexist.foo=bar` returns an empty list. Note that endpoint
64
+ # doesn't have a field called "doesnotexist". Since the filter does not
65
+ # match any endpoint, it returns no results
66
+ #
67
+ # For more information about filtering, see
68
+ # [API Filtering](https://aip.dev/160).
54
69
  class ResolveServiceRequest
55
70
  include ::Google::Protobuf::MessageExts
56
71
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -27,12 +27,18 @@ module Google
27
27
  # @!attribute [rw] name
28
28
  # @return [::String]
29
29
  # Immutable. The resource name for the namespace in the format
30
- # 'projects/*/locations/*/namespaces/*'.
30
+ # `projects/*/locations/*/namespaces/*`.
31
31
  # @!attribute [rw] labels
32
32
  # @return [::Google::Protobuf::Map{::String => ::String}]
33
- # Optional. Resource labels associated with this Namespace.
34
- # No more than 64 user labels can be associated with a given resource. Label
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] create_time
37
+ # @return [::Google::Protobuf::Timestamp]
38
+ # Output only. The timestamp when the namespace was created.
39
+ # @!attribute [r] update_time
40
+ # @return [::Google::Protobuf::Timestamp]
41
+ # Output only. The timestamp when the namespace was last updated.
36
42
  class Namespace
37
43
  include ::Google::Protobuf::MessageExts
38
44
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -46,8 +46,8 @@ module Google
46
46
  # The request message for {::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#list_namespaces RegistrationService.ListNamespaces}.
47
47
  # @!attribute [rw] parent
48
48
  # @return [::String]
49
- # Required. The resource name of the project and location whose namespaces we'd like to
50
- # list.
49
+ # Required. The resource name of the project and location whose namespaces you'd like
50
+ # to list.
51
51
  # @!attribute [rw] page_size
52
52
  # @return [::Integer]
53
53
  # Optional. The maximum number of items to return.
@@ -56,40 +56,45 @@ module Google
56
56
  # Optional. The next_page_token value returned from a previous List request, if any.
57
57
  # @!attribute [rw] filter
58
58
  # @return [::String]
59
- # Optional. The filter to list result by.
59
+ # Optional. The filter to list results by.
60
+ #
61
+ # General `filter` string syntax:
62
+ # `<field> <operator> <value> (<logical connector>)`
60
63
  #
61
- # General filter string syntax:
62
- # <field> <operator> <value> (<logical connector>)
63
- # <field> can be "name", or "labels.<key>" for map field.
64
- # <operator> can be "<, >, <=, >=, !=, =, :". Of which ":" means HAS, and
65
- # is roughly the same as "=".
66
- # <value> must be the same data type as field.
67
- # <logical connector> can be "AND, OR, NOT".
64
+ # * `<field>` can be `name` or `labels.<key>` for map field
65
+ # * `<operator>` can be `<`, `>`, `<=`, `>=`, `!=`, `=`, `:`. Of which `:`
66
+ # means `HAS`, and is roughly the same as `=`
67
+ # * `<value>` must be the same data type as field
68
+ # * `<logical connector>` can be `AND`, `OR`, `NOT`
68
69
  #
69
70
  # Examples of valid filters:
70
- # * "labels.owner" returns Namespaces that have a label with the key "owner"
71
- # this is the same as "labels:owner".
72
- # * "labels.protocol=gRPC" returns Namespaces that have key/value
73
- # "protocol=gRPC".
74
- # * "name>projects/my-project/locations/us-east/namespaces/namespace-c"
75
- # returns Namespaces that have name that is alphabetically later than the
76
- # string, so "namespace-e" will be returned but "namespace-a" will not be.
77
- # * "labels.owner!=sd AND labels.foo=bar" returns Namespaces that have
78
- # "owner" in label key but value is not "sd" AND have key/value foo=bar.
79
- # * "doesnotexist.foo=bar" returns an empty list. Note that Namespace doesn't
80
- # have a field called "doesnotexist". Since the filter does not match any
81
- # Namespaces, it returns no results.
71
+ #
72
+ # * `labels.owner` returns namespaces that have a label with the key
73
+ # `owner`, this is the same as `labels:owner`
74
+ # * `labels.owner=sd` returns namespaces that have key/value `owner=sd`
75
+ # * `name>projects/my-project/locations/us-east1/namespaces/namespace-c`
76
+ # returns namespaces that have name that is alphabetically later than the
77
+ # string, so "namespace-e" is returned but "namespace-a" is not
78
+ # * `labels.owner!=sd AND labels.foo=bar` returns namespaces that have
79
+ # `owner` in label key but value is not `sd` AND have key/value `foo=bar`
80
+ # * `doesnotexist.foo=bar` returns an empty list. Note that namespace
81
+ # doesn't have a field called "doesnotexist". Since the filter does not
82
+ # match any namespaces, it returns no results
83
+ #
84
+ # For more information about filtering, see
85
+ # [API Filtering](https://aip.dev/160).
82
86
  # @!attribute [rw] order_by
83
87
  # @return [::String]
84
- # Optional. The order to list result by.
88
+ # Optional. The order to list results by.
89
+ #
90
+ # General `order_by` string syntax: `<field> (<asc|desc>) (,)`
85
91
  #
86
- # General order by string syntax:
87
- # <field> (<asc|desc>) (,)
88
- # <field> allows values \\{"name"}
89
- # <asc/desc> ascending or descending order by <field>. If this is left
90
- # blank, "asc" is used.
91
- # Note that an empty order_by string result in default order, which is order
92
- # by name in ascending order.
92
+ # * `<field>` allows value: `name`
93
+ # * `<asc|desc>` ascending or descending order by `<field>`. If this is
94
+ # left blank, `asc` is used
95
+ #
96
+ # Note that an empty `order_by` string results in default order, which is
97
+ # order by `name` in ascending order.
93
98
  class ListNamespacesRequest
94
99
  include ::Google::Protobuf::MessageExts
95
100
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -162,7 +167,7 @@ module Google
162
167
  # The request message for {::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#list_services RegistrationService.ListServices}.
163
168
  # @!attribute [rw] parent
164
169
  # @return [::String]
165
- # Required. The resource name of the namespace whose services we'd
170
+ # Required. The resource name of the namespace whose services you'd
166
171
  # like to list.
167
172
  # @!attribute [rw] page_size
168
173
  # @return [::Integer]
@@ -173,32 +178,48 @@ module Google
173
178
  # if any.
174
179
  # @!attribute [rw] filter
175
180
  # @return [::String]
176
- # Optional. The filter to list result by.
181
+ # Optional. The filter to list results by.
182
+ #
183
+ # General `filter` string syntax:
184
+ # `<field> <operator> <value> (<logical connector>)`
177
185
  #
178
- # General filter string syntax:
179
- # <field> <operator> <value> (<logical connector>)
180
- # <field> can be "name", or "metadata.<key>" for map field.
181
- # <operator> can be "<, >, <=, >=, !=, =, :". Of which ":" means HAS, and
182
- # is roughly the same as "=".
183
- # <value> must be the same data type as field.
184
- # <logical connector> can be "AND, OR, NOT".
186
+ # * `<field>` can be `name` or `metadata.<key>` for map field
187
+ # * `<operator>` can be `<`, `>`, `<=`, `>=`, `!=`, `=`, `:`. Of which `:`
188
+ # means `HAS`, and is roughly the same as `=`
189
+ # * `<value>` must be the same data type as field
190
+ # * `<logical connector>` can be `AND`, `OR`, `NOT`
185
191
  #
186
192
  # Examples of valid filters:
187
- # * "metadata.owner" returns Services that have a label with the key "owner"
188
- # this is the same as "metadata:owner".
189
- # * "metadata.protocol=gRPC" returns Services that have key/value
190
- # "protocol=gRPC".
191
- # * "name>projects/my-project/locations/us-east/namespaces/my-namespace/services/service-c"
192
- # returns Services that have name that is alphabetically later than the
193
- # string, so "service-e" will be returned but "service-a" will not be.
194
- # * "metadata.owner!=sd AND metadata.foo=bar" returns Services that have
195
- # "owner" in label key but value is not "sd" AND have key/value foo=bar.
196
- # * "doesnotexist.foo=bar" returns an empty list. Note that Service doesn't
197
- # have a field called "doesnotexist". Since the filter does not match any
198
- # Services, it returns no results.
193
+ #
194
+ # * `metadata.owner` returns services that have a metadata with the key
195
+ # `owner`, this is the same as `metadata:owner`
196
+ # * `metadata.protocol=gRPC` returns services that have key/value
197
+ # `protocol=gRPC`
198
+ # *
199
+ # `name>projects/my-project/locations/us-east1/namespaces/my-namespace/services/service-c`
200
+ # returns services that have name that is alphabetically later than the
201
+ # string, so "service-e" is returned but "service-a" is not
202
+ # * `metadata.owner!=sd AND metadata.foo=bar` returns services that have
203
+ # `owner` in metadata key but value is not `sd` AND have key/value
204
+ # `foo=bar`
205
+ # * `doesnotexist.foo=bar` returns an empty list. Note that service
206
+ # doesn't have a field called "doesnotexist". Since the filter does not
207
+ # match any services, it returns no results
208
+ #
209
+ # For more information about filtering, see
210
+ # [API Filtering](https://aip.dev/160).
199
211
  # @!attribute [rw] order_by
200
212
  # @return [::String]
201
- # Optional. The order to list result by.
213
+ # Optional. The order to list results by.
214
+ #
215
+ # General `order_by` string syntax: `<field> (<asc|desc>) (,)`
216
+ #
217
+ # * `<field>` allows value: `name`
218
+ # * `<asc|desc>` ascending or descending order by `<field>`. If this is
219
+ # left blank, `asc` is used
220
+ #
221
+ # Note that an empty `order_by` string results in default order, which is
222
+ # order by `name` in ascending order.
202
223
  class ListServicesRequest
203
224
  include ::Google::Protobuf::MessageExts
204
225
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -219,7 +240,7 @@ module Google
219
240
 
220
241
  # The request message for {::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#get_service RegistrationService.GetService}.
221
242
  # This should not be used for looking up a service. Insead, use the `resolve`
222
- # method as it will contain all endpoints and associated metadata.
243
+ # method as it contains all endpoints and associated metadata.
223
244
  # @!attribute [rw] name
224
245
  # @return [::String]
225
246
  # Required. The name of the service to get.
@@ -273,7 +294,7 @@ module Google
273
294
  # The request message for {::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#list_endpoints RegistrationService.ListEndpoints}.
274
295
  # @!attribute [rw] parent
275
296
  # @return [::String]
276
- # Required. The resource name of the service whose endpoints we'd like to
297
+ # Required. The resource name of the service whose endpoints you'd like to
277
298
  # list.
278
299
  # @!attribute [rw] page_size
279
300
  # @return [::Integer]
@@ -284,34 +305,51 @@ module Google
284
305
  # if any.
285
306
  # @!attribute [rw] filter
286
307
  # @return [::String]
287
- # Optional. The filter to list result by.
308
+ # Optional. The filter to list results by.
288
309
  #
289
- # General filter string syntax:
290
- # <field> <operator> <value> (<logical connector>)
291
- # <field> can be "name", "address", "port" or "metadata.<key>" for map field.
292
- # <operator> can be "<, >, <=, >=, !=, =, :". Of which ":" means HAS, and
293
- # is roughly the same as "=".
294
- # <value> must be the same data type as field.
295
- # <logical connector> can be "AND, OR, NOT".
310
+ # General `filter` string syntax:
311
+ # `<field> <operator> <value> (<logical connector>)`
312
+ #
313
+ # * `<field>` can be `name`, `address`, `port`, or `metadata.<key>` for map
314
+ # field
315
+ # * `<operator>` can be `<`, `>`, `<=`, `>=`, `!=`, `=`, `:`. Of which `:`
316
+ # means `HAS`, and is roughly the same as `=`
317
+ # * `<value>` must be the same data type as field
318
+ # * `<logical connector>` can be `AND`, `OR`, `NOT`
296
319
  #
297
320
  # Examples of valid filters:
298
- # * "metadata.owner" returns Endpoints that have a label with the key "owner"
299
- # this is the same as "metadata:owner".
300
- # * "metadata.protocol=gRPC" returns Endpoints that have key/value
301
- # "protocol=gRPC".
302
- # * "address=192.108.1.105" returns Endpoints that have this address.
303
- # * "port>8080" returns Endpoints that have port number larger than 8080.
304
- # * "name>projects/my-project/locations/us-east/namespaces/my-namespace/services/my-service/endpoints/endpoint-c"
305
- # returns Endpoints that have name that is alphabetically later than the
306
- # string, so "endpoint-e" will be returned but "endpoint-a" will not be.
307
- # * "metadata.owner!=sd AND metadata.foo=bar" returns Endpoints that have
308
- # "owner" in label key but value is not "sd" AND have key/value foo=bar.
309
- # * "doesnotexist.foo=bar" returns an empty list. Note that Endpoint doesn't
310
- # have a field called "doesnotexist". Since the filter does not match any
311
- # Endpoints, it returns no results.
321
+ #
322
+ # * `metadata.owner` returns endpoints that have a metadata with the key
323
+ # `owner`, this is the same as `metadata:owner`
324
+ # * `metadata.protocol=gRPC` returns endpoints that have key/value
325
+ # `protocol=gRPC`
326
+ # * `address=192.108.1.105` returns endpoints that have this address
327
+ # * `port>8080` returns endpoints that have port number larger than 8080
328
+ # *
329
+ # `name>projects/my-project/locations/us-east1/namespaces/my-namespace/services/my-service/endpoints/endpoint-c`
330
+ # returns endpoints that have name that is alphabetically later than the
331
+ # string, so "endpoint-e" is returned but "endpoint-a" is not
332
+ # * `metadata.owner!=sd AND metadata.foo=bar` returns endpoints that have
333
+ # `owner` in metadata key but value is not `sd` AND have key/value
334
+ # `foo=bar`
335
+ # * `doesnotexist.foo=bar` returns an empty list. Note that endpoint
336
+ # doesn't have a field called "doesnotexist". Since the filter does not
337
+ # match any endpoints, it returns no results
338
+ #
339
+ # For more information about filtering, see
340
+ # [API Filtering](https://aip.dev/160).
312
341
  # @!attribute [rw] order_by
313
342
  # @return [::String]
314
- # Optional. The order to list result by.
343
+ # Optional. The order to list results by.
344
+ #
345
+ # General `order_by` string syntax: `<field> (<asc|desc>) (,)`
346
+ #
347
+ # * `<field>` allows values: `name`, `address`, `port`
348
+ # * `<asc|desc>` ascending or descending order by `<field>`. If this is
349
+ # left blank, `asc` is used
350
+ #
351
+ # Note that an empty `order_by` string results in default order, which is
352
+ # order by `name` in ascending order.
315
353
  class ListEndpointsRequest
316
354
  include ::Google::Protobuf::MessageExts
317
355
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -28,17 +28,46 @@ module Google
28
28
  # @!attribute [rw] name
29
29
  # @return [::String]
30
30
  # Immutable. The resource name for the service in the format
31
- # 'projects/*/locations/*/namespaces/*/services/*'.
31
+ # `projects/*/locations/*/namespaces/*/services/*`.
32
32
  # @!attribute [rw] metadata
33
33
  # @return [::Google::Protobuf::Map{::String => ::String}]
34
34
  # Optional. Metadata for the service. This data can be consumed by service
35
- # clients. The entire metadata dictionary may contain up to 2000 characters,
36
- # spread across all key-value pairs. Metadata that goes beyond any these
37
- # limits will be rejected.
35
+ # clients.
36
+ #
37
+ # Restrictions:
38
+ #
39
+ # * The entire metadata dictionary may contain up to 2000 characters,
40
+ # spread accoss all key-value pairs. Metadata that goes beyond this
41
+ # limit are rejected
42
+ # * Valid metadata 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
+ # Metadata that fails to meet these requirements are rejected
50
+ # * The `(*.)google.com/` and `(*.)googleapis.com/` prefixes are reserved
51
+ # for system metadata managed by Service Directory. If the user tries
52
+ # to write to these keyspaces, those entries are silently ignored by
53
+ # the system
54
+ #
55
+ # Note: This field is equivalent to the `annotations` field in the v1 API.
56
+ # They have the same syntax and read/write to the same location in Service
57
+ # Directory.
38
58
  # @!attribute [r] endpoints
39
59
  # @return [::Array<::Google::Cloud::ServiceDirectory::V1beta1::Endpoint>]
40
- # Output only. Endpoints associated with this service. Returned on LookupService.Resolve.
41
- # Control plane clients should use RegistrationService.ListEndpoints.
60
+ # Output only. Endpoints associated with this service. Returned on
61
+ # {::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Client#resolve_service LookupService.ResolveService}. Control plane clients should use
62
+ # {::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#list_endpoints RegistrationService.ListEndpoints}.
63
+ # @!attribute [r] create_time
64
+ # @return [::Google::Protobuf::Timestamp]
65
+ # Output only. The timestamp when the service was created.
66
+ # @!attribute [r] update_time
67
+ # @return [::Google::Protobuf::Timestamp]
68
+ # Output only. The timestamp when the service was last updated. Note: endpoints being
69
+ # created/deleted/updated within the service are not considered service
70
+ # updates for the purpose of this timestamp.
42
71
  class Service
43
72
  include ::Google::Protobuf::MessageExts
44
73
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -0,0 +1,129 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2021 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
+ # A Timestamp represents a point in time independent of any time zone or local
23
+ # calendar, encoded as a count of seconds and fractions of seconds at
24
+ # nanosecond resolution. The count is relative to an epoch at UTC midnight on
25
+ # January 1, 1970, in the proleptic Gregorian calendar which extends the
26
+ # Gregorian calendar backwards to year one.
27
+ #
28
+ # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap
29
+ # second table is needed for interpretation, using a [24-hour linear
30
+ # smear](https://developers.google.com/time/smear).
31
+ #
32
+ # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By
33
+ # restricting to that range, we ensure that we can convert to and from [RFC
34
+ # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.
35
+ #
36
+ # # Examples
37
+ #
38
+ # Example 1: Compute Timestamp from POSIX `time()`.
39
+ #
40
+ # Timestamp timestamp;
41
+ # timestamp.set_seconds(time(NULL));
42
+ # timestamp.set_nanos(0);
43
+ #
44
+ # Example 2: Compute Timestamp from POSIX `gettimeofday()`.
45
+ #
46
+ # struct timeval tv;
47
+ # gettimeofday(&tv, NULL);
48
+ #
49
+ # Timestamp timestamp;
50
+ # timestamp.set_seconds(tv.tv_sec);
51
+ # timestamp.set_nanos(tv.tv_usec * 1000);
52
+ #
53
+ # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.
54
+ #
55
+ # FILETIME ft;
56
+ # GetSystemTimeAsFileTime(&ft);
57
+ # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
58
+ #
59
+ # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
60
+ # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
61
+ # Timestamp timestamp;
62
+ # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
63
+ # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
64
+ #
65
+ # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.
66
+ #
67
+ # long millis = System.currentTimeMillis();
68
+ #
69
+ # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
70
+ # .setNanos((int) ((millis % 1000) * 1000000)).build();
71
+ #
72
+ #
73
+ # Example 5: Compute Timestamp from Java `Instant.now()`.
74
+ #
75
+ # Instant now = Instant.now();
76
+ #
77
+ # Timestamp timestamp =
78
+ # Timestamp.newBuilder().setSeconds(now.getEpochSecond())
79
+ # .setNanos(now.getNano()).build();
80
+ #
81
+ #
82
+ # Example 6: Compute Timestamp from current time in Python.
83
+ #
84
+ # timestamp = Timestamp()
85
+ # timestamp.GetCurrentTime()
86
+ #
87
+ # # JSON Mapping
88
+ #
89
+ # In JSON format, the Timestamp type is encoded as a string in the
90
+ # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the
91
+ # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z"
92
+ # where \\{year} is always expressed using four digits while \\{month}, \\{day},
93
+ # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional
94
+ # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
95
+ # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
96
+ # is required. A proto3 JSON serializer should always use UTC (as indicated by
97
+ # "Z") when printing the Timestamp type and a proto3 JSON parser should be
98
+ # able to accept both UTC and other timezones (as indicated by an offset).
99
+ #
100
+ # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
101
+ # 01:30 UTC on January 15, 2017.
102
+ #
103
+ # In JavaScript, one can convert a Date object to this format using the
104
+ # standard
105
+ # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
106
+ # method. In Python, a standard `datetime.datetime` object can be converted
107
+ # to this format using
108
+ # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with
109
+ # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
110
+ # the Joda Time's [`ISODateTimeFormat.dateTime()`](
111
+ # http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D
112
+ # ) to obtain a formatter capable of generating timestamps in this format.
113
+ # @!attribute [rw] seconds
114
+ # @return [::Integer]
115
+ # Represents seconds of UTC time since Unix epoch
116
+ # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
117
+ # 9999-12-31T23:59:59Z inclusive.
118
+ # @!attribute [rw] nanos
119
+ # @return [::Integer]
120
+ # Non-negative fractions of a second at nanosecond resolution. Negative
121
+ # second values with fractions must still have non-negative nanos values
122
+ # that count forward in time. Must be from 0 to 999,999,999
123
+ # inclusive.
124
+ class Timestamp
125
+ include ::Google::Protobuf::MessageExts
126
+ extend ::Google::Protobuf::MessageExts::ClassMethods
127
+ end
128
+ end
129
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-service_directory-v1beta1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-06-17 00:00:00.000000000 Z
11
+ date: 2021-06-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -220,6 +220,7 @@ files:
220
220
  - proto_docs/google/iam/v1/policy.rb
221
221
  - proto_docs/google/protobuf/empty.rb
222
222
  - proto_docs/google/protobuf/field_mask.rb
223
+ - proto_docs/google/protobuf/timestamp.rb
223
224
  - proto_docs/google/type/expr.rb
224
225
  homepage: https://github.com/googleapis/google-cloud-ruby
225
226
  licenses: