google-cloud-gke_hub-v1beta1 0.5.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: c0a9595b53ebc3273cb976ba860a619f1553333261564cbcb3ed834b4633f5ca
4
- data.tar.gz: c21730682901525af3320f1b12df3f912a4fe4f84b62de1345856e014643df2a
3
+ metadata.gz: aea396b9d3aed7fcdfa11744a60abe2dfe4d5058ea55a736ecc2393661d1b78f
4
+ data.tar.gz: 668aeb6909ae5628bb35e87009a6ac2545bb7969abea3e90b47a238ae4faef82
5
5
  SHA512:
6
- metadata.gz: e1698a34a2f7dee5ab296cfccbc7026afa065b79a066f48a310e31d591ab7aabd19f2f9a04a9b76baf07b378faa6b31b663337efd86c3d2c4e4aa187d6242a1f
7
- data.tar.gz: 15849161ea103658cc0e4abb41f7c4b7dc50293f277c7a2f0ca95b0b1c877ffc5def662c0099e15a5c2ae01f553e4ac3674c633183a87d61f50627b9ec49759e
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.
@@ -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
@@ -158,13 +158,11 @@ module Google
158
158
  # # Call the list_operations method.
159
159
  # result = client.list_operations request
160
160
  #
161
- # # The returned object is of type Gapic::PagedEnumerable. You can
162
- # # iterate over all elements by calling #each, and the enumerable
163
- # # will lazily make API calls to fetch subsequent pages. Other
164
- # # methods are also available for managing paging directly.
165
- # 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|
166
164
  # # Each element is of type ::Google::Longrunning::Operation.
167
- # p response
165
+ # p item
168
166
  # end
169
167
  #
170
168
  def list_operations request, options = nil
@@ -253,14 +251,14 @@ module Google
253
251
  # # Call the get_operation method.
254
252
  # result = client.get_operation request
255
253
  #
256
- # # The returned object is of type Gapic::Operation. You can use this
257
- # # object to check the status of an operation, cancel it, or wait
258
- # # 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.
259
257
  # result.wait_until_done! timeout: 60
260
258
  # if result.response?
261
259
  # p result.response
262
260
  # else
263
- # puts "Error!"
261
+ # puts "No response received."
264
262
  # end
265
263
  #
266
264
  def get_operation request, options = nil
@@ -540,14 +538,14 @@ module Google
540
538
  # # Call the wait_operation method.
541
539
  # result = client.wait_operation request
542
540
  #
543
- # # The returned object is of type Gapic::Operation. You can use this
544
- # # object to check the status of an operation, cancel it, or wait
545
- # # 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.
546
544
  # result.wait_until_done! timeout: 60
547
545
  # if result.response?
548
546
  # p result.response
549
547
  # else
550
- # puts "Error!"
548
+ # puts "No response received."
551
549
  # end
552
550
  #
553
551
  def wait_operation request, options = nil