google-cloud-notebooks-v1 0.4.2 → 0.6.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.
Files changed (34) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -2
  3. data/lib/google/cloud/notebooks/v1/bindings_override.rb +159 -0
  4. data/lib/google/cloud/notebooks/v1/diagnostic_config_pb.rb +24 -8
  5. data/lib/google/cloud/notebooks/v1/environment_pb.rb +25 -23
  6. data/lib/google/cloud/notebooks/v1/event_pb.rb +25 -13
  7. data/lib/google/cloud/notebooks/v1/execution_pb.rb +25 -79
  8. data/lib/google/cloud/notebooks/v1/instance_config_pb.rb +24 -5
  9. data/lib/google/cloud/notebooks/v1/instance_pb.rb +26 -146
  10. data/lib/google/cloud/notebooks/v1/managed_notebook_service/client.rb +46 -48
  11. data/lib/google/cloud/notebooks/v1/managed_notebook_service/operations.rb +14 -16
  12. data/lib/google/cloud/notebooks/v1/managed_notebook_service/rest/client.rb +1342 -0
  13. data/lib/google/cloud/notebooks/v1/managed_notebook_service/rest/operations.rb +793 -0
  14. data/lib/google/cloud/notebooks/v1/managed_notebook_service/rest/service_stub.rb +825 -0
  15. data/lib/google/cloud/notebooks/v1/managed_notebook_service/rest.rb +54 -0
  16. data/lib/google/cloud/notebooks/v1/managed_notebook_service.rb +6 -0
  17. data/lib/google/cloud/notebooks/v1/managed_service_pb.rb +29 -68
  18. data/lib/google/cloud/notebooks/v1/notebook_service/client.rb +110 -118
  19. data/lib/google/cloud/notebooks/v1/notebook_service/operations.rb +14 -16
  20. data/lib/google/cloud/notebooks/v1/notebook_service/rest/client.rb +2898 -0
  21. data/lib/google/cloud/notebooks/v1/notebook_service/rest/operations.rb +793 -0
  22. data/lib/google/cloud/notebooks/v1/notebook_service/rest/service_stub.rb +2074 -0
  23. data/lib/google/cloud/notebooks/v1/notebook_service/rest.rb +54 -0
  24. data/lib/google/cloud/notebooks/v1/notebook_service.rb +6 -0
  25. data/lib/google/cloud/notebooks/v1/rest.rb +39 -0
  26. data/lib/google/cloud/notebooks/v1/runtime_pb.rb +26 -152
  27. data/lib/google/cloud/notebooks/v1/schedule_pb.rb +26 -22
  28. data/lib/google/cloud/notebooks/v1/service_pb.rb +31 -196
  29. data/lib/google/cloud/notebooks/v1/version.rb +1 -1
  30. data/lib/google/cloud/notebooks/v1.rb +5 -0
  31. data/proto_docs/google/api/client.rb +67 -4
  32. data/proto_docs/google/protobuf/any.rb +7 -4
  33. data/proto_docs/google/protobuf/timestamp.rb +1 -3
  34. metadata +22 -12
@@ -0,0 +1,54 @@
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/notebooks/v1/version"
24
+ require "google/cloud/notebooks/v1/bindings_override"
25
+
26
+ require "google/cloud/notebooks/v1/managed_notebook_service/credentials"
27
+ require "google/cloud/notebooks/v1/managed_notebook_service/paths"
28
+ require "google/cloud/notebooks/v1/managed_notebook_service/rest/operations"
29
+ require "google/cloud/notebooks/v1/managed_notebook_service/rest/client"
30
+
31
+ module Google
32
+ module Cloud
33
+ module Notebooks
34
+ module V1
35
+ ##
36
+ # API v1 service for Managed Notebooks.
37
+ #
38
+ # To load this service and instantiate a REST client:
39
+ #
40
+ # require "google/cloud/notebooks/v1/managed_notebook_service/rest"
41
+ # client = ::Google::Cloud::Notebooks::V1::ManagedNotebookService::Rest::Client.new
42
+ #
43
+ module ManagedNotebookService
44
+ # Client for the REST transport
45
+ module Rest
46
+ end
47
+ end
48
+ end
49
+ end
50
+ end
51
+ end
52
+
53
+ helper_path = ::File.join __dir__, "rest", "helpers.rb"
54
+ require "google/cloud/notebooks/v1/managed_notebook_service/rest/helpers" if ::File.file? helper_path
@@ -26,6 +26,7 @@ require "google/cloud/notebooks/v1/managed_notebook_service/credentials"
26
26
  require "google/cloud/notebooks/v1/managed_notebook_service/paths"
27
27
  require "google/cloud/notebooks/v1/managed_notebook_service/operations"
28
28
  require "google/cloud/notebooks/v1/managed_notebook_service/client"
29
+ require "google/cloud/notebooks/v1/managed_notebook_service/rest"
29
30
 
30
31
  module Google
31
32
  module Cloud
@@ -39,6 +40,11 @@ module Google
39
40
  # require "google/cloud/notebooks/v1/managed_notebook_service"
40
41
  # client = ::Google::Cloud::Notebooks::V1::ManagedNotebookService::Client.new
41
42
  #
43
+ # @example Load this service and instantiate a REST client
44
+ #
45
+ # require "google/cloud/notebooks/v1/managed_notebook_service/rest"
46
+ # client = ::Google::Cloud::Notebooks::V1::ManagedNotebookService::Rest::Client.new
47
+ #
42
48
  module ManagedNotebookService
43
49
  end
44
50
  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/notebooks/v1/managed_service.proto
3
4
 
@@ -14,76 +15,36 @@ require 'google/longrunning/operations_pb'
14
15
  require 'google/protobuf/field_mask_pb'
15
16
  require 'google/protobuf/timestamp_pb'
16
17
 
17
- Google::Protobuf::DescriptorPool.generated_pool.build do
18
- add_file("google/cloud/notebooks/v1/managed_service.proto", :syntax => :proto3) do
19
- add_message "google.cloud.notebooks.v1.ListRuntimesRequest" do
20
- optional :parent, :string, 1
21
- optional :page_size, :int32, 2
22
- optional :page_token, :string, 3
23
- end
24
- add_message "google.cloud.notebooks.v1.ListRuntimesResponse" do
25
- repeated :runtimes, :message, 1, "google.cloud.notebooks.v1.Runtime"
26
- optional :next_page_token, :string, 2
27
- repeated :unreachable, :string, 3
28
- end
29
- add_message "google.cloud.notebooks.v1.GetRuntimeRequest" do
30
- optional :name, :string, 1
31
- end
32
- add_message "google.cloud.notebooks.v1.CreateRuntimeRequest" do
33
- optional :parent, :string, 1
34
- optional :runtime_id, :string, 2
35
- optional :runtime, :message, 3, "google.cloud.notebooks.v1.Runtime"
36
- optional :request_id, :string, 4
37
- end
38
- add_message "google.cloud.notebooks.v1.DeleteRuntimeRequest" do
39
- optional :name, :string, 1
40
- optional :request_id, :string, 2
41
- end
42
- add_message "google.cloud.notebooks.v1.StartRuntimeRequest" do
43
- optional :name, :string, 1
44
- optional :request_id, :string, 2
45
- end
46
- add_message "google.cloud.notebooks.v1.StopRuntimeRequest" do
47
- optional :name, :string, 1
48
- optional :request_id, :string, 2
49
- end
50
- add_message "google.cloud.notebooks.v1.SwitchRuntimeRequest" do
51
- optional :name, :string, 1
52
- optional :machine_type, :string, 2
53
- optional :accelerator_config, :message, 3, "google.cloud.notebooks.v1.RuntimeAcceleratorConfig"
54
- optional :request_id, :string, 4
55
- end
56
- add_message "google.cloud.notebooks.v1.ResetRuntimeRequest" do
57
- optional :name, :string, 1
58
- optional :request_id, :string, 2
59
- end
60
- add_message "google.cloud.notebooks.v1.UpgradeRuntimeRequest" do
61
- optional :name, :string, 1
62
- optional :request_id, :string, 2
63
- end
64
- add_message "google.cloud.notebooks.v1.ReportRuntimeEventRequest" do
65
- optional :name, :string, 1
66
- optional :vm_id, :string, 2
67
- optional :event, :message, 3, "google.cloud.notebooks.v1.Event"
68
- end
69
- add_message "google.cloud.notebooks.v1.UpdateRuntimeRequest" do
70
- optional :runtime, :message, 1, "google.cloud.notebooks.v1.Runtime"
71
- optional :update_mask, :message, 2, "google.protobuf.FieldMask"
72
- optional :request_id, :string, 3
73
- end
74
- add_message "google.cloud.notebooks.v1.RefreshRuntimeTokenInternalRequest" do
75
- optional :name, :string, 1
76
- optional :vm_id, :string, 2
77
- end
78
- add_message "google.cloud.notebooks.v1.RefreshRuntimeTokenInternalResponse" do
79
- optional :access_token, :string, 1
80
- optional :expire_time, :message, 2, "google.protobuf.Timestamp"
81
- end
82
- add_message "google.cloud.notebooks.v1.DiagnoseRuntimeRequest" do
83
- optional :name, :string, 1
84
- optional :diagnostic_config, :message, 2, "google.cloud.notebooks.v1.DiagnosticConfig"
18
+
19
+ descriptor_data = "\n/google/cloud/notebooks/v1/managed_service.proto\x12\x19google.cloud.notebooks.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x31google/cloud/notebooks/v1/diagnostic_config.proto\x1a%google/cloud/notebooks/v1/event.proto\x1a\'google/cloud/notebooks/v1/runtime.proto\x1a#google/longrunning/operations.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"v\n\x13ListRuntimesRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\x12 notebooks.googleapis.com/Runtime\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"z\n\x14ListRuntimesResponse\x12\x34\n\x08runtimes\x18\x01 \x03(\x0b\x32\".google.cloud.notebooks.v1.Runtime\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"K\n\x11GetRuntimeRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n notebooks.googleapis.com/Runtime\"\xb7\x01\n\x14\x43reateRuntimeRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n notebooks.googleapis.com/Runtime\x12\x17\n\nruntime_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x38\n\x07runtime\x18\x03 \x01(\x0b\x32\".google.cloud.notebooks.v1.RuntimeB\x03\xe0\x41\x02\x12\x12\n\nrequest_id\x18\x04 \x01(\t\"b\n\x14\x44\x65leteRuntimeRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n notebooks.googleapis.com/Runtime\x12\x12\n\nrequest_id\x18\x02 \x01(\t\"<\n\x13StartRuntimeRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\nrequest_id\x18\x02 \x01(\t\";\n\x12StopRuntimeRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\nrequest_id\x18\x02 \x01(\t\"\xa4\x01\n\x14SwitchRuntimeRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x0cmachine_type\x18\x02 \x01(\t\x12O\n\x12\x61\x63\x63\x65lerator_config\x18\x03 \x01(\x0b\x32\x33.google.cloud.notebooks.v1.RuntimeAcceleratorConfig\x12\x12\n\nrequest_id\x18\x04 \x01(\t\"<\n\x13ResetRuntimeRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\nrequest_id\x18\x02 \x01(\t\">\n\x15UpgradeRuntimeRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\nrequest_id\x18\x02 \x01(\t\"\x9d\x01\n\x19ReportRuntimeEventRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n notebooks.googleapis.com/Runtime\x12\x12\n\x05vm_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x05\x65vent\x18\x03 \x01(\x0b\x32 .google.cloud.notebooks.v1.EventB\x03\xe0\x41\x02\"\x9a\x01\n\x14UpdateRuntimeRequest\x12\x38\n\x07runtime\x18\x01 \x01(\x0b\x32\".google.cloud.notebooks.v1.RuntimeB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x12\n\nrequest_id\x18\x03 \x01(\t\"p\n\"RefreshRuntimeTokenInternalRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n notebooks.googleapis.com/Runtime\x12\x12\n\x05vm_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\"q\n#RefreshRuntimeTokenInternalResponse\x12\x14\n\x0c\x61\x63\x63\x65ss_token\x18\x01 \x01(\t\x12\x34\n\x0b\x65xpire_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"\x9d\x01\n\x16\x44iagnoseRuntimeRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n notebooks.googleapis.com/Runtime\x12K\n\x11\x64iagnostic_config\x18\x02 \x01(\x0b\x32+.google.cloud.notebooks.v1.DiagnosticConfigB\x03\xe0\x41\x02\x32\xd2\x15\n\x16ManagedNotebookService\x12\xae\x01\n\x0cListRuntimes\x12..google.cloud.notebooks.v1.ListRuntimesRequest\x1a/.google.cloud.notebooks.v1.ListRuntimesResponse\"=\x82\xd3\xe4\x93\x02.\x12,/v1/{parent=projects/*/locations/*}/runtimes\xda\x41\x06parent\x12\x9b\x01\n\nGetRuntime\x12,.google.cloud.notebooks.v1.GetRuntimeRequest\x1a\".google.cloud.notebooks.v1.Runtime\";\x82\xd3\xe4\x93\x02.\x12,/v1/{name=projects/*/locations/*/runtimes/*}\xda\x41\x04name\x12\xd9\x01\n\rCreateRuntime\x12/.google.cloud.notebooks.v1.CreateRuntimeRequest\x1a\x1d.google.longrunning.Operation\"x\x82\xd3\xe4\x93\x02\x37\",/v1/{parent=projects/*/locations/*}/runtimes:\x07runtime\xda\x41\x19parent,runtime_id,runtime\xca\x41\x1c\n\x07Runtime\x12\x11OperationMetadata\x12\xdb\x01\n\rUpdateRuntime\x12/.google.cloud.notebooks.v1.UpdateRuntimeRequest\x1a\x1d.google.longrunning.Operation\"z\x82\xd3\xe4\x93\x02?24/v1/{runtime.name=projects/*/locations/*/runtimes/*}:\x07runtime\xda\x41\x13runtime,update_mask\xca\x41\x1c\n\x07Runtime\x12\x11OperationMetadata\x12\xc9\x01\n\rDeleteRuntime\x12/.google.cloud.notebooks.v1.DeleteRuntimeRequest\x1a\x1d.google.longrunning.Operation\"h\x82\xd3\xe4\x93\x02.*,/v1/{name=projects/*/locations/*/runtimes/*}\xda\x41\x04name\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\x12\xc2\x01\n\x0cStartRuntime\x12..google.cloud.notebooks.v1.StartRuntimeRequest\x1a\x1d.google.longrunning.Operation\"c\x82\xd3\xe4\x93\x02\x37\"2/v1/{name=projects/*/locations/*/runtimes/*}:start:\x01*\xda\x41\x04name\xca\x41\x1c\n\x07Runtime\x12\x11OperationMetadata\x12\xbf\x01\n\x0bStopRuntime\x12-.google.cloud.notebooks.v1.StopRuntimeRequest\x1a\x1d.google.longrunning.Operation\"b\x82\xd3\xe4\x93\x02\x36\"1/v1/{name=projects/*/locations/*/runtimes/*}:stop:\x01*\xda\x41\x04name\xca\x41\x1c\n\x07Runtime\x12\x11OperationMetadata\x12\xc5\x01\n\rSwitchRuntime\x12/.google.cloud.notebooks.v1.SwitchRuntimeRequest\x1a\x1d.google.longrunning.Operation\"d\x82\xd3\xe4\x93\x02\x38\"3/v1/{name=projects/*/locations/*/runtimes/*}:switch:\x01*\xda\x41\x04name\xca\x41\x1c\n\x07Runtime\x12\x11OperationMetadata\x12\xc2\x01\n\x0cResetRuntime\x12..google.cloud.notebooks.v1.ResetRuntimeRequest\x1a\x1d.google.longrunning.Operation\"c\x82\xd3\xe4\x93\x02\x37\"2/v1/{name=projects/*/locations/*/runtimes/*}:reset:\x01*\xda\x41\x04name\xca\x41\x1c\n\x07Runtime\x12\x11OperationMetadata\x12\xc8\x01\n\x0eUpgradeRuntime\x12\x30.google.cloud.notebooks.v1.UpgradeRuntimeRequest\x1a\x1d.google.longrunning.Operation\"e\x82\xd3\xe4\x93\x02\x39\"4/v1/{name=projects/*/locations/*/runtimes/*}:upgrade:\x01*\xda\x41\x04name\xca\x41\x1c\n\x07Runtime\x12\x11OperationMetadata\x12\xd4\x01\n\x12ReportRuntimeEvent\x12\x34.google.cloud.notebooks.v1.ReportRuntimeEventRequest\x1a\x1d.google.longrunning.Operation\"i\x82\xd3\xe4\x93\x02=\"8/v1/{name=projects/*/locations/*/runtimes/*}:reportEvent:\x01*\xda\x41\x04name\xca\x41\x1c\n\x07Runtime\x12\x11OperationMetadata\x12\xfe\x01\n\x1bRefreshRuntimeTokenInternal\x12=.google.cloud.notebooks.v1.RefreshRuntimeTokenInternalRequest\x1a>.google.cloud.notebooks.v1.RefreshRuntimeTokenInternalResponse\"`\x82\xd3\xe4\x93\x02M\"H/v1/{name=projects/*/locations/*/runtimes/*}:refreshRuntimeTokenInternal:\x01*\xda\x41\nname,vm_id\x12\xdd\x01\n\x0f\x44iagnoseRuntime\x12\x31.google.cloud.notebooks.v1.DiagnoseRuntimeRequest\x1a\x1d.google.longrunning.Operation\"x\x82\xd3\xe4\x93\x02:\"5/v1/{name=projects/*/locations/*/runtimes/*}:diagnose:\x01*\xda\x41\x16name,diagnostic_config\xca\x41\x1c\n\x07Runtime\x12\x11OperationMetadata\x1aL\xca\x41\x18notebooks.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xcc\x01\n\x1d\x63om.google.cloud.notebooks.v1B\x15ManagedNotebooksProtoP\x01Z;cloud.google.com/go/notebooks/apiv1/notebookspb;notebookspb\xaa\x02\x19Google.Cloud.Notebooks.V1\xca\x02\x19Google\\Cloud\\Notebooks\\V1\xea\x02\x1cGoogle::Cloud::Notebooks::V1b\x06proto3"
20
+
21
+ pool = Google::Protobuf::DescriptorPool.generated_pool
22
+
23
+ begin
24
+ pool.add_serialized_file(descriptor_data)
25
+ rescue TypeError => e
26
+ # Compatibility code: will be removed in the next major version.
27
+ require 'google/protobuf/descriptor_pb'
28
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
29
+ parsed.clear_dependency
30
+ serialized = parsed.class.encode(parsed)
31
+ file = pool.add_serialized_file(serialized)
32
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
33
+ imports = [
34
+ ["google.cloud.notebooks.v1.Runtime", "google/cloud/notebooks/v1/runtime.proto"],
35
+ ["google.cloud.notebooks.v1.Event", "google/cloud/notebooks/v1/event.proto"],
36
+ ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"],
37
+ ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
38
+ ["google.cloud.notebooks.v1.DiagnosticConfig", "google/cloud/notebooks/v1/diagnostic_config.proto"],
39
+ ]
40
+ imports.each do |type_name, expected_filename|
41
+ import_file = pool.lookup(type_name).file_descriptor
42
+ if import_file.name != expected_filename
43
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
85
44
  end
86
45
  end
46
+ warn "Each proto file must use a consistent fully-qualified name."
47
+ warn "This will become an error in the next major version."
87
48
  end
88
49
 
89
50
  module Google