google-cloud-notebooks-v1 0.4.2 → 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.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/google/cloud/notebooks/v1/bindings_override.rb +159 -0
- data/lib/google/cloud/notebooks/v1/managed_notebook_service/client.rb +44 -46
- data/lib/google/cloud/notebooks/v1/managed_notebook_service/operations.rb +12 -14
- data/lib/google/cloud/notebooks/v1/managed_notebook_service/rest/client.rb +1342 -0
- data/lib/google/cloud/notebooks/v1/managed_notebook_service/rest/operations.rb +793 -0
- data/lib/google/cloud/notebooks/v1/managed_notebook_service/rest/service_stub.rb +825 -0
- data/lib/google/cloud/notebooks/v1/managed_notebook_service/rest.rb +54 -0
- data/lib/google/cloud/notebooks/v1/managed_notebook_service.rb +6 -0
- data/lib/google/cloud/notebooks/v1/notebook_service/client.rb +108 -116
- data/lib/google/cloud/notebooks/v1/notebook_service/operations.rb +12 -14
- data/lib/google/cloud/notebooks/v1/notebook_service/rest/client.rb +2898 -0
- data/lib/google/cloud/notebooks/v1/notebook_service/rest/operations.rb +793 -0
- data/lib/google/cloud/notebooks/v1/notebook_service/rest/service_stub.rb +2074 -0
- data/lib/google/cloud/notebooks/v1/notebook_service/rest.rb +54 -0
- data/lib/google/cloud/notebooks/v1/notebook_service.rb +6 -0
- data/lib/google/cloud/notebooks/v1/rest.rb +39 -0
- data/lib/google/cloud/notebooks/v1/version.rb +1 -1
- data/lib/google/cloud/notebooks/v1.rb +5 -0
- metadata +22 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 78e5dcddddef6c57ecbd9eb804c34ce99975360d6421def58c0f8d6b31380fed
|
4
|
+
data.tar.gz: 7d366849246da1f7c3f758ce47336f46bee58e43266d117551cd836b73f9b855
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e6a2b7e1bb8558168dd2eb06d151318d682faa441c6c6b2f22514d817b349a5cf58127af52f343c9b2afb07527174fa429c38fabc8410c163c7a50e8b467b67f
|
7
|
+
data.tar.gz: b3e0324eb03939cbede834dc54c453a6592484629a6acaa0d7b2b16c496da33462cf40096c3635b9edf337ec6da00b718548020e403d72d34c71e6002acef97b
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Ruby Client for the AI Platform Notebooks V1 API
|
2
2
|
|
3
|
-
API
|
3
|
+
Notebooks API is used to manage notebook resources in Google Cloud.
|
4
4
|
|
5
5
|
AI Platform Notebooks makes it easy to manage JupyterLab instances through a protected, publicly available notebook instance URL. A JupyterLab instance is a Deep Learning virtual machine instance with the latest machine learning and data science libraries pre-installed.
|
6
6
|
|
@@ -0,0 +1,159 @@
|
|
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 Notebooks
|
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/notebooks/v1/rest"
|
28
|
+
# client = ::Google::Cloud::Notebooks::V1::ManagedNotebookService::Rest::Client.new
|
29
|
+
#
|
30
|
+
module V1
|
31
|
+
##
|
32
|
+
# @private
|
33
|
+
# Initialize the mixin bindings configuration
|
34
|
+
#
|
35
|
+
def self.configure
|
36
|
+
@configure ||= begin
|
37
|
+
namespace = ["Google", "Cloud", "Notebooks"]
|
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: "/v1/{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: "/v1/{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: "/v1/{resource}:getIamPolicy",
|
72
|
+
matches: [
|
73
|
+
["resource", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false]
|
74
|
+
],
|
75
|
+
body: nil
|
76
|
+
),
|
77
|
+
Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
|
78
|
+
uri_method: :get,
|
79
|
+
uri_template: "/v1/{resource}:getIamPolicy",
|
80
|
+
matches: [
|
81
|
+
["resource", %r{^projects/[^/]+/locations/[^/]+/runtimes/[^/]+/?$}, false]
|
82
|
+
],
|
83
|
+
body: nil
|
84
|
+
)
|
85
|
+
]
|
86
|
+
default_config.bindings_override["google.iam.v1.IAMPolicy.SetIamPolicy"] = [
|
87
|
+
|
88
|
+
Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
|
89
|
+
uri_method: :post,
|
90
|
+
uri_template: "/v1/{resource}:setIamPolicy",
|
91
|
+
matches: [
|
92
|
+
["resource", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false]
|
93
|
+
],
|
94
|
+
body: "*"
|
95
|
+
),
|
96
|
+
Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
|
97
|
+
uri_method: :post,
|
98
|
+
uri_template: "/v1/{resource}:setIamPolicy",
|
99
|
+
matches: [
|
100
|
+
["resource", %r{^projects/[^/]+/locations/[^/]+/runtimes/[^/]+/?$}, false]
|
101
|
+
],
|
102
|
+
body: "*"
|
103
|
+
)
|
104
|
+
]
|
105
|
+
default_config.bindings_override["google.iam.v1.IAMPolicy.TestIamPermissions"] = [
|
106
|
+
|
107
|
+
Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
|
108
|
+
uri_method: :post,
|
109
|
+
uri_template: "/v1/{resource}:testIamPermissions",
|
110
|
+
matches: [
|
111
|
+
["resource", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false]
|
112
|
+
],
|
113
|
+
body: "*"
|
114
|
+
),
|
115
|
+
Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
|
116
|
+
uri_method: :post,
|
117
|
+
uri_template: "/v1/{resource}:testIamPermissions",
|
118
|
+
matches: [
|
119
|
+
["resource", %r{^projects/[^/]+/locations/[^/]+/runtimes/[^/]+/?$}, false]
|
120
|
+
],
|
121
|
+
body: "*"
|
122
|
+
)
|
123
|
+
]
|
124
|
+
default_config
|
125
|
+
end
|
126
|
+
yield @configure if block_given?
|
127
|
+
@configure
|
128
|
+
end
|
129
|
+
|
130
|
+
##
|
131
|
+
# @private
|
132
|
+
# Configuration class for the google.cloud.notebooks.v1 package.
|
133
|
+
#
|
134
|
+
# This class contains common configuration for all services
|
135
|
+
# of the google.cloud.notebooks.v1 package.
|
136
|
+
#
|
137
|
+
# This configuration is for internal use of the client library classes,
|
138
|
+
# and it is not intended that the end-users will read or change it.
|
139
|
+
#
|
140
|
+
class Configuration
|
141
|
+
extend ::Gapic::Config
|
142
|
+
|
143
|
+
# @private
|
144
|
+
# Overrides for http bindings for the RPC of the mixins for this package.
|
145
|
+
# Services in this package should use these when creating clients for the mixin services.
|
146
|
+
# @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
|
147
|
+
config_attr :bindings_override, {}, ::Hash, nil
|
148
|
+
|
149
|
+
# @private
|
150
|
+
def initialize parent_config = nil
|
151
|
+
@parent_config = parent_config unless parent_config.nil?
|
152
|
+
|
153
|
+
yield self if block_given?
|
154
|
+
end
|
155
|
+
end
|
156
|
+
end
|
157
|
+
end
|
158
|
+
end
|
159
|
+
end
|
@@ -257,13 +257,11 @@ module Google
|
|
257
257
|
# # Call the list_runtimes method.
|
258
258
|
# result = client.list_runtimes request
|
259
259
|
#
|
260
|
-
# # The returned object is of type Gapic::PagedEnumerable. You can
|
261
|
-
# #
|
262
|
-
#
|
263
|
-
# # methods are also available for managing paging directly.
|
264
|
-
# result.each do |response|
|
260
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
261
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
262
|
+
# result.each do |item|
|
265
263
|
# # Each element is of type ::Google::Cloud::Notebooks::V1::Runtime.
|
266
|
-
# p
|
264
|
+
# p item
|
267
265
|
# end
|
268
266
|
#
|
269
267
|
def list_runtimes request, options = nil
|
@@ -443,14 +441,14 @@ module Google
|
|
443
441
|
# # Call the create_runtime method.
|
444
442
|
# result = client.create_runtime request
|
445
443
|
#
|
446
|
-
# # The returned object is of type Gapic::Operation. You can use
|
447
|
-
# #
|
448
|
-
# #
|
444
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
445
|
+
# # check the status of an operation, cancel it, or wait for results.
|
446
|
+
# # Here is how to wait for a response.
|
449
447
|
# result.wait_until_done! timeout: 60
|
450
448
|
# if result.response?
|
451
449
|
# p result.response
|
452
450
|
# else
|
453
|
-
# puts "
|
451
|
+
# puts "No response received."
|
454
452
|
# end
|
455
453
|
#
|
456
454
|
def create_runtime request, options = nil
|
@@ -562,14 +560,14 @@ module Google
|
|
562
560
|
# # Call the update_runtime method.
|
563
561
|
# result = client.update_runtime request
|
564
562
|
#
|
565
|
-
# # The returned object is of type Gapic::Operation. You can use
|
566
|
-
# #
|
567
|
-
# #
|
563
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
564
|
+
# # check the status of an operation, cancel it, or wait for results.
|
565
|
+
# # Here is how to wait for a response.
|
568
566
|
# result.wait_until_done! timeout: 60
|
569
567
|
# if result.response?
|
570
568
|
# p result.response
|
571
569
|
# else
|
572
|
-
# puts "
|
570
|
+
# puts "No response received."
|
573
571
|
# end
|
574
572
|
#
|
575
573
|
def update_runtime request, options = nil
|
@@ -658,14 +656,14 @@ module Google
|
|
658
656
|
# # Call the delete_runtime method.
|
659
657
|
# result = client.delete_runtime request
|
660
658
|
#
|
661
|
-
# # The returned object is of type Gapic::Operation. You can use
|
662
|
-
# #
|
663
|
-
# #
|
659
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
660
|
+
# # check the status of an operation, cancel it, or wait for results.
|
661
|
+
# # Here is how to wait for a response.
|
664
662
|
# result.wait_until_done! timeout: 60
|
665
663
|
# if result.response?
|
666
664
|
# p result.response
|
667
665
|
# else
|
668
|
-
# puts "
|
666
|
+
# puts "No response received."
|
669
667
|
# end
|
670
668
|
#
|
671
669
|
def delete_runtime request, options = nil
|
@@ -758,14 +756,14 @@ module Google
|
|
758
756
|
# # Call the start_runtime method.
|
759
757
|
# result = client.start_runtime request
|
760
758
|
#
|
761
|
-
# # The returned object is of type Gapic::Operation. You can use
|
762
|
-
# #
|
763
|
-
# #
|
759
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
760
|
+
# # check the status of an operation, cancel it, or wait for results.
|
761
|
+
# # Here is how to wait for a response.
|
764
762
|
# result.wait_until_done! timeout: 60
|
765
763
|
# if result.response?
|
766
764
|
# p result.response
|
767
765
|
# else
|
768
|
-
# puts "
|
766
|
+
# puts "No response received."
|
769
767
|
# end
|
770
768
|
#
|
771
769
|
def start_runtime request, options = nil
|
@@ -858,14 +856,14 @@ module Google
|
|
858
856
|
# # Call the stop_runtime method.
|
859
857
|
# result = client.stop_runtime request
|
860
858
|
#
|
861
|
-
# # The returned object is of type Gapic::Operation. You can use
|
862
|
-
# #
|
863
|
-
# #
|
859
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
860
|
+
# # check the status of an operation, cancel it, or wait for results.
|
861
|
+
# # Here is how to wait for a response.
|
864
862
|
# result.wait_until_done! timeout: 60
|
865
863
|
# if result.response?
|
866
864
|
# p result.response
|
867
865
|
# else
|
868
|
-
# puts "
|
866
|
+
# puts "No response received."
|
869
867
|
# end
|
870
868
|
#
|
871
869
|
def stop_runtime request, options = nil
|
@@ -958,14 +956,14 @@ module Google
|
|
958
956
|
# # Call the switch_runtime method.
|
959
957
|
# result = client.switch_runtime request
|
960
958
|
#
|
961
|
-
# # The returned object is of type Gapic::Operation. You can use
|
962
|
-
# #
|
963
|
-
# #
|
959
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
960
|
+
# # check the status of an operation, cancel it, or wait for results.
|
961
|
+
# # Here is how to wait for a response.
|
964
962
|
# result.wait_until_done! timeout: 60
|
965
963
|
# if result.response?
|
966
964
|
# p result.response
|
967
965
|
# else
|
968
|
-
# puts "
|
966
|
+
# puts "No response received."
|
969
967
|
# end
|
970
968
|
#
|
971
969
|
def switch_runtime request, options = nil
|
@@ -1054,14 +1052,14 @@ module Google
|
|
1054
1052
|
# # Call the reset_runtime method.
|
1055
1053
|
# result = client.reset_runtime request
|
1056
1054
|
#
|
1057
|
-
# # The returned object is of type Gapic::Operation. You can use
|
1058
|
-
# #
|
1059
|
-
# #
|
1055
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1056
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1057
|
+
# # Here is how to wait for a response.
|
1060
1058
|
# result.wait_until_done! timeout: 60
|
1061
1059
|
# if result.response?
|
1062
1060
|
# p result.response
|
1063
1061
|
# else
|
1064
|
-
# puts "
|
1062
|
+
# puts "No response received."
|
1065
1063
|
# end
|
1066
1064
|
#
|
1067
1065
|
def reset_runtime request, options = nil
|
@@ -1150,14 +1148,14 @@ module Google
|
|
1150
1148
|
# # Call the upgrade_runtime method.
|
1151
1149
|
# result = client.upgrade_runtime request
|
1152
1150
|
#
|
1153
|
-
# # The returned object is of type Gapic::Operation. You can use
|
1154
|
-
# #
|
1155
|
-
# #
|
1151
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1152
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1153
|
+
# # Here is how to wait for a response.
|
1156
1154
|
# result.wait_until_done! timeout: 60
|
1157
1155
|
# if result.response?
|
1158
1156
|
# p result.response
|
1159
1157
|
# else
|
1160
|
-
# puts "
|
1158
|
+
# puts "No response received."
|
1161
1159
|
# end
|
1162
1160
|
#
|
1163
1161
|
def upgrade_runtime request, options = nil
|
@@ -1249,14 +1247,14 @@ module Google
|
|
1249
1247
|
# # Call the report_runtime_event method.
|
1250
1248
|
# result = client.report_runtime_event request
|
1251
1249
|
#
|
1252
|
-
# # The returned object is of type Gapic::Operation. You can use
|
1253
|
-
# #
|
1254
|
-
# #
|
1250
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1251
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1252
|
+
# # Here is how to wait for a response.
|
1255
1253
|
# result.wait_until_done! timeout: 60
|
1256
1254
|
# if result.response?
|
1257
1255
|
# p result.response
|
1258
1256
|
# else
|
1259
|
-
# puts "
|
1257
|
+
# puts "No response received."
|
1260
1258
|
# end
|
1261
1259
|
#
|
1262
1260
|
def report_runtime_event request, options = nil
|
@@ -1435,14 +1433,14 @@ module Google
|
|
1435
1433
|
# # Call the diagnose_runtime method.
|
1436
1434
|
# result = client.diagnose_runtime request
|
1437
1435
|
#
|
1438
|
-
# # The returned object is of type Gapic::Operation. You can use
|
1439
|
-
# #
|
1440
|
-
# #
|
1436
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1437
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1438
|
+
# # Here is how to wait for a response.
|
1441
1439
|
# result.wait_until_done! timeout: 60
|
1442
1440
|
# if result.response?
|
1443
1441
|
# p result.response
|
1444
1442
|
# else
|
1445
|
-
# puts "
|
1443
|
+
# puts "No response received."
|
1446
1444
|
# end
|
1447
1445
|
#
|
1448
1446
|
def diagnose_runtime 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
|
-
# #
|
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
|