google-cloud-iap-v1 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.yardopts +12 -0
- data/AUTHENTICATION.md +169 -0
- data/LICENSE.md +201 -0
- data/README.md +139 -0
- data/lib/google-cloud-iap-v1.rb +21 -0
- data/lib/google/cloud/iap/v1.rb +39 -0
- data/lib/google/cloud/iap/v1/identity_aware_proxy_admin_service.rb +48 -0
- data/lib/google/cloud/iap/v1/identity_aware_proxy_admin_service/client.rb +701 -0
- data/lib/google/cloud/iap/v1/identity_aware_proxy_admin_service/credentials.rb +51 -0
- data/lib/google/cloud/iap/v1/identity_aware_proxy_o_auth_service.rb +50 -0
- data/lib/google/cloud/iap/v1/identity_aware_proxy_o_auth_service/client.rb +930 -0
- data/lib/google/cloud/iap/v1/identity_aware_proxy_o_auth_service/credentials.rb +51 -0
- data/lib/google/cloud/iap/v1/service_pb.rb +133 -0
- data/lib/google/cloud/iap/v1/service_services_pb.rb +107 -0
- data/lib/google/cloud/iap/v1/version.rb +28 -0
- data/proto_docs/README.md +4 -0
- data/proto_docs/google/api/field_behavior.rb +71 -0
- data/proto_docs/google/api/resource.rb +283 -0
- data/proto_docs/google/cloud/iap/v1/service.rb +336 -0
- data/proto_docs/google/iam/v1/iam_policy.rb +80 -0
- data/proto_docs/google/iam/v1/options.rb +40 -0
- data/proto_docs/google/iam/v1/policy.rb +248 -0
- data/proto_docs/google/protobuf/empty.rb +36 -0
- data/proto_docs/google/protobuf/field_mask.rb +229 -0
- data/proto_docs/google/protobuf/wrappers.rb +121 -0
- data/proto_docs/google/type/expr.rb +75 -0
- metadata +238 -0
@@ -0,0 +1,51 @@
|
|
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
|
+
require "googleauth"
|
20
|
+
|
21
|
+
module Google
|
22
|
+
module Cloud
|
23
|
+
module Iap
|
24
|
+
module V1
|
25
|
+
module IdentityAwareProxyAdminService
|
26
|
+
# Credentials for the IdentityAwareProxyAdminService API.
|
27
|
+
class Credentials < ::Google::Auth::Credentials
|
28
|
+
self.scope = [
|
29
|
+
"https://www.googleapis.com/auth/cloud-platform"
|
30
|
+
]
|
31
|
+
self.env_vars = [
|
32
|
+
"IAP_CREDENTIALS",
|
33
|
+
"IAP_KEYFILE",
|
34
|
+
"GOOGLE_CLOUD_CREDENTIALS",
|
35
|
+
"GOOGLE_CLOUD_KEYFILE",
|
36
|
+
"GCLOUD_KEYFILE",
|
37
|
+
"IAP_CREDENTIALS_JSON",
|
38
|
+
"IAP_KEYFILE_JSON",
|
39
|
+
"GOOGLE_CLOUD_CREDENTIALS_JSON",
|
40
|
+
"GOOGLE_CLOUD_KEYFILE_JSON",
|
41
|
+
"GCLOUD_KEYFILE_JSON"
|
42
|
+
]
|
43
|
+
self.paths = [
|
44
|
+
"~/.config/google_cloud/application_default_credentials.json"
|
45
|
+
]
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
@@ -0,0 +1,50 @@
|
|
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
|
+
require "gapic/common"
|
20
|
+
require "gapic/config"
|
21
|
+
require "gapic/config/method"
|
22
|
+
|
23
|
+
require "google/cloud/iap/v1/version"
|
24
|
+
|
25
|
+
require "google/cloud/iap/v1/identity_aware_proxy_o_auth_service/credentials"
|
26
|
+
require "google/cloud/iap/v1/identity_aware_proxy_o_auth_service/client"
|
27
|
+
|
28
|
+
module Google
|
29
|
+
module Cloud
|
30
|
+
module Iap
|
31
|
+
module V1
|
32
|
+
##
|
33
|
+
# API to programmatically create, list and retrieve Identity Aware Proxy (IAP)
|
34
|
+
# OAuth brands; and create, retrieve, delete and reset-secret of IAP OAuth
|
35
|
+
# clients.
|
36
|
+
#
|
37
|
+
# To load this service and instantiate a client:
|
38
|
+
#
|
39
|
+
# require "google/cloud/iap/v1/identity_aware_proxy_o_auth_service"
|
40
|
+
# client = ::Google::Cloud::Iap::V1::IdentityAwareProxyOAuthService::Client.new
|
41
|
+
#
|
42
|
+
module IdentityAwareProxyOAuthService
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
helper_path = ::File.join __dir__, "identity_aware_proxy_o_auth_service", "helpers.rb"
|
50
|
+
require "google/cloud/iap/v1/identity_aware_proxy_o_auth_service/helpers" if ::File.file? helper_path
|
@@ -0,0 +1,930 @@
|
|
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
|
+
require "google/cloud/errors"
|
20
|
+
require "google/cloud/iap/v1/service_pb"
|
21
|
+
|
22
|
+
module Google
|
23
|
+
module Cloud
|
24
|
+
module Iap
|
25
|
+
module V1
|
26
|
+
module IdentityAwareProxyOAuthService
|
27
|
+
##
|
28
|
+
# Client for the IdentityAwareProxyOAuthService service.
|
29
|
+
#
|
30
|
+
# API to programmatically create, list and retrieve Identity Aware Proxy (IAP)
|
31
|
+
# OAuth brands; and create, retrieve, delete and reset-secret of IAP OAuth
|
32
|
+
# clients.
|
33
|
+
#
|
34
|
+
class Client
|
35
|
+
# @private
|
36
|
+
attr_reader :identity_aware_proxy_o_auth_service_stub
|
37
|
+
|
38
|
+
##
|
39
|
+
# Configure the IdentityAwareProxyOAuthService Client class.
|
40
|
+
#
|
41
|
+
# See {::Google::Cloud::Iap::V1::IdentityAwareProxyOAuthService::Client::Configuration}
|
42
|
+
# for a description of the configuration fields.
|
43
|
+
#
|
44
|
+
# ## Example
|
45
|
+
#
|
46
|
+
# To modify the configuration for all IdentityAwareProxyOAuthService clients:
|
47
|
+
#
|
48
|
+
# ::Google::Cloud::Iap::V1::IdentityAwareProxyOAuthService::Client.configure do |config|
|
49
|
+
# config.timeout = 10.0
|
50
|
+
# end
|
51
|
+
#
|
52
|
+
# @yield [config] Configure the Client client.
|
53
|
+
# @yieldparam config [Client::Configuration]
|
54
|
+
#
|
55
|
+
# @return [Client::Configuration]
|
56
|
+
#
|
57
|
+
def self.configure
|
58
|
+
@configure ||= begin
|
59
|
+
namespace = ["Google", "Cloud", "Iap", "V1"]
|
60
|
+
parent_config = while namespace.any?
|
61
|
+
parent_name = namespace.join "::"
|
62
|
+
parent_const = const_get parent_name
|
63
|
+
break parent_const.configure if parent_const.respond_to? :configure
|
64
|
+
namespace.pop
|
65
|
+
end
|
66
|
+
default_config = Client::Configuration.new parent_config
|
67
|
+
|
68
|
+
default_config.timeout = 60.0
|
69
|
+
|
70
|
+
default_config
|
71
|
+
end
|
72
|
+
yield @configure if block_given?
|
73
|
+
@configure
|
74
|
+
end
|
75
|
+
|
76
|
+
##
|
77
|
+
# Configure the IdentityAwareProxyOAuthService Client instance.
|
78
|
+
#
|
79
|
+
# The configuration is set to the derived mode, meaning that values can be changed,
|
80
|
+
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
81
|
+
# should be made on {Client.configure}.
|
82
|
+
#
|
83
|
+
# See {::Google::Cloud::Iap::V1::IdentityAwareProxyOAuthService::Client::Configuration}
|
84
|
+
# for a description of the configuration fields.
|
85
|
+
#
|
86
|
+
# @yield [config] Configure the Client client.
|
87
|
+
# @yieldparam config [Client::Configuration]
|
88
|
+
#
|
89
|
+
# @return [Client::Configuration]
|
90
|
+
#
|
91
|
+
def configure
|
92
|
+
yield @config if block_given?
|
93
|
+
@config
|
94
|
+
end
|
95
|
+
|
96
|
+
##
|
97
|
+
# Create a new IdentityAwareProxyOAuthService client object.
|
98
|
+
#
|
99
|
+
# ## Examples
|
100
|
+
#
|
101
|
+
# To create a new IdentityAwareProxyOAuthService client with the default
|
102
|
+
# configuration:
|
103
|
+
#
|
104
|
+
# client = ::Google::Cloud::Iap::V1::IdentityAwareProxyOAuthService::Client.new
|
105
|
+
#
|
106
|
+
# To create a new IdentityAwareProxyOAuthService client with a custom
|
107
|
+
# configuration:
|
108
|
+
#
|
109
|
+
# client = ::Google::Cloud::Iap::V1::IdentityAwareProxyOAuthService::Client.new do |config|
|
110
|
+
# config.timeout = 10.0
|
111
|
+
# end
|
112
|
+
#
|
113
|
+
# @yield [config] Configure the IdentityAwareProxyOAuthService client.
|
114
|
+
# @yieldparam config [Client::Configuration]
|
115
|
+
#
|
116
|
+
def initialize
|
117
|
+
# These require statements are intentionally placed here to initialize
|
118
|
+
# the gRPC module only when it's required.
|
119
|
+
# See https://github.com/googleapis/toolkit/issues/446
|
120
|
+
require "gapic/grpc"
|
121
|
+
require "google/cloud/iap/v1/service_services_pb"
|
122
|
+
|
123
|
+
# Create the configuration object
|
124
|
+
@config = Configuration.new Client.configure
|
125
|
+
|
126
|
+
# Yield the configuration if needed
|
127
|
+
yield @config if block_given?
|
128
|
+
|
129
|
+
# Create credentials
|
130
|
+
credentials = @config.credentials
|
131
|
+
# Use self-signed JWT if the scope and endpoint are unchanged from default,
|
132
|
+
# but only if the default endpoint does not have a region prefix.
|
133
|
+
enable_self_signed_jwt = @config.scope == Client.configure.scope &&
|
134
|
+
@config.endpoint == Client.configure.endpoint &&
|
135
|
+
!@config.endpoint.split(".").first.include?("-")
|
136
|
+
credentials ||= Credentials.default scope: @config.scope,
|
137
|
+
enable_self_signed_jwt: enable_self_signed_jwt
|
138
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
139
|
+
credentials = Credentials.new credentials, scope: @config.scope
|
140
|
+
end
|
141
|
+
@quota_project_id = @config.quota_project
|
142
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
143
|
+
|
144
|
+
@identity_aware_proxy_o_auth_service_stub = ::Gapic::ServiceStub.new(
|
145
|
+
::Google::Cloud::Iap::V1::IdentityAwareProxyOAuthService::Stub,
|
146
|
+
credentials: credentials,
|
147
|
+
endpoint: @config.endpoint,
|
148
|
+
channel_args: @config.channel_args,
|
149
|
+
interceptors: @config.interceptors
|
150
|
+
)
|
151
|
+
end
|
152
|
+
|
153
|
+
# Service calls
|
154
|
+
|
155
|
+
##
|
156
|
+
# Lists the existing brands for the project.
|
157
|
+
#
|
158
|
+
# @overload list_brands(request, options = nil)
|
159
|
+
# Pass arguments to `list_brands` via a request object, either of type
|
160
|
+
# {::Google::Cloud::Iap::V1::ListBrandsRequest} or an equivalent Hash.
|
161
|
+
#
|
162
|
+
# @param request [::Google::Cloud::Iap::V1::ListBrandsRequest, ::Hash]
|
163
|
+
# A request object representing the call parameters. Required. To specify no
|
164
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
165
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
166
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
167
|
+
#
|
168
|
+
# @overload list_brands(parent: nil)
|
169
|
+
# Pass arguments to `list_brands` via keyword arguments. Note that at
|
170
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
171
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
172
|
+
#
|
173
|
+
# @param parent [::String]
|
174
|
+
# Required. GCP Project number/id.
|
175
|
+
# In the following format: projects/\\{project_number/id}.
|
176
|
+
#
|
177
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
178
|
+
# @yieldparam response [::Google::Cloud::Iap::V1::ListBrandsResponse]
|
179
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
180
|
+
#
|
181
|
+
# @return [::Google::Cloud::Iap::V1::ListBrandsResponse]
|
182
|
+
#
|
183
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
184
|
+
#
|
185
|
+
def list_brands request, options = nil
|
186
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
187
|
+
|
188
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Iap::V1::ListBrandsRequest
|
189
|
+
|
190
|
+
# Converts hash and nil to an options object
|
191
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
192
|
+
|
193
|
+
# Customize the options with defaults
|
194
|
+
metadata = @config.rpcs.list_brands.metadata.to_h
|
195
|
+
|
196
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
197
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
198
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
199
|
+
gapic_version: ::Google::Cloud::Iap::V1::VERSION
|
200
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
201
|
+
|
202
|
+
header_params = {
|
203
|
+
"parent" => request.parent
|
204
|
+
}
|
205
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
206
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
207
|
+
|
208
|
+
options.apply_defaults timeout: @config.rpcs.list_brands.timeout,
|
209
|
+
metadata: metadata,
|
210
|
+
retry_policy: @config.rpcs.list_brands.retry_policy
|
211
|
+
options.apply_defaults metadata: @config.metadata,
|
212
|
+
retry_policy: @config.retry_policy
|
213
|
+
|
214
|
+
@identity_aware_proxy_o_auth_service_stub.call_rpc :list_brands, request, options: options do |response, operation|
|
215
|
+
yield response, operation if block_given?
|
216
|
+
return response
|
217
|
+
end
|
218
|
+
rescue ::GRPC::BadStatus => e
|
219
|
+
raise ::Google::Cloud::Error.from_error(e)
|
220
|
+
end
|
221
|
+
|
222
|
+
##
|
223
|
+
# Constructs a new OAuth brand for the project if one does not exist.
|
224
|
+
# The created brand is "internal only", meaning that OAuth clients created
|
225
|
+
# under it only accept requests from users who belong to the same G Suite
|
226
|
+
# organization as the project. The brand is created in an un-reviewed status.
|
227
|
+
# NOTE: The "internal only" status can be manually changed in the Google
|
228
|
+
# Cloud console. Requires that a brand does not already exist for the
|
229
|
+
# project, and that the specified support email is owned by the caller.
|
230
|
+
#
|
231
|
+
# @overload create_brand(request, options = nil)
|
232
|
+
# Pass arguments to `create_brand` via a request object, either of type
|
233
|
+
# {::Google::Cloud::Iap::V1::CreateBrandRequest} or an equivalent Hash.
|
234
|
+
#
|
235
|
+
# @param request [::Google::Cloud::Iap::V1::CreateBrandRequest, ::Hash]
|
236
|
+
# A request object representing the call parameters. Required. To specify no
|
237
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
238
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
239
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
240
|
+
#
|
241
|
+
# @overload create_brand(parent: nil, brand: nil)
|
242
|
+
# Pass arguments to `create_brand` via keyword arguments. Note that at
|
243
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
244
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
245
|
+
#
|
246
|
+
# @param parent [::String]
|
247
|
+
# Required. GCP Project number/id under which the brand is to be created.
|
248
|
+
# In the following format: projects/\\{project_number/id}.
|
249
|
+
# @param brand [::Google::Cloud::Iap::V1::Brand, ::Hash]
|
250
|
+
# Required. The brand to be created.
|
251
|
+
#
|
252
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
253
|
+
# @yieldparam response [::Google::Cloud::Iap::V1::Brand]
|
254
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
255
|
+
#
|
256
|
+
# @return [::Google::Cloud::Iap::V1::Brand]
|
257
|
+
#
|
258
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
259
|
+
#
|
260
|
+
def create_brand request, options = nil
|
261
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
262
|
+
|
263
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Iap::V1::CreateBrandRequest
|
264
|
+
|
265
|
+
# Converts hash and nil to an options object
|
266
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
267
|
+
|
268
|
+
# Customize the options with defaults
|
269
|
+
metadata = @config.rpcs.create_brand.metadata.to_h
|
270
|
+
|
271
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
272
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
273
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
274
|
+
gapic_version: ::Google::Cloud::Iap::V1::VERSION
|
275
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
276
|
+
|
277
|
+
header_params = {
|
278
|
+
"parent" => request.parent
|
279
|
+
}
|
280
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
281
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
282
|
+
|
283
|
+
options.apply_defaults timeout: @config.rpcs.create_brand.timeout,
|
284
|
+
metadata: metadata,
|
285
|
+
retry_policy: @config.rpcs.create_brand.retry_policy
|
286
|
+
options.apply_defaults metadata: @config.metadata,
|
287
|
+
retry_policy: @config.retry_policy
|
288
|
+
|
289
|
+
@identity_aware_proxy_o_auth_service_stub.call_rpc :create_brand, request, options: options do |response, operation|
|
290
|
+
yield response, operation if block_given?
|
291
|
+
return response
|
292
|
+
end
|
293
|
+
rescue ::GRPC::BadStatus => e
|
294
|
+
raise ::Google::Cloud::Error.from_error(e)
|
295
|
+
end
|
296
|
+
|
297
|
+
##
|
298
|
+
# Retrieves the OAuth brand of the project.
|
299
|
+
#
|
300
|
+
# @overload get_brand(request, options = nil)
|
301
|
+
# Pass arguments to `get_brand` via a request object, either of type
|
302
|
+
# {::Google::Cloud::Iap::V1::GetBrandRequest} or an equivalent Hash.
|
303
|
+
#
|
304
|
+
# @param request [::Google::Cloud::Iap::V1::GetBrandRequest, ::Hash]
|
305
|
+
# A request object representing the call parameters. Required. To specify no
|
306
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
307
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
308
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
309
|
+
#
|
310
|
+
# @overload get_brand(name: nil)
|
311
|
+
# Pass arguments to `get_brand` via keyword arguments. Note that at
|
312
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
313
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
314
|
+
#
|
315
|
+
# @param name [::String]
|
316
|
+
# Required. Name of the brand to be fetched.
|
317
|
+
# In the following format: projects/\\{project_number/id}/brands/\\{brand}.
|
318
|
+
#
|
319
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
320
|
+
# @yieldparam response [::Google::Cloud::Iap::V1::Brand]
|
321
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
322
|
+
#
|
323
|
+
# @return [::Google::Cloud::Iap::V1::Brand]
|
324
|
+
#
|
325
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
326
|
+
#
|
327
|
+
def get_brand request, options = nil
|
328
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
329
|
+
|
330
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Iap::V1::GetBrandRequest
|
331
|
+
|
332
|
+
# Converts hash and nil to an options object
|
333
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
334
|
+
|
335
|
+
# Customize the options with defaults
|
336
|
+
metadata = @config.rpcs.get_brand.metadata.to_h
|
337
|
+
|
338
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
339
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
340
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
341
|
+
gapic_version: ::Google::Cloud::Iap::V1::VERSION
|
342
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
343
|
+
|
344
|
+
header_params = {
|
345
|
+
"name" => request.name
|
346
|
+
}
|
347
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
348
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
349
|
+
|
350
|
+
options.apply_defaults timeout: @config.rpcs.get_brand.timeout,
|
351
|
+
metadata: metadata,
|
352
|
+
retry_policy: @config.rpcs.get_brand.retry_policy
|
353
|
+
options.apply_defaults metadata: @config.metadata,
|
354
|
+
retry_policy: @config.retry_policy
|
355
|
+
|
356
|
+
@identity_aware_proxy_o_auth_service_stub.call_rpc :get_brand, request, options: options do |response, operation|
|
357
|
+
yield response, operation if block_given?
|
358
|
+
return response
|
359
|
+
end
|
360
|
+
rescue ::GRPC::BadStatus => e
|
361
|
+
raise ::Google::Cloud::Error.from_error(e)
|
362
|
+
end
|
363
|
+
|
364
|
+
##
|
365
|
+
# Creates an Identity Aware Proxy (IAP) OAuth client. The client is owned
|
366
|
+
# by IAP. Requires that the brand for the project exists and that it is
|
367
|
+
# set for internal-only use.
|
368
|
+
#
|
369
|
+
# @overload create_identity_aware_proxy_client(request, options = nil)
|
370
|
+
# Pass arguments to `create_identity_aware_proxy_client` via a request object, either of type
|
371
|
+
# {::Google::Cloud::Iap::V1::CreateIdentityAwareProxyClientRequest} or an equivalent Hash.
|
372
|
+
#
|
373
|
+
# @param request [::Google::Cloud::Iap::V1::CreateIdentityAwareProxyClientRequest, ::Hash]
|
374
|
+
# A request object representing the call parameters. Required. To specify no
|
375
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
376
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
377
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
378
|
+
#
|
379
|
+
# @overload create_identity_aware_proxy_client(parent: nil, identity_aware_proxy_client: nil)
|
380
|
+
# Pass arguments to `create_identity_aware_proxy_client` via keyword arguments. Note that at
|
381
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
382
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
383
|
+
#
|
384
|
+
# @param parent [::String]
|
385
|
+
# Required. Path to create the client in.
|
386
|
+
# In the following format:
|
387
|
+
# projects/\\{project_number/id}/brands/\\{brand}.
|
388
|
+
# The project must belong to a G Suite account.
|
389
|
+
# @param identity_aware_proxy_client [::Google::Cloud::Iap::V1::IdentityAwareProxyClient, ::Hash]
|
390
|
+
# Required. Identity Aware Proxy Client to be created.
|
391
|
+
#
|
392
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
393
|
+
# @yieldparam response [::Google::Cloud::Iap::V1::IdentityAwareProxyClient]
|
394
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
395
|
+
#
|
396
|
+
# @return [::Google::Cloud::Iap::V1::IdentityAwareProxyClient]
|
397
|
+
#
|
398
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
399
|
+
#
|
400
|
+
def create_identity_aware_proxy_client request, options = nil
|
401
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
402
|
+
|
403
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Iap::V1::CreateIdentityAwareProxyClientRequest
|
404
|
+
|
405
|
+
# Converts hash and nil to an options object
|
406
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
407
|
+
|
408
|
+
# Customize the options with defaults
|
409
|
+
metadata = @config.rpcs.create_identity_aware_proxy_client.metadata.to_h
|
410
|
+
|
411
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
412
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
413
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
414
|
+
gapic_version: ::Google::Cloud::Iap::V1::VERSION
|
415
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
416
|
+
|
417
|
+
header_params = {
|
418
|
+
"parent" => request.parent
|
419
|
+
}
|
420
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
421
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
422
|
+
|
423
|
+
options.apply_defaults timeout: @config.rpcs.create_identity_aware_proxy_client.timeout,
|
424
|
+
metadata: metadata,
|
425
|
+
retry_policy: @config.rpcs.create_identity_aware_proxy_client.retry_policy
|
426
|
+
options.apply_defaults metadata: @config.metadata,
|
427
|
+
retry_policy: @config.retry_policy
|
428
|
+
|
429
|
+
@identity_aware_proxy_o_auth_service_stub.call_rpc :create_identity_aware_proxy_client, request, options: options do |response, operation|
|
430
|
+
yield response, operation if block_given?
|
431
|
+
return response
|
432
|
+
end
|
433
|
+
rescue ::GRPC::BadStatus => e
|
434
|
+
raise ::Google::Cloud::Error.from_error(e)
|
435
|
+
end
|
436
|
+
|
437
|
+
##
|
438
|
+
# Lists the existing clients for the brand.
|
439
|
+
#
|
440
|
+
# @overload list_identity_aware_proxy_clients(request, options = nil)
|
441
|
+
# Pass arguments to `list_identity_aware_proxy_clients` via a request object, either of type
|
442
|
+
# {::Google::Cloud::Iap::V1::ListIdentityAwareProxyClientsRequest} or an equivalent Hash.
|
443
|
+
#
|
444
|
+
# @param request [::Google::Cloud::Iap::V1::ListIdentityAwareProxyClientsRequest, ::Hash]
|
445
|
+
# A request object representing the call parameters. Required. To specify no
|
446
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
447
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
448
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
449
|
+
#
|
450
|
+
# @overload list_identity_aware_proxy_clients(parent: nil, page_size: nil, page_token: nil)
|
451
|
+
# Pass arguments to `list_identity_aware_proxy_clients` via keyword arguments. Note that at
|
452
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
453
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
454
|
+
#
|
455
|
+
# @param parent [::String]
|
456
|
+
# Required. Full brand path.
|
457
|
+
# In the following format: projects/\\{project_number/id}/brands/\\{brand}.
|
458
|
+
# @param page_size [::Integer]
|
459
|
+
# The maximum number of clients to return. The service may return fewer than
|
460
|
+
# this value.
|
461
|
+
# If unspecified, at most 100 clients will be returned.
|
462
|
+
# The maximum value is 1000; values above 1000 will be coerced to 1000.
|
463
|
+
# @param page_token [::String]
|
464
|
+
# A page token, received from a previous `ListIdentityAwareProxyClients`
|
465
|
+
# call. Provide this to retrieve the subsequent page.
|
466
|
+
#
|
467
|
+
# When paginating, all other parameters provided to
|
468
|
+
# `ListIdentityAwareProxyClients` must match the call that provided the page
|
469
|
+
# token.
|
470
|
+
#
|
471
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
472
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Iap::V1::IdentityAwareProxyClient>]
|
473
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
474
|
+
#
|
475
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::Iap::V1::IdentityAwareProxyClient>]
|
476
|
+
#
|
477
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
478
|
+
#
|
479
|
+
def list_identity_aware_proxy_clients request, options = nil
|
480
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
481
|
+
|
482
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Iap::V1::ListIdentityAwareProxyClientsRequest
|
483
|
+
|
484
|
+
# Converts hash and nil to an options object
|
485
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
486
|
+
|
487
|
+
# Customize the options with defaults
|
488
|
+
metadata = @config.rpcs.list_identity_aware_proxy_clients.metadata.to_h
|
489
|
+
|
490
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
491
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
492
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
493
|
+
gapic_version: ::Google::Cloud::Iap::V1::VERSION
|
494
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
495
|
+
|
496
|
+
header_params = {
|
497
|
+
"parent" => request.parent
|
498
|
+
}
|
499
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
500
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
501
|
+
|
502
|
+
options.apply_defaults timeout: @config.rpcs.list_identity_aware_proxy_clients.timeout,
|
503
|
+
metadata: metadata,
|
504
|
+
retry_policy: @config.rpcs.list_identity_aware_proxy_clients.retry_policy
|
505
|
+
options.apply_defaults metadata: @config.metadata,
|
506
|
+
retry_policy: @config.retry_policy
|
507
|
+
|
508
|
+
@identity_aware_proxy_o_auth_service_stub.call_rpc :list_identity_aware_proxy_clients, request, options: options do |response, operation|
|
509
|
+
response = ::Gapic::PagedEnumerable.new @identity_aware_proxy_o_auth_service_stub, :list_identity_aware_proxy_clients, request, response, operation, options
|
510
|
+
yield response, operation if block_given?
|
511
|
+
return response
|
512
|
+
end
|
513
|
+
rescue ::GRPC::BadStatus => e
|
514
|
+
raise ::Google::Cloud::Error.from_error(e)
|
515
|
+
end
|
516
|
+
|
517
|
+
##
|
518
|
+
# Retrieves an Identity Aware Proxy (IAP) OAuth client.
|
519
|
+
# Requires that the client is owned by IAP.
|
520
|
+
#
|
521
|
+
# @overload get_identity_aware_proxy_client(request, options = nil)
|
522
|
+
# Pass arguments to `get_identity_aware_proxy_client` via a request object, either of type
|
523
|
+
# {::Google::Cloud::Iap::V1::GetIdentityAwareProxyClientRequest} or an equivalent Hash.
|
524
|
+
#
|
525
|
+
# @param request [::Google::Cloud::Iap::V1::GetIdentityAwareProxyClientRequest, ::Hash]
|
526
|
+
# A request object representing the call parameters. Required. To specify no
|
527
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
528
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
529
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
530
|
+
#
|
531
|
+
# @overload get_identity_aware_proxy_client(name: nil)
|
532
|
+
# Pass arguments to `get_identity_aware_proxy_client` via keyword arguments. Note that at
|
533
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
534
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
535
|
+
#
|
536
|
+
# @param name [::String]
|
537
|
+
# Required. Name of the Identity Aware Proxy client to be fetched.
|
538
|
+
# In the following format:
|
539
|
+
# projects/\\{project_number/id}/brands/\\{brand}/identityAwareProxyClients/\\{client_id}.
|
540
|
+
#
|
541
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
542
|
+
# @yieldparam response [::Google::Cloud::Iap::V1::IdentityAwareProxyClient]
|
543
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
544
|
+
#
|
545
|
+
# @return [::Google::Cloud::Iap::V1::IdentityAwareProxyClient]
|
546
|
+
#
|
547
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
548
|
+
#
|
549
|
+
def get_identity_aware_proxy_client request, options = nil
|
550
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
551
|
+
|
552
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Iap::V1::GetIdentityAwareProxyClientRequest
|
553
|
+
|
554
|
+
# Converts hash and nil to an options object
|
555
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
556
|
+
|
557
|
+
# Customize the options with defaults
|
558
|
+
metadata = @config.rpcs.get_identity_aware_proxy_client.metadata.to_h
|
559
|
+
|
560
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
561
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
562
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
563
|
+
gapic_version: ::Google::Cloud::Iap::V1::VERSION
|
564
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
565
|
+
|
566
|
+
header_params = {
|
567
|
+
"name" => request.name
|
568
|
+
}
|
569
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
570
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
571
|
+
|
572
|
+
options.apply_defaults timeout: @config.rpcs.get_identity_aware_proxy_client.timeout,
|
573
|
+
metadata: metadata,
|
574
|
+
retry_policy: @config.rpcs.get_identity_aware_proxy_client.retry_policy
|
575
|
+
options.apply_defaults metadata: @config.metadata,
|
576
|
+
retry_policy: @config.retry_policy
|
577
|
+
|
578
|
+
@identity_aware_proxy_o_auth_service_stub.call_rpc :get_identity_aware_proxy_client, request, options: options do |response, operation|
|
579
|
+
yield response, operation if block_given?
|
580
|
+
return response
|
581
|
+
end
|
582
|
+
rescue ::GRPC::BadStatus => e
|
583
|
+
raise ::Google::Cloud::Error.from_error(e)
|
584
|
+
end
|
585
|
+
|
586
|
+
##
|
587
|
+
# Resets an Identity Aware Proxy (IAP) OAuth client secret. Useful if the
|
588
|
+
# secret was compromised. Requires that the client is owned by IAP.
|
589
|
+
#
|
590
|
+
# @overload reset_identity_aware_proxy_client_secret(request, options = nil)
|
591
|
+
# Pass arguments to `reset_identity_aware_proxy_client_secret` via a request object, either of type
|
592
|
+
# {::Google::Cloud::Iap::V1::ResetIdentityAwareProxyClientSecretRequest} or an equivalent Hash.
|
593
|
+
#
|
594
|
+
# @param request [::Google::Cloud::Iap::V1::ResetIdentityAwareProxyClientSecretRequest, ::Hash]
|
595
|
+
# A request object representing the call parameters. Required. To specify no
|
596
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
597
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
598
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
599
|
+
#
|
600
|
+
# @overload reset_identity_aware_proxy_client_secret(name: nil)
|
601
|
+
# Pass arguments to `reset_identity_aware_proxy_client_secret` via keyword arguments. Note that at
|
602
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
603
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
604
|
+
#
|
605
|
+
# @param name [::String]
|
606
|
+
# Required. Name of the Identity Aware Proxy client to that will have its
|
607
|
+
# secret reset. In the following format:
|
608
|
+
# projects/\\{project_number/id}/brands/\\{brand}/identityAwareProxyClients/\\{client_id}.
|
609
|
+
#
|
610
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
611
|
+
# @yieldparam response [::Google::Cloud::Iap::V1::IdentityAwareProxyClient]
|
612
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
613
|
+
#
|
614
|
+
# @return [::Google::Cloud::Iap::V1::IdentityAwareProxyClient]
|
615
|
+
#
|
616
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
617
|
+
#
|
618
|
+
def reset_identity_aware_proxy_client_secret request, options = nil
|
619
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
620
|
+
|
621
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Iap::V1::ResetIdentityAwareProxyClientSecretRequest
|
622
|
+
|
623
|
+
# Converts hash and nil to an options object
|
624
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
625
|
+
|
626
|
+
# Customize the options with defaults
|
627
|
+
metadata = @config.rpcs.reset_identity_aware_proxy_client_secret.metadata.to_h
|
628
|
+
|
629
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
630
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
631
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
632
|
+
gapic_version: ::Google::Cloud::Iap::V1::VERSION
|
633
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
634
|
+
|
635
|
+
header_params = {
|
636
|
+
"name" => request.name
|
637
|
+
}
|
638
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
639
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
640
|
+
|
641
|
+
options.apply_defaults timeout: @config.rpcs.reset_identity_aware_proxy_client_secret.timeout,
|
642
|
+
metadata: metadata,
|
643
|
+
retry_policy: @config.rpcs.reset_identity_aware_proxy_client_secret.retry_policy
|
644
|
+
options.apply_defaults metadata: @config.metadata,
|
645
|
+
retry_policy: @config.retry_policy
|
646
|
+
|
647
|
+
@identity_aware_proxy_o_auth_service_stub.call_rpc :reset_identity_aware_proxy_client_secret, request, options: options do |response, operation|
|
648
|
+
yield response, operation if block_given?
|
649
|
+
return response
|
650
|
+
end
|
651
|
+
rescue ::GRPC::BadStatus => e
|
652
|
+
raise ::Google::Cloud::Error.from_error(e)
|
653
|
+
end
|
654
|
+
|
655
|
+
##
|
656
|
+
# Deletes an Identity Aware Proxy (IAP) OAuth client. Useful for removing
|
657
|
+
# obsolete clients, managing the number of clients in a given project, and
|
658
|
+
# cleaning up after tests. Requires that the client is owned by IAP.
|
659
|
+
#
|
660
|
+
# @overload delete_identity_aware_proxy_client(request, options = nil)
|
661
|
+
# Pass arguments to `delete_identity_aware_proxy_client` via a request object, either of type
|
662
|
+
# {::Google::Cloud::Iap::V1::DeleteIdentityAwareProxyClientRequest} or an equivalent Hash.
|
663
|
+
#
|
664
|
+
# @param request [::Google::Cloud::Iap::V1::DeleteIdentityAwareProxyClientRequest, ::Hash]
|
665
|
+
# A request object representing the call parameters. Required. To specify no
|
666
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
667
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
668
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
669
|
+
#
|
670
|
+
# @overload delete_identity_aware_proxy_client(name: nil)
|
671
|
+
# Pass arguments to `delete_identity_aware_proxy_client` via keyword arguments. Note that at
|
672
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
673
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
674
|
+
#
|
675
|
+
# @param name [::String]
|
676
|
+
# Required. Name of the Identity Aware Proxy client to be deleted.
|
677
|
+
# In the following format:
|
678
|
+
# projects/\\{project_number/id}/brands/\\{brand}/identityAwareProxyClients/\\{client_id}.
|
679
|
+
#
|
680
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
681
|
+
# @yieldparam response [::Google::Protobuf::Empty]
|
682
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
683
|
+
#
|
684
|
+
# @return [::Google::Protobuf::Empty]
|
685
|
+
#
|
686
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
687
|
+
#
|
688
|
+
def delete_identity_aware_proxy_client request, options = nil
|
689
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
690
|
+
|
691
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Iap::V1::DeleteIdentityAwareProxyClientRequest
|
692
|
+
|
693
|
+
# Converts hash and nil to an options object
|
694
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
695
|
+
|
696
|
+
# Customize the options with defaults
|
697
|
+
metadata = @config.rpcs.delete_identity_aware_proxy_client.metadata.to_h
|
698
|
+
|
699
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
700
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
701
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
702
|
+
gapic_version: ::Google::Cloud::Iap::V1::VERSION
|
703
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
704
|
+
|
705
|
+
header_params = {
|
706
|
+
"name" => request.name
|
707
|
+
}
|
708
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
709
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
710
|
+
|
711
|
+
options.apply_defaults timeout: @config.rpcs.delete_identity_aware_proxy_client.timeout,
|
712
|
+
metadata: metadata,
|
713
|
+
retry_policy: @config.rpcs.delete_identity_aware_proxy_client.retry_policy
|
714
|
+
options.apply_defaults metadata: @config.metadata,
|
715
|
+
retry_policy: @config.retry_policy
|
716
|
+
|
717
|
+
@identity_aware_proxy_o_auth_service_stub.call_rpc :delete_identity_aware_proxy_client, request, options: options do |response, operation|
|
718
|
+
yield response, operation if block_given?
|
719
|
+
return response
|
720
|
+
end
|
721
|
+
rescue ::GRPC::BadStatus => e
|
722
|
+
raise ::Google::Cloud::Error.from_error(e)
|
723
|
+
end
|
724
|
+
|
725
|
+
##
|
726
|
+
# Configuration class for the IdentityAwareProxyOAuthService API.
|
727
|
+
#
|
728
|
+
# This class represents the configuration for IdentityAwareProxyOAuthService,
|
729
|
+
# providing control over timeouts, retry behavior, logging, transport
|
730
|
+
# parameters, and other low-level controls. Certain parameters can also be
|
731
|
+
# applied individually to specific RPCs. See
|
732
|
+
# {::Google::Cloud::Iap::V1::IdentityAwareProxyOAuthService::Client::Configuration::Rpcs}
|
733
|
+
# for a list of RPCs that can be configured independently.
|
734
|
+
#
|
735
|
+
# Configuration can be applied globally to all clients, or to a single client
|
736
|
+
# on construction.
|
737
|
+
#
|
738
|
+
# # Examples
|
739
|
+
#
|
740
|
+
# To modify the global config, setting the timeout for list_brands
|
741
|
+
# to 20 seconds, and all remaining timeouts to 10 seconds:
|
742
|
+
#
|
743
|
+
# ::Google::Cloud::Iap::V1::IdentityAwareProxyOAuthService::Client.configure do |config|
|
744
|
+
# config.timeout = 10.0
|
745
|
+
# config.rpcs.list_brands.timeout = 20.0
|
746
|
+
# end
|
747
|
+
#
|
748
|
+
# To apply the above configuration only to a new client:
|
749
|
+
#
|
750
|
+
# client = ::Google::Cloud::Iap::V1::IdentityAwareProxyOAuthService::Client.new do |config|
|
751
|
+
# config.timeout = 10.0
|
752
|
+
# config.rpcs.list_brands.timeout = 20.0
|
753
|
+
# end
|
754
|
+
#
|
755
|
+
# @!attribute [rw] endpoint
|
756
|
+
# The hostname or hostname:port of the service endpoint.
|
757
|
+
# Defaults to `"iap.googleapis.com"`.
|
758
|
+
# @return [::String]
|
759
|
+
# @!attribute [rw] credentials
|
760
|
+
# Credentials to send with calls. You may provide any of the following types:
|
761
|
+
# * (`String`) The path to a service account key file in JSON format
|
762
|
+
# * (`Hash`) A service account key as a Hash
|
763
|
+
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
764
|
+
# (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
|
765
|
+
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
766
|
+
# (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
|
767
|
+
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
768
|
+
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
769
|
+
# * (`nil`) indicating no credentials
|
770
|
+
# @return [::Object]
|
771
|
+
# @!attribute [rw] scope
|
772
|
+
# The OAuth scopes
|
773
|
+
# @return [::Array<::String>]
|
774
|
+
# @!attribute [rw] lib_name
|
775
|
+
# The library name as recorded in instrumentation and logging
|
776
|
+
# @return [::String]
|
777
|
+
# @!attribute [rw] lib_version
|
778
|
+
# The library version as recorded in instrumentation and logging
|
779
|
+
# @return [::String]
|
780
|
+
# @!attribute [rw] channel_args
|
781
|
+
# Extra parameters passed to the gRPC channel. Note: this is ignored if a
|
782
|
+
# `GRPC::Core::Channel` object is provided as the credential.
|
783
|
+
# @return [::Hash]
|
784
|
+
# @!attribute [rw] interceptors
|
785
|
+
# An array of interceptors that are run before calls are executed.
|
786
|
+
# @return [::Array<::GRPC::ClientInterceptor>]
|
787
|
+
# @!attribute [rw] timeout
|
788
|
+
# The call timeout in seconds.
|
789
|
+
# @return [::Numeric]
|
790
|
+
# @!attribute [rw] metadata
|
791
|
+
# Additional gRPC headers to be sent with the call.
|
792
|
+
# @return [::Hash{::Symbol=>::String}]
|
793
|
+
# @!attribute [rw] retry_policy
|
794
|
+
# The retry policy. The value is a hash with the following keys:
|
795
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
796
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
797
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
798
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
799
|
+
# trigger a retry.
|
800
|
+
# @return [::Hash]
|
801
|
+
# @!attribute [rw] quota_project
|
802
|
+
# A separate project against which to charge quota.
|
803
|
+
# @return [::String]
|
804
|
+
#
|
805
|
+
class Configuration
|
806
|
+
extend ::Gapic::Config
|
807
|
+
|
808
|
+
config_attr :endpoint, "iap.googleapis.com", ::String
|
809
|
+
config_attr :credentials, nil do |value|
|
810
|
+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
811
|
+
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
812
|
+
allowed.any? { |klass| klass === value }
|
813
|
+
end
|
814
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
815
|
+
config_attr :lib_name, nil, ::String, nil
|
816
|
+
config_attr :lib_version, nil, ::String, nil
|
817
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
|
818
|
+
config_attr :interceptors, nil, ::Array, nil
|
819
|
+
config_attr :timeout, nil, ::Numeric, nil
|
820
|
+
config_attr :metadata, nil, ::Hash, nil
|
821
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
822
|
+
config_attr :quota_project, nil, ::String, nil
|
823
|
+
|
824
|
+
# @private
|
825
|
+
def initialize parent_config = nil
|
826
|
+
@parent_config = parent_config unless parent_config.nil?
|
827
|
+
|
828
|
+
yield self if block_given?
|
829
|
+
end
|
830
|
+
|
831
|
+
##
|
832
|
+
# Configurations for individual RPCs
|
833
|
+
# @return [Rpcs]
|
834
|
+
#
|
835
|
+
def rpcs
|
836
|
+
@rpcs ||= begin
|
837
|
+
parent_rpcs = nil
|
838
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
839
|
+
Rpcs.new parent_rpcs
|
840
|
+
end
|
841
|
+
end
|
842
|
+
|
843
|
+
##
|
844
|
+
# Configuration RPC class for the IdentityAwareProxyOAuthService API.
|
845
|
+
#
|
846
|
+
# Includes fields providing the configuration for each RPC in this service.
|
847
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
848
|
+
# the following configuration fields:
|
849
|
+
#
|
850
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
851
|
+
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
|
852
|
+
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
853
|
+
# include the following keys:
|
854
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
855
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
856
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
857
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
858
|
+
# trigger a retry.
|
859
|
+
#
|
860
|
+
class Rpcs
|
861
|
+
##
|
862
|
+
# RPC-specific configuration for `list_brands`
|
863
|
+
# @return [::Gapic::Config::Method]
|
864
|
+
#
|
865
|
+
attr_reader :list_brands
|
866
|
+
##
|
867
|
+
# RPC-specific configuration for `create_brand`
|
868
|
+
# @return [::Gapic::Config::Method]
|
869
|
+
#
|
870
|
+
attr_reader :create_brand
|
871
|
+
##
|
872
|
+
# RPC-specific configuration for `get_brand`
|
873
|
+
# @return [::Gapic::Config::Method]
|
874
|
+
#
|
875
|
+
attr_reader :get_brand
|
876
|
+
##
|
877
|
+
# RPC-specific configuration for `create_identity_aware_proxy_client`
|
878
|
+
# @return [::Gapic::Config::Method]
|
879
|
+
#
|
880
|
+
attr_reader :create_identity_aware_proxy_client
|
881
|
+
##
|
882
|
+
# RPC-specific configuration for `list_identity_aware_proxy_clients`
|
883
|
+
# @return [::Gapic::Config::Method]
|
884
|
+
#
|
885
|
+
attr_reader :list_identity_aware_proxy_clients
|
886
|
+
##
|
887
|
+
# RPC-specific configuration for `get_identity_aware_proxy_client`
|
888
|
+
# @return [::Gapic::Config::Method]
|
889
|
+
#
|
890
|
+
attr_reader :get_identity_aware_proxy_client
|
891
|
+
##
|
892
|
+
# RPC-specific configuration for `reset_identity_aware_proxy_client_secret`
|
893
|
+
# @return [::Gapic::Config::Method]
|
894
|
+
#
|
895
|
+
attr_reader :reset_identity_aware_proxy_client_secret
|
896
|
+
##
|
897
|
+
# RPC-specific configuration for `delete_identity_aware_proxy_client`
|
898
|
+
# @return [::Gapic::Config::Method]
|
899
|
+
#
|
900
|
+
attr_reader :delete_identity_aware_proxy_client
|
901
|
+
|
902
|
+
# @private
|
903
|
+
def initialize parent_rpcs = nil
|
904
|
+
list_brands_config = parent_rpcs.list_brands if parent_rpcs.respond_to? :list_brands
|
905
|
+
@list_brands = ::Gapic::Config::Method.new list_brands_config
|
906
|
+
create_brand_config = parent_rpcs.create_brand if parent_rpcs.respond_to? :create_brand
|
907
|
+
@create_brand = ::Gapic::Config::Method.new create_brand_config
|
908
|
+
get_brand_config = parent_rpcs.get_brand if parent_rpcs.respond_to? :get_brand
|
909
|
+
@get_brand = ::Gapic::Config::Method.new get_brand_config
|
910
|
+
create_identity_aware_proxy_client_config = parent_rpcs.create_identity_aware_proxy_client if parent_rpcs.respond_to? :create_identity_aware_proxy_client
|
911
|
+
@create_identity_aware_proxy_client = ::Gapic::Config::Method.new create_identity_aware_proxy_client_config
|
912
|
+
list_identity_aware_proxy_clients_config = parent_rpcs.list_identity_aware_proxy_clients if parent_rpcs.respond_to? :list_identity_aware_proxy_clients
|
913
|
+
@list_identity_aware_proxy_clients = ::Gapic::Config::Method.new list_identity_aware_proxy_clients_config
|
914
|
+
get_identity_aware_proxy_client_config = parent_rpcs.get_identity_aware_proxy_client if parent_rpcs.respond_to? :get_identity_aware_proxy_client
|
915
|
+
@get_identity_aware_proxy_client = ::Gapic::Config::Method.new get_identity_aware_proxy_client_config
|
916
|
+
reset_identity_aware_proxy_client_secret_config = parent_rpcs.reset_identity_aware_proxy_client_secret if parent_rpcs.respond_to? :reset_identity_aware_proxy_client_secret
|
917
|
+
@reset_identity_aware_proxy_client_secret = ::Gapic::Config::Method.new reset_identity_aware_proxy_client_secret_config
|
918
|
+
delete_identity_aware_proxy_client_config = parent_rpcs.delete_identity_aware_proxy_client if parent_rpcs.respond_to? :delete_identity_aware_proxy_client
|
919
|
+
@delete_identity_aware_proxy_client = ::Gapic::Config::Method.new delete_identity_aware_proxy_client_config
|
920
|
+
|
921
|
+
yield self if block_given?
|
922
|
+
end
|
923
|
+
end
|
924
|
+
end
|
925
|
+
end
|
926
|
+
end
|
927
|
+
end
|
928
|
+
end
|
929
|
+
end
|
930
|
+
end
|