google-cloud-gke_hub-v1beta1 0.5.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +1 -1
- data/README.md +2 -2
- data/lib/google/cloud/gke_hub/v1beta1/bindings_override.rb +135 -0
- data/lib/google/cloud/gke_hub/v1beta1/gke_hub_membership_service/client.rb +53 -46
- data/lib/google/cloud/gke_hub/v1beta1/gke_hub_membership_service/operations.rb +14 -16
- data/lib/google/cloud/gke_hub/v1beta1/gke_hub_membership_service/rest/client.rb +1056 -0
- data/lib/google/cloud/gke_hub/v1beta1/gke_hub_membership_service/rest/operations.rb +793 -0
- data/lib/google/cloud/gke_hub/v1beta1/gke_hub_membership_service/rest/service_stub.rb +522 -0
- data/lib/google/cloud/gke_hub/v1beta1/gke_hub_membership_service/rest.rb +63 -0
- data/lib/google/cloud/gke_hub/v1beta1/gke_hub_membership_service.rb +11 -3
- data/lib/google/cloud/gke_hub/v1beta1/rest.rb +38 -0
- data/lib/google/cloud/gke_hub/v1beta1/version.rb +1 -1
- data/lib/google/cloud/gke_hub/v1beta1.rb +7 -2
- data/lib/google/cloud/gkehub/v1beta1/membership_pb.rb +11 -0
- data/lib/google/cloud/gkehub/v1beta1/membership_services_pb.rb +4 -2
- data/proto_docs/google/api/client.rb +372 -0
- data/proto_docs/google/api/launch_stage.rb +71 -0
- data/proto_docs/google/cloud/gkehub/v1beta1/membership.rb +126 -75
- data/proto_docs/google/protobuf/empty.rb +0 -2
- data/proto_docs/google/rpc/status.rb +4 -2
- metadata +19 -14
- data/proto_docs/google/iam/v1/iam_policy.rb +0 -87
- data/proto_docs/google/iam/v1/options.rb +0 -50
- data/proto_docs/google/iam/v1/policy.rb +0 -418
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8e3cf5571a93e118462eda9e6eda636e92c786bc69122222980f5bed1099ff93
|
4
|
+
data.tar.gz: 8b87620ea3da5b030dd22bcffdc8f815c677c300d541195c29235bf729fa89aa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e091bc48abc5e575ab7e152cecd6fd56dff6e05608fc096f149af09d51e262b774397fe27db683032689629024cc8ec6d3221f1aa941625b53748a2fcd78ac51
|
7
|
+
data.tar.gz: 38fe70a8dc84a34e9cec0afa1f6899938bb91c299038a08138428e955bda170caa05b92ec1fff9f9237730311d06f59072258db367a0739a9b73078c76d96045
|
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,8 +46,8 @@ 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/
|
50
|
-
or a [`Google::Cloud::Logging::Logger`](https://
|
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
|
+
or a [`Google::Cloud::Logging::Logger`](https://cloud.google.com/ruby/docs/reference/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.
|
53
53
|
|
@@ -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
|
22
|
+
require "google/iam/v1"
|
23
23
|
|
24
24
|
module Google
|
25
25
|
module Cloud
|
@@ -30,9 +30,11 @@ module Google
|
|
30
30
|
# Client for the GkeHubMembershipService service.
|
31
31
|
#
|
32
32
|
# The GKE Hub MembershipService handles the registration of many Kubernetes
|
33
|
-
# clusters to Google Cloud, represented with the
|
33
|
+
# clusters to Google Cloud, represented with the
|
34
|
+
# {::Google::Cloud::GkeHub::V1beta1::Membership Membership} resource.
|
34
35
|
#
|
35
|
-
# GKE Hub is currently
|
36
|
+
# GKE Hub is currently available in the global region and all regions in
|
37
|
+
# https://cloud.google.com/compute/docs/regions-zones.
|
36
38
|
#
|
37
39
|
# **Membership management may be non-trivial:** it is recommended to use one
|
38
40
|
# of the Google-provided client libraries or tools where possible when working
|
@@ -216,19 +218,20 @@ module Google
|
|
216
218
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
217
219
|
#
|
218
220
|
# @param parent [::String]
|
219
|
-
# Required. The parent (project and location) where the Memberships will be
|
220
|
-
# Specified in the format `projects/*/locations/*`.
|
221
|
+
# Required. The parent (project and location) where the Memberships will be
|
222
|
+
# listed. Specified in the format `projects/*/locations/*`.
|
223
|
+
# `projects/*/locations/-` list memberships in all the regions.
|
221
224
|
# @param page_size [::Integer]
|
222
|
-
# Optional. When requesting a 'page' of resources, `page_size` specifies
|
223
|
-
# resources to return. If unspecified or set to 0, all resources
|
224
|
-
# be returned.
|
225
|
+
# Optional. When requesting a 'page' of resources, `page_size` specifies
|
226
|
+
# number of resources to return. If unspecified or set to 0, all resources
|
227
|
+
# will be returned.
|
225
228
|
# @param page_token [::String]
|
226
229
|
# Optional. Token returned by previous call to `ListMemberships` which
|
227
230
|
# specifies the position in the list from where to continue listing the
|
228
231
|
# resources.
|
229
232
|
# @param filter [::String]
|
230
|
-
# Optional. Lists Memberships that match the filter expression, following the
|
231
|
-
# outlined in https://google.aip.dev/160.
|
233
|
+
# Optional. Lists Memberships that match the filter expression, following the
|
234
|
+
# syntax outlined in https://google.aip.dev/160.
|
232
235
|
#
|
233
236
|
# Examples:
|
234
237
|
#
|
@@ -271,13 +274,11 @@ module Google
|
|
271
274
|
# # Call the list_memberships method.
|
272
275
|
# result = client.list_memberships request
|
273
276
|
#
|
274
|
-
# # The returned object is of type Gapic::PagedEnumerable. You can
|
275
|
-
# #
|
276
|
-
#
|
277
|
-
# # methods are also available for managing paging directly.
|
278
|
-
# result.each do |response|
|
277
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
278
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
279
|
+
# result.each do |item|
|
279
280
|
# # Each element is of type ::Google::Cloud::GkeHub::V1beta1::Membership.
|
280
|
-
# p
|
281
|
+
# p item
|
281
282
|
# end
|
282
283
|
#
|
283
284
|
def list_memberships request, options = nil
|
@@ -431,11 +432,11 @@ module Google
|
|
431
432
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
432
433
|
#
|
433
434
|
# @param parent [::String]
|
434
|
-
# Required. The parent (project and location) where the Memberships will be
|
435
|
-
# Specified in the format `projects/*/locations/*`.
|
435
|
+
# Required. The parent (project and location) where the Memberships will be
|
436
|
+
# created. Specified in the format `projects/*/locations/*`.
|
436
437
|
# @param membership_id [::String]
|
437
|
-
# Required. Client chosen ID for the membership. `membership_id` must be a
|
438
|
-
# 1123 compliant DNS label:
|
438
|
+
# Required. Client chosen ID for the membership. `membership_id` must be a
|
439
|
+
# valid RFC 1123 compliant DNS label:
|
439
440
|
#
|
440
441
|
# 1. At most 63 characters in length
|
441
442
|
# 2. It must consist of lower case alphanumeric characters or `-`
|
@@ -480,14 +481,14 @@ module Google
|
|
480
481
|
# # Call the create_membership method.
|
481
482
|
# result = client.create_membership request
|
482
483
|
#
|
483
|
-
# # The returned object is of type Gapic::Operation. You can use
|
484
|
-
# #
|
485
|
-
# #
|
484
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
485
|
+
# # check the status of an operation, cancel it, or wait for results.
|
486
|
+
# # Here is how to wait for a response.
|
486
487
|
# result.wait_until_done! timeout: 60
|
487
488
|
# if result.response?
|
488
489
|
# p result.response
|
489
490
|
# else
|
490
|
-
# puts "
|
491
|
+
# puts "No response received."
|
491
492
|
# end
|
492
493
|
#
|
493
494
|
def create_membership request, options = nil
|
@@ -549,7 +550,7 @@ module Google
|
|
549
550
|
# @param options [::Gapic::CallOptions, ::Hash]
|
550
551
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
551
552
|
#
|
552
|
-
# @overload delete_membership(name: nil, request_id: nil)
|
553
|
+
# @overload delete_membership(name: nil, request_id: nil, force: nil)
|
553
554
|
# Pass arguments to `delete_membership` via keyword arguments. Note that at
|
554
555
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
555
556
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -571,6 +572,10 @@ module Google
|
|
571
572
|
#
|
572
573
|
# The request ID must be a valid UUID with the exception that zero UUID is
|
573
574
|
# not supported (00000000-0000-0000-0000-000000000000).
|
575
|
+
# @param force [::Boolean]
|
576
|
+
# Optional. If set to true, any subresource from this Membership will also be
|
577
|
+
# deleted. Otherwise, the request will only work if the Membership has no
|
578
|
+
# subresource.
|
574
579
|
#
|
575
580
|
# @yield [response, operation] Access the result along with the RPC operation
|
576
581
|
# @yieldparam response [::Gapic::Operation]
|
@@ -592,14 +597,14 @@ module Google
|
|
592
597
|
# # Call the delete_membership method.
|
593
598
|
# result = client.delete_membership request
|
594
599
|
#
|
595
|
-
# # The returned object is of type Gapic::Operation. You can use
|
596
|
-
# #
|
597
|
-
# #
|
600
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
601
|
+
# # check the status of an operation, cancel it, or wait for results.
|
602
|
+
# # Here is how to wait for a response.
|
598
603
|
# result.wait_until_done! timeout: 60
|
599
604
|
# if result.response?
|
600
605
|
# p result.response
|
601
606
|
# else
|
602
|
-
# puts "
|
607
|
+
# puts "No response received."
|
603
608
|
# end
|
604
609
|
#
|
605
610
|
def delete_membership request, options = nil
|
@@ -666,8 +671,8 @@ module Google
|
|
666
671
|
# Required. The membership resource name in the format:
|
667
672
|
# `projects/[project_id]/locations/global/memberships/[membership_id]`
|
668
673
|
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
669
|
-
# Required. Mask of fields to update. At least one field path must be
|
670
|
-
# mask.
|
674
|
+
# Required. Mask of fields to update. At least one field path must be
|
675
|
+
# specified in this mask.
|
671
676
|
# @param resource [::Google::Cloud::GkeHub::V1beta1::Membership, ::Hash]
|
672
677
|
# Required. Only fields specified in update_mask are updated.
|
673
678
|
# If you specify a field in the update_mask but don't specify its value here
|
@@ -712,14 +717,14 @@ module Google
|
|
712
717
|
# # Call the update_membership method.
|
713
718
|
# result = client.update_membership request
|
714
719
|
#
|
715
|
-
# # The returned object is of type Gapic::Operation. You can use
|
716
|
-
# #
|
717
|
-
# #
|
720
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
721
|
+
# # check the status of an operation, cancel it, or wait for results.
|
722
|
+
# # Here is how to wait for a response.
|
718
723
|
# result.wait_until_done! timeout: 60
|
719
724
|
# if result.response?
|
720
725
|
# p result.response
|
721
726
|
# else
|
722
|
-
# puts "
|
727
|
+
# puts "No response received."
|
723
728
|
# end
|
724
729
|
#
|
725
730
|
def update_membership request, options = nil
|
@@ -786,12 +791,13 @@ module Google
|
|
786
791
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
787
792
|
#
|
788
793
|
# @param name [::String]
|
789
|
-
# Required. The Membership resource name the Agent will associate with, in
|
790
|
-
# `projects/*/locations/*/memberships/*`.
|
794
|
+
# Required. The Membership resource name the Agent will associate with, in
|
795
|
+
# the format `projects/*/locations/*/memberships/*`.
|
791
796
|
# @param connect_agent [::Google::Cloud::GkeHub::V1beta1::ConnectAgent, ::Hash]
|
792
797
|
# Optional. The connect agent to generate manifest for.
|
793
798
|
# @param version [::String]
|
794
|
-
# Optional. The Connect agent version to use. Defaults to the most current
|
799
|
+
# Optional. The Connect agent version to use. Defaults to the most current
|
800
|
+
# version.
|
795
801
|
# @param is_upgrade [::Boolean]
|
796
802
|
# Optional. If true, generate the resources for upgrade only. Some resources
|
797
803
|
# generated only for installation (e.g. secrets) will be excluded.
|
@@ -885,14 +891,15 @@ module Google
|
|
885
891
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
886
892
|
#
|
887
893
|
# @param parent [::String]
|
888
|
-
# Required. The parent (project and location) where the Memberships will be
|
889
|
-
# Specified in the format `projects/*/locations/*`.
|
894
|
+
# Required. The parent (project and location) where the Memberships will be
|
895
|
+
# created. Specified in the format `projects/*/locations/*`.
|
890
896
|
# @param cr_manifest [::String]
|
891
|
-
# Optional. The YAML of the membership CR in the cluster. Empty if the
|
892
|
-
# CR does not exist.
|
897
|
+
# Optional. The YAML of the membership CR in the cluster. Empty if the
|
898
|
+
# membership CR does not exist.
|
893
899
|
# @param intended_membership [::String]
|
894
|
-
# Required. The intended membership name under the `parent`. This method only
|
895
|
-
# validation in anticipation of a CreateMembership call with the same
|
900
|
+
# Required. The intended membership name under the `parent`. This method only
|
901
|
+
# does validation in anticipation of a CreateMembership call with the same
|
902
|
+
# name.
|
896
903
|
#
|
897
904
|
# @yield [response, operation] Access the result along with the RPC operation
|
898
905
|
# @yieldparam response [::Google::Cloud::GkeHub::V1beta1::ValidateExclusivityResponse]
|
@@ -1101,9 +1108,9 @@ module Google
|
|
1101
1108
|
# * (`String`) The path to a service account key file in JSON format
|
1102
1109
|
# * (`Hash`) A service account key as a Hash
|
1103
1110
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
1104
|
-
# (see the [googleauth docs](https://
|
1111
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
1105
1112
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
1106
|
-
# (see the [signet docs](https://
|
1113
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
1107
1114
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
1108
1115
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
1109
1116
|
# * (`nil`) indicating no credentials
|
@@ -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
|
-
# #
|
163
|
-
#
|
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
|
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
|
257
|
-
# #
|
258
|
-
# #
|
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 "
|
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
|
544
|
-
# #
|
545
|
-
# #
|
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 "
|
548
|
+
# puts "No response received."
|
551
549
|
# end
|
552
550
|
#
|
553
551
|
def wait_operation request, options = nil
|
@@ -622,9 +620,9 @@ module Google
|
|
622
620
|
# * (`String`) The path to a service account key file in JSON format
|
623
621
|
# * (`Hash`) A service account key as a Hash
|
624
622
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
625
|
-
# (see the [googleauth docs](https://
|
623
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
626
624
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
627
|
-
# (see the [signet docs](https://
|
625
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
628
626
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
629
627
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
630
628
|
# * (`nil`) indicating no credentials
|