google-cloud-vm_migration-v1 2.2.0 → 2.3.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.
@@ -0,0 +1,265 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2025 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/iam/v1/iam_policy_pb"
20
+
21
+ module Google
22
+ module Iam
23
+ module V1
24
+ module IAMPolicy
25
+ module Rest
26
+ ##
27
+ # REST service stub for the IAMPolicy service.
28
+ # Service stub contains baseline method implementations
29
+ # including transcoding, making the REST call, and deserialing the response.
30
+ #
31
+ class ServiceStub
32
+ # @private
33
+ def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger:
34
+ # These require statements are intentionally placed here to initialize
35
+ # the REST modules only when it's required.
36
+ require "gapic/rest"
37
+
38
+ @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
39
+ endpoint_template: endpoint_template,
40
+ universe_domain: universe_domain,
41
+ credentials: credentials,
42
+ numeric_enums: true,
43
+ service_name: self.class,
44
+ raise_faraday_errors: false,
45
+ logger: logger
46
+ end
47
+
48
+ ##
49
+ # The effective universe domain
50
+ #
51
+ # @return [String]
52
+ #
53
+ def universe_domain
54
+ @client_stub.universe_domain
55
+ end
56
+
57
+ ##
58
+ # The effective endpoint
59
+ #
60
+ # @return [String]
61
+ #
62
+ def endpoint
63
+ @client_stub.endpoint
64
+ end
65
+
66
+ ##
67
+ # The logger used for request/response debug logging.
68
+ #
69
+ # @return [Logger]
70
+ #
71
+ def logger stub: false
72
+ stub ? @client_stub.stub_logger : @client_stub.logger
73
+ end
74
+
75
+ ##
76
+ # Baseline implementation for the set_iam_policy REST call
77
+ #
78
+ # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest]
79
+ # A request object representing the call parameters. Required.
80
+ # @param options [::Gapic::CallOptions]
81
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
82
+ #
83
+ # @yield [result, operation] Access the result along with the TransportOperation object
84
+ # @yieldparam result [::Google::Iam::V1::Policy]
85
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
86
+ #
87
+ # @return [::Google::Iam::V1::Policy]
88
+ # A result object deserialized from the server's reply
89
+ def set_iam_policy request_pb, options = nil
90
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
91
+
92
+ verb, uri, query_string_params, body = ServiceStub.transcode_set_iam_policy_request request_pb
93
+ query_string_params = if query_string_params.any?
94
+ query_string_params.to_h { |p| p.split "=", 2 }
95
+ else
96
+ {}
97
+ end
98
+
99
+ response = @client_stub.make_http_request(
100
+ verb,
101
+ uri: uri,
102
+ body: body || "",
103
+ params: query_string_params,
104
+ method_name: "set_iam_policy",
105
+ options: options
106
+ )
107
+ operation = ::Gapic::Rest::TransportOperation.new response
108
+ result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true
109
+ catch :response do
110
+ yield result, operation if block_given?
111
+ result
112
+ end
113
+ end
114
+
115
+ ##
116
+ # Baseline implementation for the get_iam_policy REST call
117
+ #
118
+ # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest]
119
+ # A request object representing the call parameters. Required.
120
+ # @param options [::Gapic::CallOptions]
121
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
122
+ #
123
+ # @yield [result, operation] Access the result along with the TransportOperation object
124
+ # @yieldparam result [::Google::Iam::V1::Policy]
125
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
126
+ #
127
+ # @return [::Google::Iam::V1::Policy]
128
+ # A result object deserialized from the server's reply
129
+ def get_iam_policy request_pb, options = nil
130
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
131
+
132
+ verb, uri, query_string_params, body = ServiceStub.transcode_get_iam_policy_request request_pb
133
+ query_string_params = if query_string_params.any?
134
+ query_string_params.to_h { |p| p.split "=", 2 }
135
+ else
136
+ {}
137
+ end
138
+
139
+ response = @client_stub.make_http_request(
140
+ verb,
141
+ uri: uri,
142
+ body: body || "",
143
+ params: query_string_params,
144
+ method_name: "get_iam_policy",
145
+ options: options
146
+ )
147
+ operation = ::Gapic::Rest::TransportOperation.new response
148
+ result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true
149
+ catch :response do
150
+ yield result, operation if block_given?
151
+ result
152
+ end
153
+ end
154
+
155
+ ##
156
+ # Baseline implementation for the test_iam_permissions REST call
157
+ #
158
+ # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest]
159
+ # A request object representing the call parameters. Required.
160
+ # @param options [::Gapic::CallOptions]
161
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
162
+ #
163
+ # @yield [result, operation] Access the result along with the TransportOperation object
164
+ # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse]
165
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
166
+ #
167
+ # @return [::Google::Iam::V1::TestIamPermissionsResponse]
168
+ # A result object deserialized from the server's reply
169
+ def test_iam_permissions request_pb, options = nil
170
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
171
+
172
+ verb, uri, query_string_params, body = ServiceStub.transcode_test_iam_permissions_request request_pb
173
+ query_string_params = if query_string_params.any?
174
+ query_string_params.to_h { |p| p.split "=", 2 }
175
+ else
176
+ {}
177
+ end
178
+
179
+ response = @client_stub.make_http_request(
180
+ verb,
181
+ uri: uri,
182
+ body: body || "",
183
+ params: query_string_params,
184
+ method_name: "test_iam_permissions",
185
+ options: options
186
+ )
187
+ operation = ::Gapic::Rest::TransportOperation.new response
188
+ result = ::Google::Iam::V1::TestIamPermissionsResponse.decode_json response.body, ignore_unknown_fields: true
189
+ catch :response do
190
+ yield result, operation if block_given?
191
+ result
192
+ end
193
+ end
194
+
195
+ ##
196
+ # @private
197
+ #
198
+ # GRPC transcoding helper method for the set_iam_policy REST call
199
+ #
200
+ # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest]
201
+ # A request object representing the call parameters. Required.
202
+ # @return [Array(String, [String, nil], Hash{String => String})]
203
+ # Uri, Body, Query string parameters
204
+ def self.transcode_set_iam_policy_request request_pb
205
+ transcoder = Gapic::Rest::GrpcTranscoder.new
206
+ .with_bindings(
207
+ uri_method: :post,
208
+ uri_template: "/v1/{resource}:setIamPolicy",
209
+ body: "*",
210
+ matches: [
211
+ ["resource", %r{^.*$}, true]
212
+ ]
213
+ )
214
+ transcoder.transcode request_pb
215
+ end
216
+
217
+ ##
218
+ # @private
219
+ #
220
+ # GRPC transcoding helper method for the get_iam_policy REST call
221
+ #
222
+ # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest]
223
+ # A request object representing the call parameters. Required.
224
+ # @return [Array(String, [String, nil], Hash{String => String})]
225
+ # Uri, Body, Query string parameters
226
+ def self.transcode_get_iam_policy_request request_pb
227
+ transcoder = Gapic::Rest::GrpcTranscoder.new
228
+ .with_bindings(
229
+ uri_method: :post,
230
+ uri_template: "/v1/{resource}:getIamPolicy",
231
+ body: "*",
232
+ matches: [
233
+ ["resource", %r{^.*$}, true]
234
+ ]
235
+ )
236
+ transcoder.transcode request_pb
237
+ end
238
+
239
+ ##
240
+ # @private
241
+ #
242
+ # GRPC transcoding helper method for the test_iam_permissions REST call
243
+ #
244
+ # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest]
245
+ # A request object representing the call parameters. Required.
246
+ # @return [Array(String, [String, nil], Hash{String => String})]
247
+ # Uri, Body, Query string parameters
248
+ def self.transcode_test_iam_permissions_request request_pb
249
+ transcoder = Gapic::Rest::GrpcTranscoder.new
250
+ .with_bindings(
251
+ uri_method: :post,
252
+ uri_template: "/v1/{resource}:testIamPermissions",
253
+ body: "*",
254
+ matches: [
255
+ ["resource", %r{^.*$}, true]
256
+ ]
257
+ )
258
+ transcoder.transcode request_pb
259
+ end
260
+ end
261
+ end
262
+ end
263
+ end
264
+ end
265
+ end
@@ -0,0 +1,74 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2025 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/rest"
20
+ require "gapic/config"
21
+ require "gapic/config/method"
22
+
23
+ require "google/cloud/vm_migration/v1/version"
24
+ require "google/iam/v1/bindings_override"
25
+
26
+ require "google/iam/v1/iam_policy/credentials"
27
+ require "google/iam/v1/iam_policy/rest/client"
28
+
29
+ module Google
30
+ module Iam
31
+ module V1
32
+ ##
33
+ # API Overview
34
+ #
35
+ # Manages Identity and Access Management (IAM) policies.
36
+ #
37
+ # Any implementation of an API that offers access control features
38
+ # implements the google.iam.v1.IAMPolicy interface.
39
+ #
40
+ # ## Data model
41
+ #
42
+ # Access control is applied when a principal (user or service account), takes
43
+ # some action on a resource exposed by a service. Resources, identified by
44
+ # URI-like names, are the unit of access control specification. Service
45
+ # implementations can choose the granularity of access control and the
46
+ # supported permissions for their resources.
47
+ # For example one database service may allow access control to be
48
+ # specified only at the Table level, whereas another might allow access control
49
+ # to also be specified at the Column level.
50
+ #
51
+ # ## Policy Structure
52
+ #
53
+ # See google.iam.v1.Policy
54
+ #
55
+ # This is intentionally not a CRUD style API because access control policies
56
+ # are created and deleted implicitly with the resources to which they are
57
+ # attached.
58
+ #
59
+ # To load this service and instantiate a REST client:
60
+ #
61
+ # require "google/iam/v1/iam_policy/rest"
62
+ # client = ::Google::Iam::V1::IAMPolicy::Rest::Client.new
63
+ #
64
+ module IAMPolicy
65
+ # Client for the REST transport
66
+ module Rest
67
+ end
68
+ end
69
+ end
70
+ end
71
+ end
72
+
73
+ helper_path = ::File.join __dir__, "rest", "helpers.rb"
74
+ require "google/iam/v1/iam_policy/rest/helpers" if ::File.file? helper_path
@@ -0,0 +1,76 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2025 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/vm_migration/v1/version"
24
+
25
+ require "google/iam/v1/iam_policy/credentials"
26
+ require "google/iam/v1/iam_policy/client"
27
+ require "google/iam/v1/iam_policy/rest"
28
+
29
+ module Google
30
+ module Iam
31
+ module V1
32
+ ##
33
+ # API Overview
34
+ #
35
+ # Manages Identity and Access Management (IAM) policies.
36
+ #
37
+ # Any implementation of an API that offers access control features
38
+ # implements the google.iam.v1.IAMPolicy interface.
39
+ #
40
+ # ## Data model
41
+ #
42
+ # Access control is applied when a principal (user or service account), takes
43
+ # some action on a resource exposed by a service. Resources, identified by
44
+ # URI-like names, are the unit of access control specification. Service
45
+ # implementations can choose the granularity of access control and the
46
+ # supported permissions for their resources.
47
+ # For example one database service may allow access control to be
48
+ # specified only at the Table level, whereas another might allow access control
49
+ # to also be specified at the Column level.
50
+ #
51
+ # ## Policy Structure
52
+ #
53
+ # See google.iam.v1.Policy
54
+ #
55
+ # This is intentionally not a CRUD style API because access control policies
56
+ # are created and deleted implicitly with the resources to which they are
57
+ # attached.
58
+ #
59
+ # @example Load this service and instantiate a gRPC client
60
+ #
61
+ # require "google/iam/v1/iam_policy"
62
+ # client = ::Google::Iam::V1::IAMPolicy::Client.new
63
+ #
64
+ # @example Load this service and instantiate a REST client
65
+ #
66
+ # require "google/iam/v1/iam_policy/rest"
67
+ # client = ::Google::Iam::V1::IAMPolicy::Rest::Client.new
68
+ #
69
+ module IAMPolicy
70
+ end
71
+ end
72
+ end
73
+ end
74
+
75
+ helper_path = ::File.join __dir__, "iam_policy", "helpers.rb"
76
+ require "google/iam/v1/iam_policy/helpers" if ::File.file? helper_path
@@ -0,0 +1,36 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2025 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/iam/v1/iam_policy/rest"
20
+ require "google/iam/v1/bindings_override"
21
+ require "google/cloud/vm_migration/v1/version"
22
+
23
+ module Google
24
+ module Iam
25
+ ##
26
+ # To load just the REST part of this package, including all its services, and instantiate a REST client:
27
+ #
28
+ # @example
29
+ #
30
+ # require "google/iam/v1/rest"
31
+ # client = ::Google::Iam::V1::IAMPolicy::Rest::Client.new
32
+ #
33
+ module V1
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,43 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2025 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/iam/v1/iam_policy"
20
+ require "google/cloud/vm_migration/v1/version"
21
+
22
+ module Google
23
+ module Iam
24
+ ##
25
+ # API client module.
26
+ #
27
+ # @example Load this package, including all its services, and instantiate a gRPC client
28
+ #
29
+ # require "google/iam/v1"
30
+ # client = ::Google::Iam::V1::IAMPolicy::Client.new
31
+ #
32
+ # @example Load this package, including all its services, and instantiate a REST client
33
+ #
34
+ # require "google/iam/v1"
35
+ # client = ::Google::Iam::V1::IAMPolicy::Rest::Client.new
36
+ #
37
+ module V1
38
+ end
39
+ end
40
+ end
41
+
42
+ helper_path = ::File.join __dir__, "v1", "_helpers.rb"
43
+ require "google/iam/v1/_helpers" if ::File.file? helper_path
@@ -19,3 +19,4 @@
19
19
  # This gem does not autoload during Bundler.require. To load this gem,
20
20
  # issue explicit require statements for the packages desired, e.g.:
21
21
  # require "google/cloud/vm_migration/v1"
22
+ # require "google/iam/v1"
@@ -0,0 +1,88 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2025 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
+
20
+ module Google
21
+ module Api
22
+ # Rich semantic information of an API field beyond basic typing.
23
+ # @!attribute [rw] format
24
+ # @return [::Google::Api::FieldInfo::Format]
25
+ # The standard format of a field value. This does not explicitly configure
26
+ # any API consumer, just documents the API's format for the field it is
27
+ # applied to.
28
+ # @!attribute [rw] referenced_types
29
+ # @return [::Array<::Google::Api::TypeReference>]
30
+ # The type(s) that the annotated, generic field may represent.
31
+ #
32
+ # Currently, this must only be used on fields of type `google.protobuf.Any`.
33
+ # Supporting other generic types may be considered in the future.
34
+ class FieldInfo
35
+ include ::Google::Protobuf::MessageExts
36
+ extend ::Google::Protobuf::MessageExts::ClassMethods
37
+
38
+ # The standard format of a field value. The supported formats are all backed
39
+ # by either an RFC defined by the IETF or a Google-defined AIP.
40
+ module Format
41
+ # Default, unspecified value.
42
+ FORMAT_UNSPECIFIED = 0
43
+
44
+ # Universally Unique Identifier, version 4, value as defined by
45
+ # https://datatracker.ietf.org/doc/html/rfc4122. The value may be
46
+ # normalized to entirely lowercase letters. For example, the value
47
+ # `F47AC10B-58CC-0372-8567-0E02B2C3D479` would be normalized to
48
+ # `f47ac10b-58cc-0372-8567-0e02b2c3d479`.
49
+ UUID4 = 1
50
+
51
+ # Internet Protocol v4 value as defined by [RFC
52
+ # 791](https://datatracker.ietf.org/doc/html/rfc791). The value may be
53
+ # condensed, with leading zeros in each octet stripped. For example,
54
+ # `001.022.233.040` would be condensed to `1.22.233.40`.
55
+ IPV4 = 2
56
+
57
+ # Internet Protocol v6 value as defined by [RFC
58
+ # 2460](https://datatracker.ietf.org/doc/html/rfc2460). The value may be
59
+ # normalized to entirely lowercase letters with zeros compressed, following
60
+ # [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952). For example,
61
+ # the value `2001:0DB8:0::0` would be normalized to `2001:db8::`.
62
+ IPV6 = 3
63
+
64
+ # An IP address in either v4 or v6 format as described by the individual
65
+ # values defined herein. See the comments on the IPV4 and IPV6 types for
66
+ # allowed normalizations of each.
67
+ IPV4_OR_IPV6 = 4
68
+ end
69
+ end
70
+
71
+ # A reference to a message type, for use in {::Google::Api::FieldInfo FieldInfo}.
72
+ # @!attribute [rw] type_name
73
+ # @return [::String]
74
+ # The name of the type that the annotated, generic field may represent.
75
+ # If the type is in the same protobuf package, the value can be the simple
76
+ # message name e.g., `"MyMessage"`. Otherwise, the value must be the
77
+ # fully-qualified message name e.g., `"google.library.v1.Book"`.
78
+ #
79
+ # If the type(s) are unknown to the service (e.g. the field accepts generic
80
+ # user input), use the wildcard `"*"` to denote this behavior.
81
+ #
82
+ # See [AIP-202](https://google.aip.dev/202#type-references) for more details.
83
+ class TypeReference
84
+ include ::Google::Protobuf::MessageExts
85
+ extend ::Google::Protobuf::MessageExts::ClassMethods
86
+ end
87
+ end
88
+ end