google-cloud-orchestration-airflow-service-v1 0.7.0 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -32,6 +32,9 @@ module Google
32
32
  # Readonly service to query available ImageVersions.
33
33
  #
34
34
  class Client
35
+ # @private
36
+ DEFAULT_ENDPOINT_TEMPLATE = "composer.$UNIVERSE_DOMAIN$"
37
+
35
38
  # @private
36
39
  attr_reader :image_versions_stub
37
40
 
@@ -90,6 +93,15 @@ module Google
90
93
  @config
91
94
  end
92
95
 
96
+ ##
97
+ # The effective universe domain
98
+ #
99
+ # @return [String]
100
+ #
101
+ def universe_domain
102
+ @image_versions_stub.universe_domain
103
+ end
104
+
93
105
  ##
94
106
  # Create a new ImageVersions client object.
95
107
  #
@@ -123,8 +135,9 @@ module Google
123
135
  credentials = @config.credentials
124
136
  # Use self-signed JWT if the endpoint is unchanged from default,
125
137
  # but only if the default endpoint does not have a region prefix.
126
- enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
127
- !@config.endpoint.split(".").first.include?("-")
138
+ enable_self_signed_jwt = @config.endpoint.nil? ||
139
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
140
+ !@config.endpoint.split(".").first.include?("-"))
128
141
  credentials ||= Credentials.default scope: @config.scope,
129
142
  enable_self_signed_jwt: enable_self_signed_jwt
130
143
  if credentials.is_a?(::String) || credentials.is_a?(::Hash)
@@ -135,10 +148,13 @@ module Google
135
148
 
136
149
  @image_versions_stub = ::Gapic::ServiceStub.new(
137
150
  ::Google::Cloud::Orchestration::Airflow::Service::V1::ImageVersions::Stub,
138
- credentials: credentials,
139
- endpoint: @config.endpoint,
151
+ credentials: credentials,
152
+ endpoint: @config.endpoint,
153
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
154
+ universe_domain: @config.universe_domain,
140
155
  channel_args: @config.channel_args,
141
- interceptors: @config.interceptors
156
+ interceptors: @config.interceptors,
157
+ channel_pool_config: @config.channel_pool
142
158
  )
143
159
  end
144
160
 
@@ -271,9 +287,9 @@ module Google
271
287
  # end
272
288
  #
273
289
  # @!attribute [rw] endpoint
274
- # The hostname or hostname:port of the service endpoint.
275
- # Defaults to `"composer.googleapis.com"`.
276
- # @return [::String]
290
+ # A custom service endpoint, as a hostname or hostname:port. The default is
291
+ # nil, indicating to use the default endpoint in the current universe domain.
292
+ # @return [::String,nil]
277
293
  # @!attribute [rw] credentials
278
294
  # Credentials to send with calls. You may provide any of the following types:
279
295
  # * (`String`) The path to a service account key file in JSON format
@@ -319,13 +335,20 @@ module Google
319
335
  # @!attribute [rw] quota_project
320
336
  # A separate project against which to charge quota.
321
337
  # @return [::String]
338
+ # @!attribute [rw] universe_domain
339
+ # The universe domain within which to make requests. This determines the
340
+ # default endpoint URL. The default value of nil uses the environment
341
+ # universe (usually the default "googleapis.com" universe).
342
+ # @return [::String,nil]
322
343
  #
323
344
  class Configuration
324
345
  extend ::Gapic::Config
325
346
 
347
+ # @private
348
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
326
349
  DEFAULT_ENDPOINT = "composer.googleapis.com"
327
350
 
328
- config_attr :endpoint, DEFAULT_ENDPOINT, ::String
351
+ config_attr :endpoint, nil, ::String, nil
329
352
  config_attr :credentials, nil do |value|
330
353
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
331
354
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
@@ -340,6 +363,7 @@ module Google
340
363
  config_attr :metadata, nil, ::Hash, nil
341
364
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
342
365
  config_attr :quota_project, nil, ::String, nil
366
+ config_attr :universe_domain, nil, ::String, nil
343
367
 
344
368
  # @private
345
369
  def initialize parent_config = nil
@@ -360,6 +384,14 @@ module Google
360
384
  end
361
385
  end
362
386
 
387
+ ##
388
+ # Configuration for the channel pool
389
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
390
+ #
391
+ def channel_pool
392
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
393
+ end
394
+
363
395
  ##
364
396
  # Configuration RPC class for the ImageVersions API.
365
397
  #
@@ -34,6 +34,9 @@ module Google
34
34
  # Readonly service to query available ImageVersions.
35
35
  #
36
36
  class Client
37
+ # @private
38
+ DEFAULT_ENDPOINT_TEMPLATE = "composer.$UNIVERSE_DOMAIN$"
39
+
37
40
  # @private
38
41
  attr_reader :image_versions_stub
39
42
 
@@ -92,6 +95,15 @@ module Google
92
95
  @config
93
96
  end
94
97
 
98
+ ##
99
+ # The effective universe domain
100
+ #
101
+ # @return [String]
102
+ #
103
+ def universe_domain
104
+ @image_versions_stub.universe_domain
105
+ end
106
+
95
107
  ##
96
108
  # Create a new ImageVersions REST client object.
97
109
  #
@@ -119,8 +131,9 @@ module Google
119
131
  credentials = @config.credentials
120
132
  # Use self-signed JWT if the endpoint is unchanged from default,
121
133
  # but only if the default endpoint does not have a region prefix.
122
- enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
123
- !@config.endpoint.split(".").first.include?("-")
134
+ enable_self_signed_jwt = @config.endpoint.nil? ||
135
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
136
+ !@config.endpoint.split(".").first.include?("-"))
124
137
  credentials ||= Credentials.default scope: @config.scope,
125
138
  enable_self_signed_jwt: enable_self_signed_jwt
126
139
  if credentials.is_a?(::String) || credentials.is_a?(::Hash)
@@ -130,7 +143,12 @@ module Google
130
143
  @quota_project_id = @config.quota_project
131
144
  @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
132
145
 
133
- @image_versions_stub = ::Google::Cloud::Orchestration::Airflow::Service::V1::ImageVersions::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
146
+ @image_versions_stub = ::Google::Cloud::Orchestration::Airflow::Service::V1::ImageVersions::Rest::ServiceStub.new(
147
+ endpoint: @config.endpoint,
148
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
149
+ universe_domain: @config.universe_domain,
150
+ credentials: credentials
151
+ )
134
152
  end
135
153
 
136
154
  # Service calls
@@ -169,6 +187,26 @@ module Google
169
187
  # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Orchestration::Airflow::Service::V1::ImageVersion>]
170
188
  #
171
189
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
190
+ #
191
+ # @example Basic example
192
+ # require "google/cloud/orchestration/airflow/service/v1"
193
+ #
194
+ # # Create a client object. The client can be reused for multiple calls.
195
+ # client = Google::Cloud::Orchestration::Airflow::Service::V1::ImageVersions::Rest::Client.new
196
+ #
197
+ # # Create a request. To set request fields, pass in keyword arguments.
198
+ # request = Google::Cloud::Orchestration::Airflow::Service::V1::ListImageVersionsRequest.new
199
+ #
200
+ # # Call the list_image_versions method.
201
+ # result = client.list_image_versions request
202
+ #
203
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
204
+ # # over elements, and API calls will be issued to fetch pages as needed.
205
+ # result.each do |item|
206
+ # # Each element is of type ::Google::Cloud::Orchestration::Airflow::Service::V1::ImageVersion.
207
+ # p item
208
+ # end
209
+ #
172
210
  def list_image_versions request, options = nil
173
211
  raise ::ArgumentError, "request must be provided" if request.nil?
174
212
 
@@ -235,9 +273,9 @@ module Google
235
273
  # end
236
274
  #
237
275
  # @!attribute [rw] endpoint
238
- # The hostname or hostname:port of the service endpoint.
239
- # Defaults to `"composer.googleapis.com"`.
240
- # @return [::String]
276
+ # A custom service endpoint, as a hostname or hostname:port. The default is
277
+ # nil, indicating to use the default endpoint in the current universe domain.
278
+ # @return [::String,nil]
241
279
  # @!attribute [rw] credentials
242
280
  # Credentials to send with calls. You may provide any of the following types:
243
281
  # * (`String`) The path to a service account key file in JSON format
@@ -274,13 +312,20 @@ module Google
274
312
  # @!attribute [rw] quota_project
275
313
  # A separate project against which to charge quota.
276
314
  # @return [::String]
315
+ # @!attribute [rw] universe_domain
316
+ # The universe domain within which to make requests. This determines the
317
+ # default endpoint URL. The default value of nil uses the environment
318
+ # universe (usually the default "googleapis.com" universe).
319
+ # @return [::String,nil]
277
320
  #
278
321
  class Configuration
279
322
  extend ::Gapic::Config
280
323
 
324
+ # @private
325
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
281
326
  DEFAULT_ENDPOINT = "composer.googleapis.com"
282
327
 
283
- config_attr :endpoint, DEFAULT_ENDPOINT, ::String
328
+ config_attr :endpoint, nil, ::String, nil
284
329
  config_attr :credentials, nil do |value|
285
330
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
286
331
  allowed.any? { |klass| klass === value }
@@ -292,6 +337,7 @@ module Google
292
337
  config_attr :metadata, nil, ::Hash, nil
293
338
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
294
339
  config_attr :quota_project, nil, ::String, nil
340
+ config_attr :universe_domain, nil, ::String, nil
295
341
 
296
342
  # @private
297
343
  def initialize parent_config = nil
@@ -32,16 +32,28 @@ module Google
32
32
  # including transcoding, making the REST call, and deserialing the response.
33
33
  #
34
34
  class ServiceStub
35
- def initialize endpoint:, credentials:
35
+ def initialize endpoint:, endpoint_template:, universe_domain:, credentials:
36
36
  # These require statements are intentionally placed here to initialize
37
37
  # the REST modules only when it's required.
38
38
  require "gapic/rest"
39
39
 
40
- @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, credentials: credentials,
40
+ @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
41
+ endpoint_template: endpoint_template,
42
+ universe_domain: universe_domain,
43
+ credentials: credentials,
41
44
  numeric_enums: true,
42
45
  raise_faraday_errors: false
43
46
  end
44
47
 
48
+ ##
49
+ # The effective universe domain
50
+ #
51
+ # @return [String]
52
+ #
53
+ def universe_domain
54
+ @client_stub.universe_domain
55
+ end
56
+
45
57
  ##
46
58
  # Baseline implementation for the list_image_versions REST call
47
59
  #
@@ -23,7 +23,7 @@ module Google
23
23
  module Airflow
24
24
  module Service
25
25
  module V1
26
- VERSION = "0.7.0"
26
+ VERSION = "0.9.0"
27
27
  end
28
28
  end
29
29
  end
@@ -21,6 +21,7 @@ module Google
21
21
  module Api
22
22
  # Required information for every language.
23
23
  # @!attribute [rw] reference_docs_uri
24
+ # @deprecated This field is deprecated and may be removed in the next major version update.
24
25
  # @return [::String]
25
26
  # Link to automatically generated reference documentation. Example:
26
27
  # https://cloud.google.com/nodejs/docs/reference/asset/latest
@@ -304,6 +305,19 @@ module Google
304
305
  # seconds: 360 # 6 minutes
305
306
  # total_poll_timeout:
306
307
  # seconds: 54000 # 90 minutes
308
+ # @!attribute [rw] auto_populated_fields
309
+ # @return [::Array<::String>]
310
+ # List of top-level fields of the request message, that should be
311
+ # automatically populated by the client libraries based on their
312
+ # (google.api.field_info).format. Currently supported format: UUID4.
313
+ #
314
+ # Example of a YAML configuration:
315
+ #
316
+ # publishing:
317
+ # method_settings:
318
+ # - selector: google.example.v1.ExampleService.CreateExample
319
+ # auto_populated_fields:
320
+ # - request_id
307
321
  class MethodSettings
308
322
  include ::Google::Protobuf::MessageExts
309
323
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -66,6 +66,20 @@ module Google
66
66
  # a non-empty value will be returned. The user will not be aware of what
67
67
  # non-empty value to expect.
68
68
  NON_EMPTY_DEFAULT = 7
69
+
70
+ # Denotes that the field in a resource (a message annotated with
71
+ # google.api.resource) is used in the resource name to uniquely identify the
72
+ # resource. For AIP-compliant APIs, this should only be applied to the
73
+ # `name` field on the resource.
74
+ #
75
+ # This behavior should not be applied to references to other resources within
76
+ # the message.
77
+ #
78
+ # The identifier field of resources often have different field behavior
79
+ # depending on the request it is embedded in (e.g. for Create methods name
80
+ # is optional and unused, while for Update methods it is required). Instead
81
+ # of method-specific annotations, only `IDENTIFIER` is required.
82
+ IDENTIFIER = 8
69
83
  end
70
84
  end
71
85
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-orchestration-airflow-service-v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-06-16 00:00:00.000000000 Z
11
+ date: 2024-01-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.19.1
19
+ version: 0.21.1
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: 2.a
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: 0.19.1
29
+ version: 0.21.1
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.a
@@ -231,7 +231,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
231
231
  - !ruby/object:Gem::Version
232
232
  version: '0'
233
233
  requirements: []
234
- rubygems_version: 3.4.2
234
+ rubygems_version: 3.5.3
235
235
  signing_key:
236
236
  specification_version: 4
237
237
  summary: Manages Apache Airflow environments on Google Cloud Platform.