google-cloud-shell-v1 0.3.0 → 0.5.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,347 @@
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 "google/cloud/shell/v1/cloudshell_pb"
20
+
21
+ module Google
22
+ module Cloud
23
+ module Shell
24
+ module V1
25
+ module CloudShellService
26
+ module Rest
27
+ ##
28
+ # REST service stub for the CloudShellService service.
29
+ # Service stub contains baseline method implementations
30
+ # including transcoding, making the REST call, and deserialing the response.
31
+ #
32
+ class ServiceStub
33
+ def initialize endpoint:, credentials:
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, credentials: credentials,
39
+ numeric_enums: true,
40
+ raise_faraday_errors: false
41
+ end
42
+
43
+ ##
44
+ # Baseline implementation for the get_environment REST call
45
+ #
46
+ # @param request_pb [::Google::Cloud::Shell::V1::GetEnvironmentRequest]
47
+ # A request object representing the call parameters. Required.
48
+ # @param options [::Gapic::CallOptions]
49
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
50
+ #
51
+ # @yield [result, operation] Access the result along with the TransportOperation object
52
+ # @yieldparam result [::Google::Cloud::Shell::V1::Environment]
53
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
54
+ #
55
+ # @return [::Google::Cloud::Shell::V1::Environment]
56
+ # A result object deserialized from the server's reply
57
+ def get_environment request_pb, options = nil
58
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
59
+
60
+ verb, uri, query_string_params, body = ServiceStub.transcode_get_environment_request request_pb
61
+ query_string_params = if query_string_params.any?
62
+ query_string_params.to_h { |p| p.split("=", 2) }
63
+ else
64
+ {}
65
+ end
66
+
67
+ response = @client_stub.make_http_request(
68
+ verb,
69
+ uri: uri,
70
+ body: body || "",
71
+ params: query_string_params,
72
+ options: options
73
+ )
74
+ operation = ::Gapic::Rest::TransportOperation.new response
75
+ result = ::Google::Cloud::Shell::V1::Environment.decode_json response.body, ignore_unknown_fields: true
76
+
77
+ yield result, operation if block_given?
78
+ result
79
+ end
80
+
81
+ ##
82
+ # Baseline implementation for the start_environment REST call
83
+ #
84
+ # @param request_pb [::Google::Cloud::Shell::V1::StartEnvironmentRequest]
85
+ # A request object representing the call parameters. Required.
86
+ # @param options [::Gapic::CallOptions]
87
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
88
+ #
89
+ # @yield [result, operation] Access the result along with the TransportOperation object
90
+ # @yieldparam result [::Google::Longrunning::Operation]
91
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
92
+ #
93
+ # @return [::Google::Longrunning::Operation]
94
+ # A result object deserialized from the server's reply
95
+ def start_environment request_pb, options = nil
96
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
97
+
98
+ verb, uri, query_string_params, body = ServiceStub.transcode_start_environment_request request_pb
99
+ query_string_params = if query_string_params.any?
100
+ query_string_params.to_h { |p| p.split("=", 2) }
101
+ else
102
+ {}
103
+ end
104
+
105
+ response = @client_stub.make_http_request(
106
+ verb,
107
+ uri: uri,
108
+ body: body || "",
109
+ params: query_string_params,
110
+ options: options
111
+ )
112
+ operation = ::Gapic::Rest::TransportOperation.new response
113
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
114
+
115
+ yield result, operation if block_given?
116
+ result
117
+ end
118
+
119
+ ##
120
+ # Baseline implementation for the authorize_environment REST call
121
+ #
122
+ # @param request_pb [::Google::Cloud::Shell::V1::AuthorizeEnvironmentRequest]
123
+ # A request object representing the call parameters. Required.
124
+ # @param options [::Gapic::CallOptions]
125
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
126
+ #
127
+ # @yield [result, operation] Access the result along with the TransportOperation object
128
+ # @yieldparam result [::Google::Longrunning::Operation]
129
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
130
+ #
131
+ # @return [::Google::Longrunning::Operation]
132
+ # A result object deserialized from the server's reply
133
+ def authorize_environment request_pb, options = nil
134
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
135
+
136
+ verb, uri, query_string_params, body = ServiceStub.transcode_authorize_environment_request request_pb
137
+ query_string_params = if query_string_params.any?
138
+ query_string_params.to_h { |p| p.split("=", 2) }
139
+ else
140
+ {}
141
+ end
142
+
143
+ response = @client_stub.make_http_request(
144
+ verb,
145
+ uri: uri,
146
+ body: body || "",
147
+ params: query_string_params,
148
+ options: options
149
+ )
150
+ operation = ::Gapic::Rest::TransportOperation.new response
151
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
152
+
153
+ yield result, operation if block_given?
154
+ result
155
+ end
156
+
157
+ ##
158
+ # Baseline implementation for the add_public_key REST call
159
+ #
160
+ # @param request_pb [::Google::Cloud::Shell::V1::AddPublicKeyRequest]
161
+ # A request object representing the call parameters. Required.
162
+ # @param options [::Gapic::CallOptions]
163
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
164
+ #
165
+ # @yield [result, operation] Access the result along with the TransportOperation object
166
+ # @yieldparam result [::Google::Longrunning::Operation]
167
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
168
+ #
169
+ # @return [::Google::Longrunning::Operation]
170
+ # A result object deserialized from the server's reply
171
+ def add_public_key request_pb, options = nil
172
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
173
+
174
+ verb, uri, query_string_params, body = ServiceStub.transcode_add_public_key_request request_pb
175
+ query_string_params = if query_string_params.any?
176
+ query_string_params.to_h { |p| p.split("=", 2) }
177
+ else
178
+ {}
179
+ end
180
+
181
+ response = @client_stub.make_http_request(
182
+ verb,
183
+ uri: uri,
184
+ body: body || "",
185
+ params: query_string_params,
186
+ options: options
187
+ )
188
+ operation = ::Gapic::Rest::TransportOperation.new response
189
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
190
+
191
+ yield result, operation if block_given?
192
+ result
193
+ end
194
+
195
+ ##
196
+ # Baseline implementation for the remove_public_key REST call
197
+ #
198
+ # @param request_pb [::Google::Cloud::Shell::V1::RemovePublicKeyRequest]
199
+ # A request object representing the call parameters. Required.
200
+ # @param options [::Gapic::CallOptions]
201
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
202
+ #
203
+ # @yield [result, operation] Access the result along with the TransportOperation object
204
+ # @yieldparam result [::Google::Longrunning::Operation]
205
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
206
+ #
207
+ # @return [::Google::Longrunning::Operation]
208
+ # A result object deserialized from the server's reply
209
+ def remove_public_key request_pb, options = nil
210
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
211
+
212
+ verb, uri, query_string_params, body = ServiceStub.transcode_remove_public_key_request request_pb
213
+ query_string_params = if query_string_params.any?
214
+ query_string_params.to_h { |p| p.split("=", 2) }
215
+ else
216
+ {}
217
+ end
218
+
219
+ response = @client_stub.make_http_request(
220
+ verb,
221
+ uri: uri,
222
+ body: body || "",
223
+ params: query_string_params,
224
+ options: options
225
+ )
226
+ operation = ::Gapic::Rest::TransportOperation.new response
227
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
228
+
229
+ yield result, operation if block_given?
230
+ result
231
+ end
232
+
233
+ ##
234
+ # @private
235
+ #
236
+ # GRPC transcoding helper method for the get_environment REST call
237
+ #
238
+ # @param request_pb [::Google::Cloud::Shell::V1::GetEnvironmentRequest]
239
+ # A request object representing the call parameters. Required.
240
+ # @return [Array(String, [String, nil], Hash{String => String})]
241
+ # Uri, Body, Query string parameters
242
+ def self.transcode_get_environment_request request_pb
243
+ transcoder = Gapic::Rest::GrpcTranscoder.new
244
+ .with_bindings(
245
+ uri_method: :get,
246
+ uri_template: "/v1/{name}",
247
+ matches: [
248
+ ["name", %r{^users/[^/]+/environments/[^/]+/?$}, false]
249
+ ]
250
+ )
251
+ transcoder.transcode request_pb
252
+ end
253
+
254
+ ##
255
+ # @private
256
+ #
257
+ # GRPC transcoding helper method for the start_environment REST call
258
+ #
259
+ # @param request_pb [::Google::Cloud::Shell::V1::StartEnvironmentRequest]
260
+ # A request object representing the call parameters. Required.
261
+ # @return [Array(String, [String, nil], Hash{String => String})]
262
+ # Uri, Body, Query string parameters
263
+ def self.transcode_start_environment_request request_pb
264
+ transcoder = Gapic::Rest::GrpcTranscoder.new
265
+ .with_bindings(
266
+ uri_method: :post,
267
+ uri_template: "/v1/{name}:start",
268
+ body: "*",
269
+ matches: [
270
+ ["name", %r{^users/[^/]+/environments/[^/]+/?$}, false]
271
+ ]
272
+ )
273
+ transcoder.transcode request_pb
274
+ end
275
+
276
+ ##
277
+ # @private
278
+ #
279
+ # GRPC transcoding helper method for the authorize_environment REST call
280
+ #
281
+ # @param request_pb [::Google::Cloud::Shell::V1::AuthorizeEnvironmentRequest]
282
+ # A request object representing the call parameters. Required.
283
+ # @return [Array(String, [String, nil], Hash{String => String})]
284
+ # Uri, Body, Query string parameters
285
+ def self.transcode_authorize_environment_request request_pb
286
+ transcoder = Gapic::Rest::GrpcTranscoder.new
287
+ .with_bindings(
288
+ uri_method: :post,
289
+ uri_template: "/v1/{name}:authorize",
290
+ body: "*",
291
+ matches: [
292
+ ["name", %r{^users/[^/]+/environments/[^/]+/?$}, false]
293
+ ]
294
+ )
295
+ transcoder.transcode request_pb
296
+ end
297
+
298
+ ##
299
+ # @private
300
+ #
301
+ # GRPC transcoding helper method for the add_public_key REST call
302
+ #
303
+ # @param request_pb [::Google::Cloud::Shell::V1::AddPublicKeyRequest]
304
+ # A request object representing the call parameters. Required.
305
+ # @return [Array(String, [String, nil], Hash{String => String})]
306
+ # Uri, Body, Query string parameters
307
+ def self.transcode_add_public_key_request request_pb
308
+ transcoder = Gapic::Rest::GrpcTranscoder.new
309
+ .with_bindings(
310
+ uri_method: :post,
311
+ uri_template: "/v1/{environment}:addPublicKey",
312
+ body: "*",
313
+ matches: [
314
+ ["environment", %r{^users/[^/]+/environments/[^/]+/?$}, false]
315
+ ]
316
+ )
317
+ transcoder.transcode request_pb
318
+ end
319
+
320
+ ##
321
+ # @private
322
+ #
323
+ # GRPC transcoding helper method for the remove_public_key REST call
324
+ #
325
+ # @param request_pb [::Google::Cloud::Shell::V1::RemovePublicKeyRequest]
326
+ # A request object representing the call parameters. Required.
327
+ # @return [Array(String, [String, nil], Hash{String => String})]
328
+ # Uri, Body, Query string parameters
329
+ def self.transcode_remove_public_key_request request_pb
330
+ transcoder = Gapic::Rest::GrpcTranscoder.new
331
+ .with_bindings(
332
+ uri_method: :post,
333
+ uri_template: "/v1/{environment}:removePublicKey",
334
+ body: "*",
335
+ matches: [
336
+ ["environment", %r{^users/[^/]+/environments/[^/]+/?$}, false]
337
+ ]
338
+ )
339
+ transcoder.transcode request_pb
340
+ end
341
+ end
342
+ end
343
+ end
344
+ end
345
+ end
346
+ end
347
+ end
@@ -0,0 +1,59 @@
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/rest"
20
+ require "gapic/config"
21
+ require "gapic/config/method"
22
+
23
+ require "google/cloud/shell/v1/version"
24
+
25
+ require "google/cloud/shell/v1/cloud_shell_service/credentials"
26
+ require "google/cloud/shell/v1/cloud_shell_service/paths"
27
+ require "google/cloud/shell/v1/cloud_shell_service/rest/operations"
28
+ require "google/cloud/shell/v1/cloud_shell_service/rest/client"
29
+
30
+ module Google
31
+ module Cloud
32
+ module Shell
33
+ module V1
34
+ ##
35
+ # API for interacting with Google Cloud Shell. Each user of Cloud Shell has at
36
+ # least one environment, which has the ID "default". Environment consists of a
37
+ # Docker image defining what is installed on the environment and a home
38
+ # directory containing the user's data that will remain across sessions.
39
+ # Clients use this API to start and fetch information about their environment,
40
+ # which can then be used to connect to that environment via a separate SSH
41
+ # client.
42
+ #
43
+ # To load this service and instantiate a REST client:
44
+ #
45
+ # require "google/cloud/shell/v1/cloud_shell_service/rest"
46
+ # client = ::Google::Cloud::Shell::V1::CloudShellService::Rest::Client.new
47
+ #
48
+ module CloudShellService
49
+ # Client for the REST transport
50
+ module Rest
51
+ end
52
+ end
53
+ end
54
+ end
55
+ end
56
+ end
57
+
58
+ helper_path = ::File.join __dir__, "rest", "helpers.rb"
59
+ require "google/cloud/shell/v1/cloud_shell_service/rest/helpers" if ::File.file? helper_path
@@ -26,6 +26,7 @@ require "google/cloud/shell/v1/cloud_shell_service/credentials"
26
26
  require "google/cloud/shell/v1/cloud_shell_service/paths"
27
27
  require "google/cloud/shell/v1/cloud_shell_service/operations"
28
28
  require "google/cloud/shell/v1/cloud_shell_service/client"
29
+ require "google/cloud/shell/v1/cloud_shell_service/rest"
29
30
 
30
31
  module Google
31
32
  module Cloud
@@ -40,11 +41,16 @@ module Google
40
41
  # which can then be used to connect to that environment via a separate SSH
41
42
  # client.
42
43
  #
43
- # To load this service and instantiate a client:
44
+ # @example Load this service and instantiate a gRPC client
44
45
  #
45
46
  # require "google/cloud/shell/v1/cloud_shell_service"
46
47
  # client = ::Google::Cloud::Shell::V1::CloudShellService::Client.new
47
48
  #
49
+ # @example Load this service and instantiate a REST client
50
+ #
51
+ # require "google/cloud/shell/v1/cloud_shell_service/rest"
52
+ # client = ::Google::Cloud::Shell::V1::CloudShellService::Rest::Client.new
53
+ #
48
54
  module CloudShellService
49
55
  end
50
56
  end
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: google/cloud/shell/v1/cloudshell.proto
3
4
 
@@ -10,90 +11,32 @@ require 'google/api/resource_pb'
10
11
  require 'google/longrunning/operations_pb'
11
12
  require 'google/protobuf/timestamp_pb'
12
13
 
13
- Google::Protobuf::DescriptorPool.generated_pool.build do
14
- add_file("google/cloud/shell/v1/cloudshell.proto", :syntax => :proto3) do
15
- add_message "google.cloud.shell.v1.Environment" do
16
- optional :name, :string, 1
17
- optional :id, :string, 2
18
- optional :docker_image, :string, 3
19
- optional :state, :enum, 4, "google.cloud.shell.v1.Environment.State"
20
- optional :web_host, :string, 12
21
- optional :ssh_username, :string, 5
22
- optional :ssh_host, :string, 6
23
- optional :ssh_port, :int32, 7
24
- repeated :public_keys, :string, 8
25
- end
26
- add_enum "google.cloud.shell.v1.Environment.State" do
27
- value :STATE_UNSPECIFIED, 0
28
- value :SUSPENDED, 1
29
- value :PENDING, 2
30
- value :RUNNING, 3
31
- value :DELETING, 4
32
- end
33
- add_message "google.cloud.shell.v1.GetEnvironmentRequest" do
34
- optional :name, :string, 1
35
- end
36
- add_message "google.cloud.shell.v1.CreateEnvironmentMetadata" do
37
- end
38
- add_message "google.cloud.shell.v1.DeleteEnvironmentMetadata" do
39
- end
40
- add_message "google.cloud.shell.v1.StartEnvironmentRequest" do
41
- optional :name, :string, 1
42
- optional :access_token, :string, 2
43
- repeated :public_keys, :string, 3
44
- end
45
- add_message "google.cloud.shell.v1.AuthorizeEnvironmentRequest" do
46
- optional :name, :string, 1
47
- optional :access_token, :string, 2
48
- optional :id_token, :string, 4
49
- optional :expire_time, :message, 3, "google.protobuf.Timestamp"
50
- end
51
- add_message "google.cloud.shell.v1.AuthorizeEnvironmentResponse" do
52
- end
53
- add_message "google.cloud.shell.v1.AuthorizeEnvironmentMetadata" do
54
- end
55
- add_message "google.cloud.shell.v1.StartEnvironmentMetadata" do
56
- optional :state, :enum, 1, "google.cloud.shell.v1.StartEnvironmentMetadata.State"
57
- end
58
- add_enum "google.cloud.shell.v1.StartEnvironmentMetadata.State" do
59
- value :STATE_UNSPECIFIED, 0
60
- value :STARTING, 1
61
- value :UNARCHIVING_DISK, 2
62
- value :AWAITING_COMPUTE_RESOURCES, 4
63
- value :FINISHED, 3
64
- end
65
- add_message "google.cloud.shell.v1.StartEnvironmentResponse" do
66
- optional :environment, :message, 1, "google.cloud.shell.v1.Environment"
67
- end
68
- add_message "google.cloud.shell.v1.AddPublicKeyRequest" do
69
- optional :environment, :string, 1
70
- optional :key, :string, 2
71
- end
72
- add_message "google.cloud.shell.v1.AddPublicKeyResponse" do
73
- optional :key, :string, 1
74
- end
75
- add_message "google.cloud.shell.v1.AddPublicKeyMetadata" do
76
- end
77
- add_message "google.cloud.shell.v1.RemovePublicKeyRequest" do
78
- optional :environment, :string, 1
79
- optional :key, :string, 2
80
- end
81
- add_message "google.cloud.shell.v1.RemovePublicKeyResponse" do
82
- end
83
- add_message "google.cloud.shell.v1.RemovePublicKeyMetadata" do
84
- end
85
- add_message "google.cloud.shell.v1.CloudShellErrorDetails" do
86
- optional :code, :enum, 1, "google.cloud.shell.v1.CloudShellErrorDetails.CloudShellErrorCode"
87
- end
88
- add_enum "google.cloud.shell.v1.CloudShellErrorDetails.CloudShellErrorCode" do
89
- value :CLOUD_SHELL_ERROR_CODE_UNSPECIFIED, 0
90
- value :IMAGE_UNAVAILABLE, 1
91
- value :CLOUD_SHELL_DISABLED, 2
92
- value :TOS_VIOLATION, 4
93
- value :QUOTA_EXCEEDED, 5
94
- value :ENVIRONMENT_UNAVAILABLE, 6
14
+
15
+ descriptor_data = "\n&google/cloud/shell/v1/cloudshell.proto\x12\x15google.cloud.shell.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb3\x03\n\x0b\x45nvironment\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12\x0f\n\x02id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x1c\n\x0c\x64ocker_image\x18\x03 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12<\n\x05state\x18\x04 \x01(\x0e\x32(.google.cloud.shell.v1.Environment.StateB\x03\xe0\x41\x03\x12\x15\n\x08web_host\x18\x0c \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0cssh_username\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08ssh_host\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08ssh_port\x18\x07 \x01(\x05\x42\x03\xe0\x41\x03\x12\x18\n\x0bpublic_keys\x18\x08 \x03(\tB\x03\xe0\x41\x03\"U\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\r\n\tSUSPENDED\x10\x01\x12\x0b\n\x07PENDING\x10\x02\x12\x0b\n\x07RUNNING\x10\x03\x12\x0c\n\x08\x44\x45LETING\x10\x04:S\xea\x41P\n%cloudshell.googleapis.com/Environment\x12\'users/{user}/environments/{environment}\"T\n\x15GetEnvironmentRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%cloudshell.googleapis.com/Environment\"\x1b\n\x19\x43reateEnvironmentMetadata\"\x1b\n\x19\x44\x65leteEnvironmentMetadata\"R\n\x17StartEnvironmentRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x61\x63\x63\x65ss_token\x18\x02 \x01(\t\x12\x13\n\x0bpublic_keys\x18\x03 \x03(\t\"\x84\x01\n\x1b\x41uthorizeEnvironmentRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x61\x63\x63\x65ss_token\x18\x02 \x01(\t\x12\x10\n\x08id_token\x18\x04 \x01(\t\x12/\n\x0b\x65xpire_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x1e\n\x1c\x41uthorizeEnvironmentResponse\"\x1e\n\x1c\x41uthorizeEnvironmentMetadata\"\xd2\x01\n\x18StartEnvironmentMetadata\x12\x44\n\x05state\x18\x01 \x01(\x0e\x32\x35.google.cloud.shell.v1.StartEnvironmentMetadata.State\"p\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08STARTING\x10\x01\x12\x14\n\x10UNARCHIVING_DISK\x10\x02\x12\x1e\n\x1a\x41WAITING_COMPUTE_RESOURCES\x10\x04\x12\x0c\n\x08\x46INISHED\x10\x03\"S\n\x18StartEnvironmentResponse\x12\x37\n\x0b\x65nvironment\x18\x01 \x01(\x0b\x32\".google.cloud.shell.v1.Environment\"7\n\x13\x41\x64\x64PublicKeyRequest\x12\x13\n\x0b\x65nvironment\x18\x01 \x01(\t\x12\x0b\n\x03key\x18\x02 \x01(\t\"#\n\x14\x41\x64\x64PublicKeyResponse\x12\x0b\n\x03key\x18\x01 \x01(\t\"\x16\n\x14\x41\x64\x64PublicKeyMetadata\":\n\x16RemovePublicKeyRequest\x12\x13\n\x0b\x65nvironment\x18\x01 \x01(\t\x12\x0b\n\x03key\x18\x02 \x01(\t\"\x19\n\x17RemovePublicKeyResponse\"\x19\n\x17RemovePublicKeyMetadata\"\x9e\x02\n\x16\x43loudShellErrorDetails\x12O\n\x04\x63ode\x18\x01 \x01(\x0e\x32\x41.google.cloud.shell.v1.CloudShellErrorDetails.CloudShellErrorCode\"\xb2\x01\n\x13\x43loudShellErrorCode\x12&\n\"CLOUD_SHELL_ERROR_CODE_UNSPECIFIED\x10\x00\x12\x15\n\x11IMAGE_UNAVAILABLE\x10\x01\x12\x18\n\x14\x43LOUD_SHELL_DISABLED\x10\x02\x12\x11\n\rTOS_VIOLATION\x10\x04\x12\x12\n\x0eQUOTA_EXCEEDED\x10\x05\x12\x1b\n\x17\x45NVIRONMENT_UNAVAILABLE\x10\x06\x32\xd4\x08\n\x11\x43loudShellService\x12\x94\x01\n\x0eGetEnvironment\x12,.google.cloud.shell.v1.GetEnvironmentRequest\x1a\".google.cloud.shell.v1.Environment\"0\x82\xd3\xe4\x93\x02#\x12!/v1/{name=users/*/environments/*}\xda\x41\x04name\x12\xcc\x01\n\x10StartEnvironment\x12..google.cloud.shell.v1.StartEnvironmentRequest\x1a\x1d.google.longrunning.Operation\"i\x82\xd3\xe4\x93\x02,\"\'/v1/{name=users/*/environments/*}:start:\x01*\xca\x41\x34\n\x18StartEnvironmentResponse\x12\x18StartEnvironmentMetadata\x12\xe0\x01\n\x14\x41uthorizeEnvironment\x12\x32.google.cloud.shell.v1.AuthorizeEnvironmentRequest\x1a\x1d.google.longrunning.Operation\"u\x82\xd3\xe4\x93\x02\x30\"+/v1/{name=users/*/environments/*}:authorize:\x01*\xca\x41<\n\x1c\x41uthorizeEnvironmentResponse\x12\x1c\x41uthorizeEnvironmentMetadata\x12\xca\x01\n\x0c\x41\x64\x64PublicKey\x12*.google.cloud.shell.v1.AddPublicKeyRequest\x1a\x1d.google.longrunning.Operation\"o\x82\xd3\xe4\x93\x02:\"5/v1/{environment=users/*/environments/*}:addPublicKey:\x01*\xca\x41,\n\x14\x41\x64\x64PublicKeyResponse\x12\x14\x41\x64\x64PublicKeyMetadata\x12\xd9\x01\n\x0fRemovePublicKey\x12-.google.cloud.shell.v1.RemovePublicKeyRequest\x1a\x1d.google.longrunning.Operation\"x\x82\xd3\xe4\x93\x02=\"8/v1/{environment=users/*/environments/*}:removePublicKey:\x01*\xca\x41\x32\n\x17RemovePublicKeyResponse\x12\x17RemovePublicKeyMetadata\x1aM\xca\x41\x19\x63loudshell.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB_\n\x19\x63om.google.cloud.shell.v1B\x0f\x43loudShellProtoP\x01Z/cloud.google.com/go/shell/apiv1/shellpb;shellpbb\x06proto3"
16
+
17
+ pool = Google::Protobuf::DescriptorPool.generated_pool
18
+
19
+ begin
20
+ pool.add_serialized_file(descriptor_data)
21
+ rescue TypeError => e
22
+ # Compatibility code: will be removed in the next major version.
23
+ require 'google/protobuf/descriptor_pb'
24
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
25
+ parsed.clear_dependency
26
+ serialized = parsed.class.encode(parsed)
27
+ file = pool.add_serialized_file(serialized)
28
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
29
+ imports = [
30
+ ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
31
+ ]
32
+ imports.each do |type_name, expected_filename|
33
+ import_file = pool.lookup(type_name).file_descriptor
34
+ if import_file.name != expected_filename
35
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
95
36
  end
96
37
  end
38
+ warn "Each proto file must use a consistent fully-qualified name."
39
+ warn "This will become an error in the next major version."
97
40
  end
98
41
 
99
42
  module Google
@@ -0,0 +1,37 @@
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 "google/cloud/shell/v1/cloud_shell_service/rest"
20
+ require "google/cloud/shell/v1/version"
21
+
22
+ module Google
23
+ module Cloud
24
+ module Shell
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/cloud/shell/v1/rest"
31
+ # client = ::Google::Cloud::Shell::V1::CloudShellService::Rest::Client.new
32
+ #
33
+ module V1
34
+ end
35
+ end
36
+ end
37
+ end
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Shell
23
23
  module V1
24
- VERSION = "0.3.0"
24
+ VERSION = "0.5.0"
25
25
  end
26
26
  end
27
27
  end
@@ -23,13 +23,18 @@ module Google
23
23
  module Cloud
24
24
  module Shell
25
25
  ##
26
- # To load this package, including all its services, and instantiate a client:
26
+ # API client module.
27
27
  #
28
- # @example
28
+ # @example Load this package, including all its services, and instantiate a gRPC client
29
29
  #
30
30
  # require "google/cloud/shell/v1"
31
31
  # client = ::Google::Cloud::Shell::V1::CloudShellService::Client.new
32
32
  #
33
+ # @example Load this package, including all its services, and instantiate a REST client
34
+ #
35
+ # require "google/cloud/shell/v1"
36
+ # client = ::Google::Cloud::Shell::V1::CloudShellService::Rest::Client.new
37
+ #
33
38
  module V1
34
39
  end
35
40
  end