google-cloud-gke_hub-v1beta1 0.4.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5719911f694aee3b33fa77d735704aff86f303cbf707adc152e5409eabcdf507
4
- data.tar.gz: ac519d5d01a5b49a6d720458497d32acb0a856149b17dc6e39d0e714f898e0ed
3
+ metadata.gz: aea396b9d3aed7fcdfa11744a60abe2dfe4d5058ea55a736ecc2393661d1b78f
4
+ data.tar.gz: 668aeb6909ae5628bb35e87009a6ac2545bb7969abea3e90b47a238ae4faef82
5
5
  SHA512:
6
- metadata.gz: 1c00949f0abecfa12e926c707cbee15e25fcbe2f5516c928a099a266f6199dcca429428a00246b8f6967b585f7d5bb57dd07e552740a556eff3f47f0a5efe146
7
- data.tar.gz: 32654eb627900ac47573f22a3c3e844876c04be8ac80c4d56e25f3e58584169638c28dc990fa5dc9967593eba62363d844522114cf56357090acd55750ae58d7
6
+ metadata.gz: 1271ba2c481dbcd250ee3dc1e82ef0d594b453302afa254de186b315bec11b97855ed3051047959be2a8a6b924f58b4e7fd75f85431718b21cdad6bddd784fbd
7
+ data.tar.gz: 0bb748d09712b2dcda437cd00573fb7fe229f2de2cc5367d850d72476fa6c52e12b67365e2236bc3a8bee5df25ccd12ad138000727198d7fdc4c8d4d48a0d869
data/AUTHENTICATION.md CHANGED
@@ -114,7 +114,7 @@ credentials are discovered.
114
114
  To configure your system for this, simply:
115
115
 
116
116
  1. [Download and install the Cloud SDK](https://cloud.google.com/sdk)
117
- 2. Authenticate using OAuth 2.0 `$ gcloud auth login`
117
+ 2. Authenticate using OAuth 2.0 `$ gcloud auth application-default login`
118
118
  3. Write code as if already authenticated.
119
119
 
120
120
  **NOTE:** This is _not_ recommended for running in production. The Cloud SDK
data/README.md CHANGED
@@ -46,7 +46,7 @@ for general usage information.
46
46
  ## Enabling Logging
47
47
 
48
48
  To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
49
- The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib/libdoc/logger/rdoc/Logger.html) as shown below,
49
+ The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below,
50
50
  or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
51
51
  that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
52
52
  and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
@@ -76,14 +76,14 @@ To browse ready to use code samples check [Google Cloud Samples](https://cloud.g
76
76
 
77
77
  ## Supported Ruby Versions
78
78
 
79
- This library is supported on Ruby 2.5+.
79
+ This library is supported on Ruby 2.6+.
80
80
 
81
81
  Google provides official support for Ruby versions that are actively supported
82
82
  by Ruby Core—that is, Ruby versions that are either in normal maintenance or
83
- in security maintenance, and not end of life. Currently, this means Ruby 2.5
84
- and later. Older versions of Ruby _may_ still work, but are unsupported and not
85
- recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details
86
- about the Ruby support schedule.
83
+ in security maintenance, and not end of life. Older versions of Ruby _may_
84
+ still work, but are unsupported and not recommended. See
85
+ https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby
86
+ support schedule.
87
87
 
88
88
  ## Which client should I use?
89
89
 
@@ -0,0 +1,135 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 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/config"
20
+
21
+ module Google
22
+ module Cloud
23
+ module GkeHub
24
+ ##
25
+ # @example Loading just the REST part of this package, including all its services, and instantiating a REST client
26
+ #
27
+ # require "google/cloud/gke_hub/v1beta1/rest"
28
+ # client = ::Google::Cloud::GkeHub::V1beta1::GkeHubMembershipService::Rest::Client.new
29
+ #
30
+ module V1beta1
31
+ ##
32
+ # @private
33
+ # Initialize the mixin bindings configuration
34
+ #
35
+ def self.configure
36
+ @configure ||= begin
37
+ namespace = ["Google", "Cloud", "GkeHub"]
38
+ parent_config = while namespace.any?
39
+ parent_name = namespace.join "::"
40
+ parent_const = const_get parent_name
41
+ break parent_const.configure if parent_const.respond_to? :configure
42
+ namespace.pop
43
+ end
44
+
45
+ default_config = Configuration.new parent_config
46
+ default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [
47
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
48
+ uri_method: :get,
49
+ uri_template: "/v1beta1/{name}",
50
+ matches: [
51
+ ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
52
+ ],
53
+ body: nil
54
+ )
55
+ ]
56
+ default_config.bindings_override["google.cloud.location.Locations.ListLocations"] = [
57
+
58
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
59
+ uri_method: :get,
60
+ uri_template: "/v1beta1/{name}/locations",
61
+ matches: [
62
+ ["name", %r{^projects/[^/]+/?$}, false]
63
+ ],
64
+ body: nil
65
+ )
66
+ ]
67
+ default_config.bindings_override["google.iam.v1.IAMPolicy.GetIamPolicy"] = [
68
+
69
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
70
+ uri_method: :get,
71
+ uri_template: "/v1beta1/{resource}:getIamPolicy",
72
+ matches: [
73
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/memberships/[^/]+/?$}, false]
74
+ ],
75
+ body: nil
76
+ )
77
+ ]
78
+ default_config.bindings_override["google.iam.v1.IAMPolicy.SetIamPolicy"] = [
79
+
80
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
81
+ uri_method: :post,
82
+ uri_template: "/v1beta1/{resource}:setIamPolicy",
83
+ matches: [
84
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/memberships/[^/]+/?$}, false]
85
+ ],
86
+ body: "*"
87
+ )
88
+ ]
89
+ default_config.bindings_override["google.iam.v1.IAMPolicy.TestIamPermissions"] = [
90
+
91
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
92
+ uri_method: :post,
93
+ uri_template: "/v1beta1/{resource}:testIamPermissions",
94
+ matches: [
95
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/memberships/[^/]+/?$}, false]
96
+ ],
97
+ body: "*"
98
+ )
99
+ ]
100
+ default_config
101
+ end
102
+ yield @configure if block_given?
103
+ @configure
104
+ end
105
+
106
+ ##
107
+ # @private
108
+ # Configuration class for the google.cloud.gkehub.v1beta1 package.
109
+ #
110
+ # This class contains common configuration for all services
111
+ # of the google.cloud.gkehub.v1beta1 package.
112
+ #
113
+ # This configuration is for internal use of the client library classes,
114
+ # and it is not intended that the end-users will read or change it.
115
+ #
116
+ class Configuration
117
+ extend ::Gapic::Config
118
+
119
+ # @private
120
+ # Overrides for http bindings for the RPC of the mixins for this package.
121
+ # Services in this package should use these when creating clients for the mixin services.
122
+ # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
123
+ config_attr :bindings_override, {}, ::Hash, nil
124
+
125
+ # @private
126
+ def initialize parent_config = nil
127
+ @parent_config = parent_config unless parent_config.nil?
128
+
129
+ yield self if block_given?
130
+ end
131
+ end
132
+ end
133
+ end
134
+ end
135
+ end
@@ -19,7 +19,7 @@
19
19
  require "google/cloud/errors"
20
20
  require "google/cloud/gkehub/v1beta1/membership_pb"
21
21
  require "google/cloud/location"
22
- require "google/iam/v1/iam_policy"
22
+ require "google/iam/v1"
23
23
 
24
24
  module Google
25
25
  module Cloud
@@ -271,13 +271,11 @@ module Google
271
271
  # # Call the list_memberships method.
272
272
  # result = client.list_memberships request
273
273
  #
274
- # # The returned object is of type Gapic::PagedEnumerable. You can
275
- # # iterate over all elements by calling #each, and the enumerable
276
- # # will lazily make API calls to fetch subsequent pages. Other
277
- # # methods are also available for managing paging directly.
278
- # result.each do |response|
274
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
275
+ # # over elements, and API calls will be issued to fetch pages as needed.
276
+ # result.each do |item|
279
277
  # # Each element is of type ::Google::Cloud::GkeHub::V1beta1::Membership.
280
- # p response
278
+ # p item
281
279
  # end
282
280
  #
283
281
  def list_memberships request, options = nil
@@ -480,14 +478,14 @@ module Google
480
478
  # # Call the create_membership method.
481
479
  # result = client.create_membership request
482
480
  #
483
- # # The returned object is of type Gapic::Operation. You can use this
484
- # # object to check the status of an operation, cancel it, or wait
485
- # # for results. Here is how to block until completion:
481
+ # # The returned object is of type Gapic::Operation. You can use it to
482
+ # # check the status of an operation, cancel it, or wait for results.
483
+ # # Here is how to wait for a response.
486
484
  # result.wait_until_done! timeout: 60
487
485
  # if result.response?
488
486
  # p result.response
489
487
  # else
490
- # puts "Error!"
488
+ # puts "No response received."
491
489
  # end
492
490
  #
493
491
  def create_membership request, options = nil
@@ -592,14 +590,14 @@ module Google
592
590
  # # Call the delete_membership method.
593
591
  # result = client.delete_membership request
594
592
  #
595
- # # The returned object is of type Gapic::Operation. You can use this
596
- # # object to check the status of an operation, cancel it, or wait
597
- # # for results. Here is how to block until completion:
593
+ # # The returned object is of type Gapic::Operation. You can use it to
594
+ # # check the status of an operation, cancel it, or wait for results.
595
+ # # Here is how to wait for a response.
598
596
  # result.wait_until_done! timeout: 60
599
597
  # if result.response?
600
598
  # p result.response
601
599
  # else
602
- # puts "Error!"
600
+ # puts "No response received."
603
601
  # end
604
602
  #
605
603
  def delete_membership request, options = nil
@@ -712,14 +710,14 @@ module Google
712
710
  # # Call the update_membership method.
713
711
  # result = client.update_membership request
714
712
  #
715
- # # The returned object is of type Gapic::Operation. You can use this
716
- # # object to check the status of an operation, cancel it, or wait
717
- # # for results. Here is how to block until completion:
713
+ # # The returned object is of type Gapic::Operation. You can use it to
714
+ # # check the status of an operation, cancel it, or wait for results.
715
+ # # Here is how to wait for a response.
718
716
  # result.wait_until_done! timeout: 60
719
717
  # if result.response?
720
718
  # p result.response
721
719
  # else
722
- # puts "Error!"
720
+ # puts "No response received."
723
721
  # end
724
722
  #
725
723
  def update_membership request, options = nil
@@ -95,6 +95,9 @@ module Google
95
95
  channel_args: @config.channel_args,
96
96
  interceptors: @config.interceptors
97
97
  )
98
+
99
+ # Used by an LRO wrapper for some methods of this service
100
+ @operations_client = self
98
101
  end
99
102
 
100
103
  # Service calls
@@ -155,13 +158,11 @@ module Google
155
158
  # # Call the list_operations method.
156
159
  # result = client.list_operations request
157
160
  #
158
- # # The returned object is of type Gapic::PagedEnumerable. You can
159
- # # iterate over all elements by calling #each, and the enumerable
160
- # # will lazily make API calls to fetch subsequent pages. Other
161
- # # methods are also available for managing paging directly.
162
- # result.each do |response|
161
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
162
+ # # over elements, and API calls will be issued to fetch pages as needed.
163
+ # result.each do |item|
163
164
  # # Each element is of type ::Google::Longrunning::Operation.
164
- # p response
165
+ # p item
165
166
  # end
166
167
  #
167
168
  def list_operations request, options = nil
@@ -250,14 +251,14 @@ module Google
250
251
  # # Call the get_operation method.
251
252
  # result = client.get_operation request
252
253
  #
253
- # # The returned object is of type Gapic::Operation. You can use this
254
- # # object to check the status of an operation, cancel it, or wait
255
- # # for results. Here is how to block until completion:
254
+ # # The returned object is of type Gapic::Operation. You can use it to
255
+ # # check the status of an operation, cancel it, or wait for results.
256
+ # # Here is how to wait for a response.
256
257
  # result.wait_until_done! timeout: 60
257
258
  # if result.response?
258
259
  # p result.response
259
260
  # else
260
- # puts "Error!"
261
+ # puts "No response received."
261
262
  # end
262
263
  #
263
264
  def get_operation request, options = nil
@@ -537,14 +538,14 @@ module Google
537
538
  # # Call the wait_operation method.
538
539
  # result = client.wait_operation request
539
540
  #
540
- # # The returned object is of type Gapic::Operation. You can use this
541
- # # object to check the status of an operation, cancel it, or wait
542
- # # for results. Here is how to block until completion:
541
+ # # The returned object is of type Gapic::Operation. You can use it to
542
+ # # check the status of an operation, cancel it, or wait for results.
543
+ # # Here is how to wait for a response.
543
544
  # result.wait_until_done! timeout: 60
544
545
  # if result.response?
545
546
  # p result.response
546
547
  # else
547
- # puts "Error!"
548
+ # puts "No response received."
548
549
  # end
549
550
  #
550
551
  def wait_operation request, options = nil