google-apis-servicedirectory_v1beta1 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,28 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ module Google
16
+ module Apis
17
+ module ServicedirectoryV1beta1
18
+ # Version of the google-apis-servicedirectory_v1beta1 gem
19
+ GEM_VERSION = "0.1.0"
20
+
21
+ # Version of the code generator used to generate this client
22
+ GENERATOR_VERSION = "0.1.1"
23
+
24
+ # Revision of the discovery document this client was generated from
25
+ REVISION = "20201112"
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,304 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'date'
16
+ require 'google/apis/core/base_service'
17
+ require 'google/apis/core/json_representation'
18
+ require 'google/apis/core/hashable'
19
+ require 'google/apis/errors'
20
+
21
+ module Google
22
+ module Apis
23
+ module ServicedirectoryV1beta1
24
+
25
+ class Binding
26
+ class Representation < Google::Apis::Core::JsonRepresentation; end
27
+
28
+ include Google::Apis::Core::JsonObjectSupport
29
+ end
30
+
31
+ class Empty
32
+ class Representation < Google::Apis::Core::JsonRepresentation; end
33
+
34
+ include Google::Apis::Core::JsonObjectSupport
35
+ end
36
+
37
+ class Endpoint
38
+ class Representation < Google::Apis::Core::JsonRepresentation; end
39
+
40
+ include Google::Apis::Core::JsonObjectSupport
41
+ end
42
+
43
+ class Expr
44
+ class Representation < Google::Apis::Core::JsonRepresentation; end
45
+
46
+ include Google::Apis::Core::JsonObjectSupport
47
+ end
48
+
49
+ class GetIamPolicyRequest
50
+ class Representation < Google::Apis::Core::JsonRepresentation; end
51
+
52
+ include Google::Apis::Core::JsonObjectSupport
53
+ end
54
+
55
+ class GetPolicyOptions
56
+ class Representation < Google::Apis::Core::JsonRepresentation; end
57
+
58
+ include Google::Apis::Core::JsonObjectSupport
59
+ end
60
+
61
+ class ListEndpointsResponse
62
+ class Representation < Google::Apis::Core::JsonRepresentation; end
63
+
64
+ include Google::Apis::Core::JsonObjectSupport
65
+ end
66
+
67
+ class ListLocationsResponse
68
+ class Representation < Google::Apis::Core::JsonRepresentation; end
69
+
70
+ include Google::Apis::Core::JsonObjectSupport
71
+ end
72
+
73
+ class ListNamespacesResponse
74
+ class Representation < Google::Apis::Core::JsonRepresentation; end
75
+
76
+ include Google::Apis::Core::JsonObjectSupport
77
+ end
78
+
79
+ class ListServicesResponse
80
+ class Representation < Google::Apis::Core::JsonRepresentation; end
81
+
82
+ include Google::Apis::Core::JsonObjectSupport
83
+ end
84
+
85
+ class Location
86
+ class Representation < Google::Apis::Core::JsonRepresentation; end
87
+
88
+ include Google::Apis::Core::JsonObjectSupport
89
+ end
90
+
91
+ class Namespace
92
+ class Representation < Google::Apis::Core::JsonRepresentation; end
93
+
94
+ include Google::Apis::Core::JsonObjectSupport
95
+ end
96
+
97
+ class Policy
98
+ class Representation < Google::Apis::Core::JsonRepresentation; end
99
+
100
+ include Google::Apis::Core::JsonObjectSupport
101
+ end
102
+
103
+ class ResolveServiceRequest
104
+ class Representation < Google::Apis::Core::JsonRepresentation; end
105
+
106
+ include Google::Apis::Core::JsonObjectSupport
107
+ end
108
+
109
+ class ResolveServiceResponse
110
+ class Representation < Google::Apis::Core::JsonRepresentation; end
111
+
112
+ include Google::Apis::Core::JsonObjectSupport
113
+ end
114
+
115
+ class Service
116
+ class Representation < Google::Apis::Core::JsonRepresentation; end
117
+
118
+ include Google::Apis::Core::JsonObjectSupport
119
+ end
120
+
121
+ class SetIamPolicyRequest
122
+ class Representation < Google::Apis::Core::JsonRepresentation; end
123
+
124
+ include Google::Apis::Core::JsonObjectSupport
125
+ end
126
+
127
+ class TestIamPermissionsRequest
128
+ class Representation < Google::Apis::Core::JsonRepresentation; end
129
+
130
+ include Google::Apis::Core::JsonObjectSupport
131
+ end
132
+
133
+ class TestIamPermissionsResponse
134
+ class Representation < Google::Apis::Core::JsonRepresentation; end
135
+
136
+ include Google::Apis::Core::JsonObjectSupport
137
+ end
138
+
139
+ class Binding
140
+ # @private
141
+ class Representation < Google::Apis::Core::JsonRepresentation
142
+ property :condition, as: 'condition', class: Google::Apis::ServicedirectoryV1beta1::Expr, decorator: Google::Apis::ServicedirectoryV1beta1::Expr::Representation
143
+
144
+ collection :members, as: 'members'
145
+ property :role, as: 'role'
146
+ end
147
+ end
148
+
149
+ class Empty
150
+ # @private
151
+ class Representation < Google::Apis::Core::JsonRepresentation
152
+ end
153
+ end
154
+
155
+ class Endpoint
156
+ # @private
157
+ class Representation < Google::Apis::Core::JsonRepresentation
158
+ property :address, as: 'address'
159
+ hash :metadata, as: 'metadata'
160
+ property :name, as: 'name'
161
+ property :port, as: 'port'
162
+ end
163
+ end
164
+
165
+ class Expr
166
+ # @private
167
+ class Representation < Google::Apis::Core::JsonRepresentation
168
+ property :description, as: 'description'
169
+ property :expression, as: 'expression'
170
+ property :location, as: 'location'
171
+ property :title, as: 'title'
172
+ end
173
+ end
174
+
175
+ class GetIamPolicyRequest
176
+ # @private
177
+ class Representation < Google::Apis::Core::JsonRepresentation
178
+ property :options, as: 'options', class: Google::Apis::ServicedirectoryV1beta1::GetPolicyOptions, decorator: Google::Apis::ServicedirectoryV1beta1::GetPolicyOptions::Representation
179
+
180
+ end
181
+ end
182
+
183
+ class GetPolicyOptions
184
+ # @private
185
+ class Representation < Google::Apis::Core::JsonRepresentation
186
+ property :requested_policy_version, as: 'requestedPolicyVersion'
187
+ end
188
+ end
189
+
190
+ class ListEndpointsResponse
191
+ # @private
192
+ class Representation < Google::Apis::Core::JsonRepresentation
193
+ collection :endpoints, as: 'endpoints', class: Google::Apis::ServicedirectoryV1beta1::Endpoint, decorator: Google::Apis::ServicedirectoryV1beta1::Endpoint::Representation
194
+
195
+ property :next_page_token, as: 'nextPageToken'
196
+ end
197
+ end
198
+
199
+ class ListLocationsResponse
200
+ # @private
201
+ class Representation < Google::Apis::Core::JsonRepresentation
202
+ collection :locations, as: 'locations', class: Google::Apis::ServicedirectoryV1beta1::Location, decorator: Google::Apis::ServicedirectoryV1beta1::Location::Representation
203
+
204
+ property :next_page_token, as: 'nextPageToken'
205
+ end
206
+ end
207
+
208
+ class ListNamespacesResponse
209
+ # @private
210
+ class Representation < Google::Apis::Core::JsonRepresentation
211
+ collection :namespaces, as: 'namespaces', class: Google::Apis::ServicedirectoryV1beta1::Namespace, decorator: Google::Apis::ServicedirectoryV1beta1::Namespace::Representation
212
+
213
+ property :next_page_token, as: 'nextPageToken'
214
+ end
215
+ end
216
+
217
+ class ListServicesResponse
218
+ # @private
219
+ class Representation < Google::Apis::Core::JsonRepresentation
220
+ property :next_page_token, as: 'nextPageToken'
221
+ collection :services, as: 'services', class: Google::Apis::ServicedirectoryV1beta1::Service, decorator: Google::Apis::ServicedirectoryV1beta1::Service::Representation
222
+
223
+ end
224
+ end
225
+
226
+ class Location
227
+ # @private
228
+ class Representation < Google::Apis::Core::JsonRepresentation
229
+ property :display_name, as: 'displayName'
230
+ hash :labels, as: 'labels'
231
+ property :location_id, as: 'locationId'
232
+ hash :metadata, as: 'metadata'
233
+ property :name, as: 'name'
234
+ end
235
+ end
236
+
237
+ class Namespace
238
+ # @private
239
+ class Representation < Google::Apis::Core::JsonRepresentation
240
+ hash :labels, as: 'labels'
241
+ property :name, as: 'name'
242
+ end
243
+ end
244
+
245
+ class Policy
246
+ # @private
247
+ class Representation < Google::Apis::Core::JsonRepresentation
248
+ collection :bindings, as: 'bindings', class: Google::Apis::ServicedirectoryV1beta1::Binding, decorator: Google::Apis::ServicedirectoryV1beta1::Binding::Representation
249
+
250
+ property :etag, :base64 => true, as: 'etag'
251
+ property :version, as: 'version'
252
+ end
253
+ end
254
+
255
+ class ResolveServiceRequest
256
+ # @private
257
+ class Representation < Google::Apis::Core::JsonRepresentation
258
+ property :endpoint_filter, as: 'endpointFilter'
259
+ property :max_endpoints, as: 'maxEndpoints'
260
+ end
261
+ end
262
+
263
+ class ResolveServiceResponse
264
+ # @private
265
+ class Representation < Google::Apis::Core::JsonRepresentation
266
+ property :service, as: 'service', class: Google::Apis::ServicedirectoryV1beta1::Service, decorator: Google::Apis::ServicedirectoryV1beta1::Service::Representation
267
+
268
+ end
269
+ end
270
+
271
+ class Service
272
+ # @private
273
+ class Representation < Google::Apis::Core::JsonRepresentation
274
+ collection :endpoints, as: 'endpoints', class: Google::Apis::ServicedirectoryV1beta1::Endpoint, decorator: Google::Apis::ServicedirectoryV1beta1::Endpoint::Representation
275
+
276
+ hash :metadata, as: 'metadata'
277
+ property :name, as: 'name'
278
+ end
279
+ end
280
+
281
+ class SetIamPolicyRequest
282
+ # @private
283
+ class Representation < Google::Apis::Core::JsonRepresentation
284
+ property :policy, as: 'policy', class: Google::Apis::ServicedirectoryV1beta1::Policy, decorator: Google::Apis::ServicedirectoryV1beta1::Policy::Representation
285
+
286
+ end
287
+ end
288
+
289
+ class TestIamPermissionsRequest
290
+ # @private
291
+ class Representation < Google::Apis::Core::JsonRepresentation
292
+ collection :permissions, as: 'permissions'
293
+ end
294
+ end
295
+
296
+ class TestIamPermissionsResponse
297
+ # @private
298
+ class Representation < Google::Apis::Core::JsonRepresentation
299
+ collection :permissions, as: 'permissions'
300
+ end
301
+ end
302
+ end
303
+ end
304
+ end
@@ -0,0 +1,959 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'google/apis/core/base_service'
16
+ require 'google/apis/core/json_representation'
17
+ require 'google/apis/core/hashable'
18
+ require 'google/apis/errors'
19
+
20
+ module Google
21
+ module Apis
22
+ module ServicedirectoryV1beta1
23
+ # Service Directory API
24
+ #
25
+ # Service Directory is a platform for discovering, publishing, and connecting
26
+ # services.
27
+ #
28
+ # @example
29
+ # require 'google/apis/servicedirectory_v1beta1'
30
+ #
31
+ # Servicedirectory = Google::Apis::ServicedirectoryV1beta1 # Alias the module
32
+ # service = Servicedirectory::ServiceDirectoryService.new
33
+ #
34
+ # @see https://cloud.google.com/service-directory
35
+ class ServiceDirectoryService < Google::Apis::Core::BaseService
36
+ # @return [String]
37
+ # API key. Your API key identifies your project and provides you with API access,
38
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
39
+ attr_accessor :key
40
+
41
+ # @return [String]
42
+ # Available to use for quota purposes for server-side applications. Can be any
43
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
44
+ attr_accessor :quota_user
45
+
46
+ def initialize
47
+ super('https://servicedirectory.googleapis.com/', '',
48
+ client_name: 'google-apis-servicedirectory_v1beta1',
49
+ client_version: Google::Apis::ServicedirectoryV1beta1::GEM_VERSION)
50
+ @batch_path = 'batch'
51
+ end
52
+
53
+ # Gets information about a location.
54
+ # @param [String] name
55
+ # Resource name for the location.
56
+ # @param [String] fields
57
+ # Selector specifying which fields to include in a partial response.
58
+ # @param [String] quota_user
59
+ # Available to use for quota purposes for server-side applications. Can be any
60
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
61
+ # @param [Google::Apis::RequestOptions] options
62
+ # Request-specific options
63
+ #
64
+ # @yield [result, err] Result & error if block supplied
65
+ # @yieldparam result [Google::Apis::ServicedirectoryV1beta1::Location] parsed result object
66
+ # @yieldparam err [StandardError] error object if request failed
67
+ #
68
+ # @return [Google::Apis::ServicedirectoryV1beta1::Location]
69
+ #
70
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
71
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
72
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
73
+ def get_project_location(name, fields: nil, quota_user: nil, options: nil, &block)
74
+ command = make_simple_command(:get, 'v1beta1/{+name}', options)
75
+ command.response_representation = Google::Apis::ServicedirectoryV1beta1::Location::Representation
76
+ command.response_class = Google::Apis::ServicedirectoryV1beta1::Location
77
+ command.params['name'] = name unless name.nil?
78
+ command.query['fields'] = fields unless fields.nil?
79
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
80
+ execute_or_queue_command(command, &block)
81
+ end
82
+
83
+ # Lists information about the supported locations for this service.
84
+ # @param [String] name
85
+ # The resource that owns the locations collection, if applicable.
86
+ # @param [String] filter
87
+ # The standard list filter.
88
+ # @param [Fixnum] page_size
89
+ # The standard list page size.
90
+ # @param [String] page_token
91
+ # The standard list page token.
92
+ # @param [String] fields
93
+ # Selector specifying which fields to include in a partial response.
94
+ # @param [String] quota_user
95
+ # Available to use for quota purposes for server-side applications. Can be any
96
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
97
+ # @param [Google::Apis::RequestOptions] options
98
+ # Request-specific options
99
+ #
100
+ # @yield [result, err] Result & error if block supplied
101
+ # @yieldparam result [Google::Apis::ServicedirectoryV1beta1::ListLocationsResponse] parsed result object
102
+ # @yieldparam err [StandardError] error object if request failed
103
+ #
104
+ # @return [Google::Apis::ServicedirectoryV1beta1::ListLocationsResponse]
105
+ #
106
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
107
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
108
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
109
+ def list_project_locations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
110
+ command = make_simple_command(:get, 'v1beta1/{+name}/locations', options)
111
+ command.response_representation = Google::Apis::ServicedirectoryV1beta1::ListLocationsResponse::Representation
112
+ command.response_class = Google::Apis::ServicedirectoryV1beta1::ListLocationsResponse
113
+ command.params['name'] = name unless name.nil?
114
+ command.query['filter'] = filter unless filter.nil?
115
+ command.query['pageSize'] = page_size unless page_size.nil?
116
+ command.query['pageToken'] = page_token unless page_token.nil?
117
+ command.query['fields'] = fields unless fields.nil?
118
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
119
+ execute_or_queue_command(command, &block)
120
+ end
121
+
122
+ # Creates a namespace, and returns the new Namespace.
123
+ # @param [String] parent
124
+ # Required. The resource name of the project and location the namespace will be
125
+ # created in.
126
+ # @param [Google::Apis::ServicedirectoryV1beta1::Namespace] namespace_object
127
+ # @param [String] namespace_id
128
+ # Required. The Resource ID must be 1-63 characters long, and comply with
129
+ # RFC1035. Specifically, the name must be 1-63 characters long and match the
130
+ # regular expression `[a-z](?:[-a-z0-9]`0,61`[a-z0-9])?` which means the first
131
+ # character must be a lowercase letter, and all following characters must be a
132
+ # dash, lowercase letter, or digit, except the last character, which cannot be a
133
+ # dash.
134
+ # @param [String] fields
135
+ # Selector specifying which fields to include in a partial response.
136
+ # @param [String] quota_user
137
+ # Available to use for quota purposes for server-side applications. Can be any
138
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
139
+ # @param [Google::Apis::RequestOptions] options
140
+ # Request-specific options
141
+ #
142
+ # @yield [result, err] Result & error if block supplied
143
+ # @yieldparam result [Google::Apis::ServicedirectoryV1beta1::Namespace] parsed result object
144
+ # @yieldparam err [StandardError] error object if request failed
145
+ #
146
+ # @return [Google::Apis::ServicedirectoryV1beta1::Namespace]
147
+ #
148
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
149
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
150
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
151
+ def create_project_location_namespace(parent, namespace_object = nil, namespace_id: nil, fields: nil, quota_user: nil, options: nil, &block)
152
+ command = make_simple_command(:post, 'v1beta1/{+parent}/namespaces', options)
153
+ command.request_representation = Google::Apis::ServicedirectoryV1beta1::Namespace::Representation
154
+ command.request_object = namespace_object
155
+ command.response_representation = Google::Apis::ServicedirectoryV1beta1::Namespace::Representation
156
+ command.response_class = Google::Apis::ServicedirectoryV1beta1::Namespace
157
+ command.params['parent'] = parent unless parent.nil?
158
+ command.query['namespaceId'] = namespace_id unless namespace_id.nil?
159
+ command.query['fields'] = fields unless fields.nil?
160
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
161
+ execute_or_queue_command(command, &block)
162
+ end
163
+
164
+ # Deletes a namespace. This also deletes all services and endpoints in the
165
+ # namespace.
166
+ # @param [String] name
167
+ # Required. The name of the namespace to delete.
168
+ # @param [String] fields
169
+ # Selector specifying which fields to include in a partial response.
170
+ # @param [String] quota_user
171
+ # Available to use for quota purposes for server-side applications. Can be any
172
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
173
+ # @param [Google::Apis::RequestOptions] options
174
+ # Request-specific options
175
+ #
176
+ # @yield [result, err] Result & error if block supplied
177
+ # @yieldparam result [Google::Apis::ServicedirectoryV1beta1::Empty] parsed result object
178
+ # @yieldparam err [StandardError] error object if request failed
179
+ #
180
+ # @return [Google::Apis::ServicedirectoryV1beta1::Empty]
181
+ #
182
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
183
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
184
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
185
+ def delete_project_location_namespace(name, fields: nil, quota_user: nil, options: nil, &block)
186
+ command = make_simple_command(:delete, 'v1beta1/{+name}', options)
187
+ command.response_representation = Google::Apis::ServicedirectoryV1beta1::Empty::Representation
188
+ command.response_class = Google::Apis::ServicedirectoryV1beta1::Empty
189
+ command.params['name'] = name unless name.nil?
190
+ command.query['fields'] = fields unless fields.nil?
191
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
192
+ execute_or_queue_command(command, &block)
193
+ end
194
+
195
+ # Gets a namespace.
196
+ # @param [String] name
197
+ # Required. The name of the namespace to retrieve.
198
+ # @param [String] fields
199
+ # Selector specifying which fields to include in a partial response.
200
+ # @param [String] quota_user
201
+ # Available to use for quota purposes for server-side applications. Can be any
202
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
203
+ # @param [Google::Apis::RequestOptions] options
204
+ # Request-specific options
205
+ #
206
+ # @yield [result, err] Result & error if block supplied
207
+ # @yieldparam result [Google::Apis::ServicedirectoryV1beta1::Namespace] parsed result object
208
+ # @yieldparam err [StandardError] error object if request failed
209
+ #
210
+ # @return [Google::Apis::ServicedirectoryV1beta1::Namespace]
211
+ #
212
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
213
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
214
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
215
+ def get_project_location_namespace(name, fields: nil, quota_user: nil, options: nil, &block)
216
+ command = make_simple_command(:get, 'v1beta1/{+name}', options)
217
+ command.response_representation = Google::Apis::ServicedirectoryV1beta1::Namespace::Representation
218
+ command.response_class = Google::Apis::ServicedirectoryV1beta1::Namespace
219
+ command.params['name'] = name unless name.nil?
220
+ command.query['fields'] = fields unless fields.nil?
221
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
222
+ execute_or_queue_command(command, &block)
223
+ end
224
+
225
+ # Gets the IAM Policy for a resource (namespace or service only).
226
+ # @param [String] resource
227
+ # REQUIRED: The resource for which the policy is being requested. See the
228
+ # operation documentation for the appropriate value for this field.
229
+ # @param [Google::Apis::ServicedirectoryV1beta1::GetIamPolicyRequest] get_iam_policy_request_object
230
+ # @param [String] fields
231
+ # Selector specifying which fields to include in a partial response.
232
+ # @param [String] quota_user
233
+ # Available to use for quota purposes for server-side applications. Can be any
234
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
235
+ # @param [Google::Apis::RequestOptions] options
236
+ # Request-specific options
237
+ #
238
+ # @yield [result, err] Result & error if block supplied
239
+ # @yieldparam result [Google::Apis::ServicedirectoryV1beta1::Policy] parsed result object
240
+ # @yieldparam err [StandardError] error object if request failed
241
+ #
242
+ # @return [Google::Apis::ServicedirectoryV1beta1::Policy]
243
+ #
244
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
245
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
246
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
247
+ def get_namespace_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
248
+ command = make_simple_command(:post, 'v1beta1/{+resource}:getIamPolicy', options)
249
+ command.request_representation = Google::Apis::ServicedirectoryV1beta1::GetIamPolicyRequest::Representation
250
+ command.request_object = get_iam_policy_request_object
251
+ command.response_representation = Google::Apis::ServicedirectoryV1beta1::Policy::Representation
252
+ command.response_class = Google::Apis::ServicedirectoryV1beta1::Policy
253
+ command.params['resource'] = resource unless resource.nil?
254
+ command.query['fields'] = fields unless fields.nil?
255
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
256
+ execute_or_queue_command(command, &block)
257
+ end
258
+
259
+ # Lists all namespaces.
260
+ # @param [String] parent
261
+ # Required. The resource name of the project and location whose namespaces we'd
262
+ # like to list.
263
+ # @param [String] filter
264
+ # Optional. The filter to list result by. General filter string syntax: () can
265
+ # be "name", or "labels." for map field. can be "<, >, <=, >=, !=, =, :". Of
266
+ # which ":" means HAS, and is roughly the same as "=". must be the same data
267
+ # type as field. can be "AND, OR, NOT". Examples of valid filters: * "labels.
268
+ # owner" returns Namespaces that have a label with the key "owner" this is the
269
+ # same as "labels:owner". * "labels.protocol=gRPC" returns Namespaces that have
270
+ # key/value "protocol=gRPC". * "name>projects/my-project/locations/us-east/
271
+ # namespaces/namespace-c" returns Namespaces that have name that is
272
+ # alphabetically later than the string, so "namespace-e" will be returned but "
273
+ # namespace-a" will not be. * "labels.owner!=sd AND labels.foo=bar" returns
274
+ # Namespaces that have "owner" in label key but value is not "sd" AND have key/
275
+ # value foo=bar. * "doesnotexist.foo=bar" returns an empty list. Note that
276
+ # Namespace doesn't have a field called "doesnotexist". Since the filter does
277
+ # not match any Namespaces, it returns no results.
278
+ # @param [String] order_by
279
+ # Optional. The order to list result by. General order by string syntax: () (,)
280
+ # allows values `"name"` ascending or descending order by . If this is left
281
+ # blank, "asc" is used. Note that an empty order_by string result in default
282
+ # order, which is order by name in ascending order.
283
+ # @param [Fixnum] page_size
284
+ # Optional. The maximum number of items to return.
285
+ # @param [String] page_token
286
+ # Optional. The next_page_token value returned from a previous List request, if
287
+ # any.
288
+ # @param [String] fields
289
+ # Selector specifying which fields to include in a partial response.
290
+ # @param [String] quota_user
291
+ # Available to use for quota purposes for server-side applications. Can be any
292
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
293
+ # @param [Google::Apis::RequestOptions] options
294
+ # Request-specific options
295
+ #
296
+ # @yield [result, err] Result & error if block supplied
297
+ # @yieldparam result [Google::Apis::ServicedirectoryV1beta1::ListNamespacesResponse] parsed result object
298
+ # @yieldparam err [StandardError] error object if request failed
299
+ #
300
+ # @return [Google::Apis::ServicedirectoryV1beta1::ListNamespacesResponse]
301
+ #
302
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
303
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
304
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
305
+ def list_project_location_namespaces(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
306
+ command = make_simple_command(:get, 'v1beta1/{+parent}/namespaces', options)
307
+ command.response_representation = Google::Apis::ServicedirectoryV1beta1::ListNamespacesResponse::Representation
308
+ command.response_class = Google::Apis::ServicedirectoryV1beta1::ListNamespacesResponse
309
+ command.params['parent'] = parent unless parent.nil?
310
+ command.query['filter'] = filter unless filter.nil?
311
+ command.query['orderBy'] = order_by unless order_by.nil?
312
+ command.query['pageSize'] = page_size unless page_size.nil?
313
+ command.query['pageToken'] = page_token unless page_token.nil?
314
+ command.query['fields'] = fields unless fields.nil?
315
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
316
+ execute_or_queue_command(command, &block)
317
+ end
318
+
319
+ # Updates a namespace.
320
+ # @param [String] name
321
+ # Immutable. The resource name for the namespace in the format 'projects/*/
322
+ # locations/*/namespaces/*'.
323
+ # @param [Google::Apis::ServicedirectoryV1beta1::Namespace] namespace_object
324
+ # @param [String] update_mask
325
+ # Required. List of fields to be updated in this request.
326
+ # @param [String] fields
327
+ # Selector specifying which fields to include in a partial response.
328
+ # @param [String] quota_user
329
+ # Available to use for quota purposes for server-side applications. Can be any
330
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
331
+ # @param [Google::Apis::RequestOptions] options
332
+ # Request-specific options
333
+ #
334
+ # @yield [result, err] Result & error if block supplied
335
+ # @yieldparam result [Google::Apis::ServicedirectoryV1beta1::Namespace] parsed result object
336
+ # @yieldparam err [StandardError] error object if request failed
337
+ #
338
+ # @return [Google::Apis::ServicedirectoryV1beta1::Namespace]
339
+ #
340
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
341
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
342
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
343
+ def patch_project_location_namespace(name, namespace_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
344
+ command = make_simple_command(:patch, 'v1beta1/{+name}', options)
345
+ command.request_representation = Google::Apis::ServicedirectoryV1beta1::Namespace::Representation
346
+ command.request_object = namespace_object
347
+ command.response_representation = Google::Apis::ServicedirectoryV1beta1::Namespace::Representation
348
+ command.response_class = Google::Apis::ServicedirectoryV1beta1::Namespace
349
+ command.params['name'] = name unless name.nil?
350
+ command.query['updateMask'] = update_mask unless update_mask.nil?
351
+ command.query['fields'] = fields unless fields.nil?
352
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
353
+ execute_or_queue_command(command, &block)
354
+ end
355
+
356
+ # Sets the IAM Policy for a resource (namespace or service only).
357
+ # @param [String] resource
358
+ # REQUIRED: The resource for which the policy is being specified. See the
359
+ # operation documentation for the appropriate value for this field.
360
+ # @param [Google::Apis::ServicedirectoryV1beta1::SetIamPolicyRequest] set_iam_policy_request_object
361
+ # @param [String] fields
362
+ # Selector specifying which fields to include in a partial response.
363
+ # @param [String] quota_user
364
+ # Available to use for quota purposes for server-side applications. Can be any
365
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
366
+ # @param [Google::Apis::RequestOptions] options
367
+ # Request-specific options
368
+ #
369
+ # @yield [result, err] Result & error if block supplied
370
+ # @yieldparam result [Google::Apis::ServicedirectoryV1beta1::Policy] parsed result object
371
+ # @yieldparam err [StandardError] error object if request failed
372
+ #
373
+ # @return [Google::Apis::ServicedirectoryV1beta1::Policy]
374
+ #
375
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
376
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
377
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
378
+ def set_namespace_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
379
+ command = make_simple_command(:post, 'v1beta1/{+resource}:setIamPolicy', options)
380
+ command.request_representation = Google::Apis::ServicedirectoryV1beta1::SetIamPolicyRequest::Representation
381
+ command.request_object = set_iam_policy_request_object
382
+ command.response_representation = Google::Apis::ServicedirectoryV1beta1::Policy::Representation
383
+ command.response_class = Google::Apis::ServicedirectoryV1beta1::Policy
384
+ command.params['resource'] = resource unless resource.nil?
385
+ command.query['fields'] = fields unless fields.nil?
386
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
387
+ execute_or_queue_command(command, &block)
388
+ end
389
+
390
+ # Tests IAM permissions for a resource (namespace or service only).
391
+ # @param [String] resource
392
+ # REQUIRED: The resource for which the policy detail is being requested. See the
393
+ # operation documentation for the appropriate value for this field.
394
+ # @param [Google::Apis::ServicedirectoryV1beta1::TestIamPermissionsRequest] test_iam_permissions_request_object
395
+ # @param [String] fields
396
+ # Selector specifying which fields to include in a partial response.
397
+ # @param [String] quota_user
398
+ # Available to use for quota purposes for server-side applications. Can be any
399
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
400
+ # @param [Google::Apis::RequestOptions] options
401
+ # Request-specific options
402
+ #
403
+ # @yield [result, err] Result & error if block supplied
404
+ # @yieldparam result [Google::Apis::ServicedirectoryV1beta1::TestIamPermissionsResponse] parsed result object
405
+ # @yieldparam err [StandardError] error object if request failed
406
+ #
407
+ # @return [Google::Apis::ServicedirectoryV1beta1::TestIamPermissionsResponse]
408
+ #
409
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
410
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
411
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
412
+ def test_namespace_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
413
+ command = make_simple_command(:post, 'v1beta1/{+resource}:testIamPermissions', options)
414
+ command.request_representation = Google::Apis::ServicedirectoryV1beta1::TestIamPermissionsRequest::Representation
415
+ command.request_object = test_iam_permissions_request_object
416
+ command.response_representation = Google::Apis::ServicedirectoryV1beta1::TestIamPermissionsResponse::Representation
417
+ command.response_class = Google::Apis::ServicedirectoryV1beta1::TestIamPermissionsResponse
418
+ command.params['resource'] = resource unless resource.nil?
419
+ command.query['fields'] = fields unless fields.nil?
420
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
421
+ execute_or_queue_command(command, &block)
422
+ end
423
+
424
+ # Creates a service, and returns the new Service.
425
+ # @param [String] parent
426
+ # Required. The resource name of the namespace this service will belong to.
427
+ # @param [Google::Apis::ServicedirectoryV1beta1::Service] service_object
428
+ # @param [String] service_id
429
+ # Required. The Resource ID must be 1-63 characters long, and comply with
430
+ # RFC1035. Specifically, the name must be 1-63 characters long and match the
431
+ # regular expression `[a-z](?:[-a-z0-9]`0,61`[a-z0-9])?` which means the first
432
+ # character must be a lowercase letter, and all following characters must be a
433
+ # dash, lowercase letter, or digit, except the last character, which cannot be a
434
+ # dash.
435
+ # @param [String] fields
436
+ # Selector specifying which fields to include in a partial response.
437
+ # @param [String] quota_user
438
+ # Available to use for quota purposes for server-side applications. Can be any
439
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
440
+ # @param [Google::Apis::RequestOptions] options
441
+ # Request-specific options
442
+ #
443
+ # @yield [result, err] Result & error if block supplied
444
+ # @yieldparam result [Google::Apis::ServicedirectoryV1beta1::Service] parsed result object
445
+ # @yieldparam err [StandardError] error object if request failed
446
+ #
447
+ # @return [Google::Apis::ServicedirectoryV1beta1::Service]
448
+ #
449
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
450
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
451
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
452
+ def create_project_location_namespace_service(parent, service_object = nil, service_id: nil, fields: nil, quota_user: nil, options: nil, &block)
453
+ command = make_simple_command(:post, 'v1beta1/{+parent}/services', options)
454
+ command.request_representation = Google::Apis::ServicedirectoryV1beta1::Service::Representation
455
+ command.request_object = service_object
456
+ command.response_representation = Google::Apis::ServicedirectoryV1beta1::Service::Representation
457
+ command.response_class = Google::Apis::ServicedirectoryV1beta1::Service
458
+ command.params['parent'] = parent unless parent.nil?
459
+ command.query['serviceId'] = service_id unless service_id.nil?
460
+ command.query['fields'] = fields unless fields.nil?
461
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
462
+ execute_or_queue_command(command, &block)
463
+ end
464
+
465
+ # Deletes a service. This also deletes all endpoints associated with the service.
466
+ # @param [String] name
467
+ # Required. The name of the service to delete.
468
+ # @param [String] fields
469
+ # Selector specifying which fields to include in a partial response.
470
+ # @param [String] quota_user
471
+ # Available to use for quota purposes for server-side applications. Can be any
472
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
473
+ # @param [Google::Apis::RequestOptions] options
474
+ # Request-specific options
475
+ #
476
+ # @yield [result, err] Result & error if block supplied
477
+ # @yieldparam result [Google::Apis::ServicedirectoryV1beta1::Empty] parsed result object
478
+ # @yieldparam err [StandardError] error object if request failed
479
+ #
480
+ # @return [Google::Apis::ServicedirectoryV1beta1::Empty]
481
+ #
482
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
483
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
484
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
485
+ def delete_project_location_namespace_service(name, fields: nil, quota_user: nil, options: nil, &block)
486
+ command = make_simple_command(:delete, 'v1beta1/{+name}', options)
487
+ command.response_representation = Google::Apis::ServicedirectoryV1beta1::Empty::Representation
488
+ command.response_class = Google::Apis::ServicedirectoryV1beta1::Empty
489
+ command.params['name'] = name unless name.nil?
490
+ command.query['fields'] = fields unless fields.nil?
491
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
492
+ execute_or_queue_command(command, &block)
493
+ end
494
+
495
+ # Gets a service.
496
+ # @param [String] name
497
+ # Required. The name of the service to get.
498
+ # @param [String] fields
499
+ # Selector specifying which fields to include in a partial response.
500
+ # @param [String] quota_user
501
+ # Available to use for quota purposes for server-side applications. Can be any
502
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
503
+ # @param [Google::Apis::RequestOptions] options
504
+ # Request-specific options
505
+ #
506
+ # @yield [result, err] Result & error if block supplied
507
+ # @yieldparam result [Google::Apis::ServicedirectoryV1beta1::Service] parsed result object
508
+ # @yieldparam err [StandardError] error object if request failed
509
+ #
510
+ # @return [Google::Apis::ServicedirectoryV1beta1::Service]
511
+ #
512
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
513
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
514
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
515
+ def get_project_location_namespace_service(name, fields: nil, quota_user: nil, options: nil, &block)
516
+ command = make_simple_command(:get, 'v1beta1/{+name}', options)
517
+ command.response_representation = Google::Apis::ServicedirectoryV1beta1::Service::Representation
518
+ command.response_class = Google::Apis::ServicedirectoryV1beta1::Service
519
+ command.params['name'] = name unless name.nil?
520
+ command.query['fields'] = fields unless fields.nil?
521
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
522
+ execute_or_queue_command(command, &block)
523
+ end
524
+
525
+ # Gets the IAM Policy for a resource (namespace or service only).
526
+ # @param [String] resource
527
+ # REQUIRED: The resource for which the policy is being requested. See the
528
+ # operation documentation for the appropriate value for this field.
529
+ # @param [Google::Apis::ServicedirectoryV1beta1::GetIamPolicyRequest] get_iam_policy_request_object
530
+ # @param [String] fields
531
+ # Selector specifying which fields to include in a partial response.
532
+ # @param [String] quota_user
533
+ # Available to use for quota purposes for server-side applications. Can be any
534
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
535
+ # @param [Google::Apis::RequestOptions] options
536
+ # Request-specific options
537
+ #
538
+ # @yield [result, err] Result & error if block supplied
539
+ # @yieldparam result [Google::Apis::ServicedirectoryV1beta1::Policy] parsed result object
540
+ # @yieldparam err [StandardError] error object if request failed
541
+ #
542
+ # @return [Google::Apis::ServicedirectoryV1beta1::Policy]
543
+ #
544
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
545
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
546
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
547
+ def get_service_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
548
+ command = make_simple_command(:post, 'v1beta1/{+resource}:getIamPolicy', options)
549
+ command.request_representation = Google::Apis::ServicedirectoryV1beta1::GetIamPolicyRequest::Representation
550
+ command.request_object = get_iam_policy_request_object
551
+ command.response_representation = Google::Apis::ServicedirectoryV1beta1::Policy::Representation
552
+ command.response_class = Google::Apis::ServicedirectoryV1beta1::Policy
553
+ command.params['resource'] = resource unless resource.nil?
554
+ command.query['fields'] = fields unless fields.nil?
555
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
556
+ execute_or_queue_command(command, &block)
557
+ end
558
+
559
+ # Lists all services belonging to a namespace.
560
+ # @param [String] parent
561
+ # Required. The resource name of the namespace whose services we'd like to list.
562
+ # @param [String] filter
563
+ # Optional. The filter to list result by. General filter string syntax: () can
564
+ # be "name", or "metadata." for map field. can be "<, >, <=, >=, !=, =, :". Of
565
+ # which ":" means HAS, and is roughly the same as "=". must be the same data
566
+ # type as field. can be "AND, OR, NOT". Examples of valid filters: * "metadata.
567
+ # owner" returns Services that have a label with the key "owner" this is the
568
+ # same as "metadata:owner". * "metadata.protocol=gRPC" returns Services that
569
+ # have key/value "protocol=gRPC". * "name>projects/my-project/locations/us-east/
570
+ # namespaces/my-namespace/services/service-c" returns Services that have name
571
+ # that is alphabetically later than the string, so "service-e" will be returned
572
+ # but "service-a" will not be. * "metadata.owner!=sd AND metadata.foo=bar"
573
+ # returns Services that have "owner" in label key but value is not "sd" AND have
574
+ # key/value foo=bar. * "doesnotexist.foo=bar" returns an empty list. Note that
575
+ # Service doesn't have a field called "doesnotexist". Since the filter does not
576
+ # match any Services, it returns no results.
577
+ # @param [String] order_by
578
+ # Optional. The order to list result by.
579
+ # @param [Fixnum] page_size
580
+ # Optional. The maximum number of items to return.
581
+ # @param [String] page_token
582
+ # Optional. The next_page_token value returned from a previous List request, if
583
+ # any.
584
+ # @param [String] fields
585
+ # Selector specifying which fields to include in a partial response.
586
+ # @param [String] quota_user
587
+ # Available to use for quota purposes for server-side applications. Can be any
588
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
589
+ # @param [Google::Apis::RequestOptions] options
590
+ # Request-specific options
591
+ #
592
+ # @yield [result, err] Result & error if block supplied
593
+ # @yieldparam result [Google::Apis::ServicedirectoryV1beta1::ListServicesResponse] parsed result object
594
+ # @yieldparam err [StandardError] error object if request failed
595
+ #
596
+ # @return [Google::Apis::ServicedirectoryV1beta1::ListServicesResponse]
597
+ #
598
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
599
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
600
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
601
+ def list_project_location_namespace_services(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
602
+ command = make_simple_command(:get, 'v1beta1/{+parent}/services', options)
603
+ command.response_representation = Google::Apis::ServicedirectoryV1beta1::ListServicesResponse::Representation
604
+ command.response_class = Google::Apis::ServicedirectoryV1beta1::ListServicesResponse
605
+ command.params['parent'] = parent unless parent.nil?
606
+ command.query['filter'] = filter unless filter.nil?
607
+ command.query['orderBy'] = order_by unless order_by.nil?
608
+ command.query['pageSize'] = page_size unless page_size.nil?
609
+ command.query['pageToken'] = page_token unless page_token.nil?
610
+ command.query['fields'] = fields unless fields.nil?
611
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
612
+ execute_or_queue_command(command, &block)
613
+ end
614
+
615
+ # Updates a service.
616
+ # @param [String] name
617
+ # Immutable. The resource name for the service in the format 'projects/*/
618
+ # locations/*/namespaces/*/services/*'.
619
+ # @param [Google::Apis::ServicedirectoryV1beta1::Service] service_object
620
+ # @param [String] update_mask
621
+ # Required. List of fields to be updated in this request.
622
+ # @param [String] fields
623
+ # Selector specifying which fields to include in a partial response.
624
+ # @param [String] quota_user
625
+ # Available to use for quota purposes for server-side applications. Can be any
626
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
627
+ # @param [Google::Apis::RequestOptions] options
628
+ # Request-specific options
629
+ #
630
+ # @yield [result, err] Result & error if block supplied
631
+ # @yieldparam result [Google::Apis::ServicedirectoryV1beta1::Service] parsed result object
632
+ # @yieldparam err [StandardError] error object if request failed
633
+ #
634
+ # @return [Google::Apis::ServicedirectoryV1beta1::Service]
635
+ #
636
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
637
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
638
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
639
+ def patch_project_location_namespace_service(name, service_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
640
+ command = make_simple_command(:patch, 'v1beta1/{+name}', options)
641
+ command.request_representation = Google::Apis::ServicedirectoryV1beta1::Service::Representation
642
+ command.request_object = service_object
643
+ command.response_representation = Google::Apis::ServicedirectoryV1beta1::Service::Representation
644
+ command.response_class = Google::Apis::ServicedirectoryV1beta1::Service
645
+ command.params['name'] = name unless name.nil?
646
+ command.query['updateMask'] = update_mask unless update_mask.nil?
647
+ command.query['fields'] = fields unless fields.nil?
648
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
649
+ execute_or_queue_command(command, &block)
650
+ end
651
+
652
+ # Returns a service and its associated endpoints. Resolving a service is not
653
+ # considered an active developer method.
654
+ # @param [String] name
655
+ # Required. The name of the service to resolve.
656
+ # @param [Google::Apis::ServicedirectoryV1beta1::ResolveServiceRequest] resolve_service_request_object
657
+ # @param [String] fields
658
+ # Selector specifying which fields to include in a partial response.
659
+ # @param [String] quota_user
660
+ # Available to use for quota purposes for server-side applications. Can be any
661
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
662
+ # @param [Google::Apis::RequestOptions] options
663
+ # Request-specific options
664
+ #
665
+ # @yield [result, err] Result & error if block supplied
666
+ # @yieldparam result [Google::Apis::ServicedirectoryV1beta1::ResolveServiceResponse] parsed result object
667
+ # @yieldparam err [StandardError] error object if request failed
668
+ #
669
+ # @return [Google::Apis::ServicedirectoryV1beta1::ResolveServiceResponse]
670
+ #
671
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
672
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
673
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
674
+ def resolve_service(name, resolve_service_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
675
+ command = make_simple_command(:post, 'v1beta1/{+name}:resolve', options)
676
+ command.request_representation = Google::Apis::ServicedirectoryV1beta1::ResolveServiceRequest::Representation
677
+ command.request_object = resolve_service_request_object
678
+ command.response_representation = Google::Apis::ServicedirectoryV1beta1::ResolveServiceResponse::Representation
679
+ command.response_class = Google::Apis::ServicedirectoryV1beta1::ResolveServiceResponse
680
+ command.params['name'] = name unless name.nil?
681
+ command.query['fields'] = fields unless fields.nil?
682
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
683
+ execute_or_queue_command(command, &block)
684
+ end
685
+
686
+ # Sets the IAM Policy for a resource (namespace or service only).
687
+ # @param [String] resource
688
+ # REQUIRED: The resource for which the policy is being specified. See the
689
+ # operation documentation for the appropriate value for this field.
690
+ # @param [Google::Apis::ServicedirectoryV1beta1::SetIamPolicyRequest] set_iam_policy_request_object
691
+ # @param [String] fields
692
+ # Selector specifying which fields to include in a partial response.
693
+ # @param [String] quota_user
694
+ # Available to use for quota purposes for server-side applications. Can be any
695
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
696
+ # @param [Google::Apis::RequestOptions] options
697
+ # Request-specific options
698
+ #
699
+ # @yield [result, err] Result & error if block supplied
700
+ # @yieldparam result [Google::Apis::ServicedirectoryV1beta1::Policy] parsed result object
701
+ # @yieldparam err [StandardError] error object if request failed
702
+ #
703
+ # @return [Google::Apis::ServicedirectoryV1beta1::Policy]
704
+ #
705
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
706
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
707
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
708
+ def set_service_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
709
+ command = make_simple_command(:post, 'v1beta1/{+resource}:setIamPolicy', options)
710
+ command.request_representation = Google::Apis::ServicedirectoryV1beta1::SetIamPolicyRequest::Representation
711
+ command.request_object = set_iam_policy_request_object
712
+ command.response_representation = Google::Apis::ServicedirectoryV1beta1::Policy::Representation
713
+ command.response_class = Google::Apis::ServicedirectoryV1beta1::Policy
714
+ command.params['resource'] = resource unless resource.nil?
715
+ command.query['fields'] = fields unless fields.nil?
716
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
717
+ execute_or_queue_command(command, &block)
718
+ end
719
+
720
+ # Tests IAM permissions for a resource (namespace or service only).
721
+ # @param [String] resource
722
+ # REQUIRED: The resource for which the policy detail is being requested. See the
723
+ # operation documentation for the appropriate value for this field.
724
+ # @param [Google::Apis::ServicedirectoryV1beta1::TestIamPermissionsRequest] test_iam_permissions_request_object
725
+ # @param [String] fields
726
+ # Selector specifying which fields to include in a partial response.
727
+ # @param [String] quota_user
728
+ # Available to use for quota purposes for server-side applications. Can be any
729
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
730
+ # @param [Google::Apis::RequestOptions] options
731
+ # Request-specific options
732
+ #
733
+ # @yield [result, err] Result & error if block supplied
734
+ # @yieldparam result [Google::Apis::ServicedirectoryV1beta1::TestIamPermissionsResponse] parsed result object
735
+ # @yieldparam err [StandardError] error object if request failed
736
+ #
737
+ # @return [Google::Apis::ServicedirectoryV1beta1::TestIamPermissionsResponse]
738
+ #
739
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
740
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
741
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
742
+ def test_service_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
743
+ command = make_simple_command(:post, 'v1beta1/{+resource}:testIamPermissions', options)
744
+ command.request_representation = Google::Apis::ServicedirectoryV1beta1::TestIamPermissionsRequest::Representation
745
+ command.request_object = test_iam_permissions_request_object
746
+ command.response_representation = Google::Apis::ServicedirectoryV1beta1::TestIamPermissionsResponse::Representation
747
+ command.response_class = Google::Apis::ServicedirectoryV1beta1::TestIamPermissionsResponse
748
+ command.params['resource'] = resource unless resource.nil?
749
+ command.query['fields'] = fields unless fields.nil?
750
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
751
+ execute_or_queue_command(command, &block)
752
+ end
753
+
754
+ # Creates a endpoint, and returns the new Endpoint.
755
+ # @param [String] parent
756
+ # Required. The resource name of the service that this endpoint provides.
757
+ # @param [Google::Apis::ServicedirectoryV1beta1::Endpoint] endpoint_object
758
+ # @param [String] endpoint_id
759
+ # Required. The Resource ID must be 1-63 characters long, and comply with
760
+ # RFC1035. Specifically, the name must be 1-63 characters long and match the
761
+ # regular expression `[a-z](?:[-a-z0-9]`0,61`[a-z0-9])?` which means the first
762
+ # character must be a lowercase letter, and all following characters must be a
763
+ # dash, lowercase letter, or digit, except the last character, which cannot be a
764
+ # dash.
765
+ # @param [String] fields
766
+ # Selector specifying which fields to include in a partial response.
767
+ # @param [String] quota_user
768
+ # Available to use for quota purposes for server-side applications. Can be any
769
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
770
+ # @param [Google::Apis::RequestOptions] options
771
+ # Request-specific options
772
+ #
773
+ # @yield [result, err] Result & error if block supplied
774
+ # @yieldparam result [Google::Apis::ServicedirectoryV1beta1::Endpoint] parsed result object
775
+ # @yieldparam err [StandardError] error object if request failed
776
+ #
777
+ # @return [Google::Apis::ServicedirectoryV1beta1::Endpoint]
778
+ #
779
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
780
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
781
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
782
+ def create_project_location_namespace_service_endpoint(parent, endpoint_object = nil, endpoint_id: nil, fields: nil, quota_user: nil, options: nil, &block)
783
+ command = make_simple_command(:post, 'v1beta1/{+parent}/endpoints', options)
784
+ command.request_representation = Google::Apis::ServicedirectoryV1beta1::Endpoint::Representation
785
+ command.request_object = endpoint_object
786
+ command.response_representation = Google::Apis::ServicedirectoryV1beta1::Endpoint::Representation
787
+ command.response_class = Google::Apis::ServicedirectoryV1beta1::Endpoint
788
+ command.params['parent'] = parent unless parent.nil?
789
+ command.query['endpointId'] = endpoint_id unless endpoint_id.nil?
790
+ command.query['fields'] = fields unless fields.nil?
791
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
792
+ execute_or_queue_command(command, &block)
793
+ end
794
+
795
+ # Deletes a endpoint.
796
+ # @param [String] name
797
+ # Required. The name of the endpoint to delete.
798
+ # @param [String] fields
799
+ # Selector specifying which fields to include in a partial response.
800
+ # @param [String] quota_user
801
+ # Available to use for quota purposes for server-side applications. Can be any
802
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
803
+ # @param [Google::Apis::RequestOptions] options
804
+ # Request-specific options
805
+ #
806
+ # @yield [result, err] Result & error if block supplied
807
+ # @yieldparam result [Google::Apis::ServicedirectoryV1beta1::Empty] parsed result object
808
+ # @yieldparam err [StandardError] error object if request failed
809
+ #
810
+ # @return [Google::Apis::ServicedirectoryV1beta1::Empty]
811
+ #
812
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
813
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
814
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
815
+ def delete_project_location_namespace_service_endpoint(name, fields: nil, quota_user: nil, options: nil, &block)
816
+ command = make_simple_command(:delete, 'v1beta1/{+name}', options)
817
+ command.response_representation = Google::Apis::ServicedirectoryV1beta1::Empty::Representation
818
+ command.response_class = Google::Apis::ServicedirectoryV1beta1::Empty
819
+ command.params['name'] = name unless name.nil?
820
+ command.query['fields'] = fields unless fields.nil?
821
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
822
+ execute_or_queue_command(command, &block)
823
+ end
824
+
825
+ # Gets a endpoint.
826
+ # @param [String] name
827
+ # Required. The name of the endpoint to get.
828
+ # @param [String] fields
829
+ # Selector specifying which fields to include in a partial response.
830
+ # @param [String] quota_user
831
+ # Available to use for quota purposes for server-side applications. Can be any
832
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
833
+ # @param [Google::Apis::RequestOptions] options
834
+ # Request-specific options
835
+ #
836
+ # @yield [result, err] Result & error if block supplied
837
+ # @yieldparam result [Google::Apis::ServicedirectoryV1beta1::Endpoint] parsed result object
838
+ # @yieldparam err [StandardError] error object if request failed
839
+ #
840
+ # @return [Google::Apis::ServicedirectoryV1beta1::Endpoint]
841
+ #
842
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
843
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
844
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
845
+ def get_project_location_namespace_service_endpoint(name, fields: nil, quota_user: nil, options: nil, &block)
846
+ command = make_simple_command(:get, 'v1beta1/{+name}', options)
847
+ command.response_representation = Google::Apis::ServicedirectoryV1beta1::Endpoint::Representation
848
+ command.response_class = Google::Apis::ServicedirectoryV1beta1::Endpoint
849
+ command.params['name'] = name unless name.nil?
850
+ command.query['fields'] = fields unless fields.nil?
851
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
852
+ execute_or_queue_command(command, &block)
853
+ end
854
+
855
+ # Lists all endpoints.
856
+ # @param [String] parent
857
+ # Required. The resource name of the service whose endpoints we'd like to list.
858
+ # @param [String] filter
859
+ # Optional. The filter to list result by. General filter string syntax: () can
860
+ # be "name", "address", "port" or "metadata." for map field. can be "<, >, <=, >=
861
+ # , !=, =, :". Of which ":" means HAS, and is roughly the same as "=". must be
862
+ # the same data type as field. can be "AND, OR, NOT". Examples of valid filters:
863
+ # * "metadata.owner" returns Endpoints that have a label with the key "owner"
864
+ # this is the same as "metadata:owner". * "metadata.protocol=gRPC" returns
865
+ # Endpoints that have key/value "protocol=gRPC". * "address=192.108.1.105"
866
+ # returns Endpoints that have this address. * "port>8080" returns Endpoints that
867
+ # have port number larger than 8080. * "name>projects/my-project/locations/us-
868
+ # east/namespaces/my-namespace/services/my-service/endpoints/endpoint-c" returns
869
+ # Endpoints that have name that is alphabetically later than the string, so "
870
+ # endpoint-e" will be returned but "endpoint-a" will not be. * "metadata.owner!=
871
+ # sd AND metadata.foo=bar" returns Endpoints that have "owner" in label key but
872
+ # value is not "sd" AND have key/value foo=bar. * "doesnotexist.foo=bar" returns
873
+ # an empty list. Note that Endpoint doesn't have a field called "doesnotexist".
874
+ # Since the filter does not match any Endpoints, it returns no results.
875
+ # @param [String] order_by
876
+ # Optional. The order to list result by.
877
+ # @param [Fixnum] page_size
878
+ # Optional. The maximum number of items to return.
879
+ # @param [String] page_token
880
+ # Optional. The next_page_token value returned from a previous List request, if
881
+ # any.
882
+ # @param [String] fields
883
+ # Selector specifying which fields to include in a partial response.
884
+ # @param [String] quota_user
885
+ # Available to use for quota purposes for server-side applications. Can be any
886
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
887
+ # @param [Google::Apis::RequestOptions] options
888
+ # Request-specific options
889
+ #
890
+ # @yield [result, err] Result & error if block supplied
891
+ # @yieldparam result [Google::Apis::ServicedirectoryV1beta1::ListEndpointsResponse] parsed result object
892
+ # @yieldparam err [StandardError] error object if request failed
893
+ #
894
+ # @return [Google::Apis::ServicedirectoryV1beta1::ListEndpointsResponse]
895
+ #
896
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
897
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
898
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
899
+ def list_project_location_namespace_service_endpoints(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
900
+ command = make_simple_command(:get, 'v1beta1/{+parent}/endpoints', options)
901
+ command.response_representation = Google::Apis::ServicedirectoryV1beta1::ListEndpointsResponse::Representation
902
+ command.response_class = Google::Apis::ServicedirectoryV1beta1::ListEndpointsResponse
903
+ command.params['parent'] = parent unless parent.nil?
904
+ command.query['filter'] = filter unless filter.nil?
905
+ command.query['orderBy'] = order_by unless order_by.nil?
906
+ command.query['pageSize'] = page_size unless page_size.nil?
907
+ command.query['pageToken'] = page_token unless page_token.nil?
908
+ command.query['fields'] = fields unless fields.nil?
909
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
910
+ execute_or_queue_command(command, &block)
911
+ end
912
+
913
+ # Updates a endpoint.
914
+ # @param [String] name
915
+ # Immutable. The resource name for the endpoint in the format 'projects/*/
916
+ # locations/*/namespaces/*/services/*/endpoints/*'.
917
+ # @param [Google::Apis::ServicedirectoryV1beta1::Endpoint] endpoint_object
918
+ # @param [String] update_mask
919
+ # Required. List of fields to be updated in this request.
920
+ # @param [String] fields
921
+ # Selector specifying which fields to include in a partial response.
922
+ # @param [String] quota_user
923
+ # Available to use for quota purposes for server-side applications. Can be any
924
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
925
+ # @param [Google::Apis::RequestOptions] options
926
+ # Request-specific options
927
+ #
928
+ # @yield [result, err] Result & error if block supplied
929
+ # @yieldparam result [Google::Apis::ServicedirectoryV1beta1::Endpoint] parsed result object
930
+ # @yieldparam err [StandardError] error object if request failed
931
+ #
932
+ # @return [Google::Apis::ServicedirectoryV1beta1::Endpoint]
933
+ #
934
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
935
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
936
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
937
+ def patch_project_location_namespace_service_endpoint(name, endpoint_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
938
+ command = make_simple_command(:patch, 'v1beta1/{+name}', options)
939
+ command.request_representation = Google::Apis::ServicedirectoryV1beta1::Endpoint::Representation
940
+ command.request_object = endpoint_object
941
+ command.response_representation = Google::Apis::ServicedirectoryV1beta1::Endpoint::Representation
942
+ command.response_class = Google::Apis::ServicedirectoryV1beta1::Endpoint
943
+ command.params['name'] = name unless name.nil?
944
+ command.query['updateMask'] = update_mask unless update_mask.nil?
945
+ command.query['fields'] = fields unless fields.nil?
946
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
947
+ execute_or_queue_command(command, &block)
948
+ end
949
+
950
+ protected
951
+
952
+ def apply_command_defaults(command)
953
+ command.query['key'] = key unless key.nil?
954
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
955
+ end
956
+ end
957
+ end
958
+ end
959
+ end