google-cloud-dataproc-v1 0.6.3 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +1 -1
  3. data/AUTHENTICATION.md +7 -25
  4. data/README.md +1 -1
  5. data/lib/google/cloud/dataproc/v1/autoscaling_policies_pb.rb +3 -2
  6. data/lib/google/cloud/dataproc/v1/autoscaling_policies_services_pb.rb +1 -1
  7. data/lib/google/cloud/dataproc/v1/autoscaling_policy_service/client.rb +106 -15
  8. data/lib/google/cloud/dataproc/v1/batch_controller/client.rb +719 -0
  9. data/lib/google/cloud/dataproc/v1/batch_controller/credentials.rb +51 -0
  10. data/lib/google/cloud/dataproc/v1/batch_controller/operations.rb +767 -0
  11. data/lib/google/cloud/dataproc/v1/batch_controller/paths.rb +69 -0
  12. data/lib/google/cloud/dataproc/v1/batch_controller.rb +50 -0
  13. data/lib/google/cloud/dataproc/v1/batches_pb.rb +123 -0
  14. data/lib/google/cloud/dataproc/v1/batches_services_pb.rb +52 -0
  15. data/lib/google/cloud/dataproc/v1/cluster_controller/client.rb +266 -49
  16. data/lib/google/cloud/dataproc/v1/cluster_controller/operations.rb +115 -12
  17. data/lib/google/cloud/dataproc/v1/cluster_controller/paths.rb +0 -19
  18. data/lib/google/cloud/dataproc/v1/clusters_pb.rb +23 -10
  19. data/lib/google/cloud/dataproc/v1/clusters_services_pb.rb +3 -1
  20. data/lib/google/cloud/dataproc/v1/job_controller/client.rb +187 -32
  21. data/lib/google/cloud/dataproc/v1/job_controller/operations.rb +115 -12
  22. data/lib/google/cloud/dataproc/v1/jobs_pb.rb +2 -2
  23. data/lib/google/cloud/dataproc/v1/jobs_services_pb.rb +1 -1
  24. data/lib/google/cloud/dataproc/v1/operations_pb.rb +18 -3
  25. data/lib/google/cloud/dataproc/v1/shared_pb.rb +99 -2
  26. data/lib/google/cloud/dataproc/v1/version.rb +1 -1
  27. data/lib/google/cloud/dataproc/v1/workflow_template_service/client.rb +163 -24
  28. data/lib/google/cloud/dataproc/v1/workflow_template_service/operations.rb +115 -12
  29. data/lib/google/cloud/dataproc/v1/workflow_template_service/paths.rb +0 -19
  30. data/lib/google/cloud/dataproc/v1/workflow_templates_pb.rb +2 -2
  31. data/lib/google/cloud/dataproc/v1/workflow_templates_services_pb.rb +2 -3
  32. data/lib/google/cloud/dataproc/v1.rb +1 -0
  33. data/proto_docs/google/api/resource.rb +10 -71
  34. data/proto_docs/google/cloud/dataproc/v1/autoscaling_policies.rb +18 -0
  35. data/proto_docs/google/cloud/dataproc/v1/batches.rb +339 -0
  36. data/proto_docs/google/cloud/dataproc/v1/clusters.rb +117 -47
  37. data/proto_docs/google/cloud/dataproc/v1/jobs.rb +20 -9
  38. data/proto_docs/google/cloud/dataproc/v1/operations.rb +48 -0
  39. data/proto_docs/google/cloud/dataproc/v1/shared.rb +336 -1
  40. data/proto_docs/google/cloud/dataproc/v1/workflow_templates.rb +12 -15
  41. metadata +11 -3
@@ -0,0 +1,69 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2021 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 Cloud
22
+ module Dataproc
23
+ module V1
24
+ module BatchController
25
+ # Path helper methods for the BatchController API.
26
+ module Paths
27
+ ##
28
+ # Create a fully-qualified Batch resource string.
29
+ #
30
+ # The resource will be in the following format:
31
+ #
32
+ # `projects/{project}/locations/{location}/batches/{batch}`
33
+ #
34
+ # @param project [String]
35
+ # @param location [String]
36
+ # @param batch [String]
37
+ #
38
+ # @return [::String]
39
+ def batch_path project:, location:, batch:
40
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
41
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
42
+
43
+ "projects/#{project}/locations/#{location}/batches/#{batch}"
44
+ end
45
+
46
+ ##
47
+ # Create a fully-qualified Location resource string.
48
+ #
49
+ # The resource will be in the following format:
50
+ #
51
+ # `projects/{project}/locations/{location}`
52
+ #
53
+ # @param project [String]
54
+ # @param location [String]
55
+ #
56
+ # @return [::String]
57
+ def location_path project:, location:
58
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
59
+
60
+ "projects/#{project}/locations/#{location}"
61
+ end
62
+
63
+ extend self
64
+ end
65
+ end
66
+ end
67
+ end
68
+ end
69
+ end
@@ -0,0 +1,50 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2021 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/dataproc/v1/version"
24
+
25
+ require "google/cloud/dataproc/v1/batch_controller/credentials"
26
+ require "google/cloud/dataproc/v1/batch_controller/paths"
27
+ require "google/cloud/dataproc/v1/batch_controller/operations"
28
+ require "google/cloud/dataproc/v1/batch_controller/client"
29
+
30
+ module Google
31
+ module Cloud
32
+ module Dataproc
33
+ module V1
34
+ ##
35
+ # The BatchController provides methods to manage batch workloads.
36
+ #
37
+ # To load this service and instantiate a client:
38
+ #
39
+ # require "google/cloud/dataproc/v1/batch_controller"
40
+ # client = ::Google::Cloud::Dataproc::V1::BatchController::Client.new
41
+ #
42
+ module BatchController
43
+ end
44
+ end
45
+ end
46
+ end
47
+ end
48
+
49
+ helper_path = ::File.join __dir__, "batch_controller", "helpers.rb"
50
+ require "google/cloud/dataproc/v1/batch_controller/helpers" if ::File.file? helper_path
@@ -0,0 +1,123 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: google/cloud/dataproc/v1/batches.proto
3
+
4
+ require 'google/api/annotations_pb'
5
+ require 'google/api/client_pb'
6
+ require 'google/api/field_behavior_pb'
7
+ require 'google/api/resource_pb'
8
+ require 'google/cloud/dataproc/v1/shared_pb'
9
+ require 'google/longrunning/operations_pb'
10
+ require 'google/protobuf/empty_pb'
11
+ require 'google/protobuf/timestamp_pb'
12
+ require 'google/protobuf'
13
+
14
+ Google::Protobuf::DescriptorPool.generated_pool.build do
15
+ add_file("google/cloud/dataproc/v1/batches.proto", :syntax => :proto3) do
16
+ add_message "google.cloud.dataproc.v1.CreateBatchRequest" do
17
+ optional :parent, :string, 1
18
+ optional :batch, :message, 2, "google.cloud.dataproc.v1.Batch"
19
+ optional :batch_id, :string, 3
20
+ optional :request_id, :string, 4
21
+ end
22
+ add_message "google.cloud.dataproc.v1.GetBatchRequest" do
23
+ optional :name, :string, 1
24
+ end
25
+ add_message "google.cloud.dataproc.v1.ListBatchesRequest" do
26
+ optional :parent, :string, 1
27
+ optional :page_size, :int32, 2
28
+ optional :page_token, :string, 3
29
+ end
30
+ add_message "google.cloud.dataproc.v1.ListBatchesResponse" do
31
+ repeated :batches, :message, 1, "google.cloud.dataproc.v1.Batch"
32
+ optional :next_page_token, :string, 2
33
+ end
34
+ add_message "google.cloud.dataproc.v1.DeleteBatchRequest" do
35
+ optional :name, :string, 1
36
+ end
37
+ add_message "google.cloud.dataproc.v1.Batch" do
38
+ optional :name, :string, 1
39
+ optional :uuid, :string, 2
40
+ optional :create_time, :message, 3, "google.protobuf.Timestamp"
41
+ optional :runtime_info, :message, 8, "google.cloud.dataproc.v1.RuntimeInfo"
42
+ optional :state, :enum, 9, "google.cloud.dataproc.v1.Batch.State"
43
+ optional :state_message, :string, 10
44
+ optional :state_time, :message, 11, "google.protobuf.Timestamp"
45
+ optional :creator, :string, 12
46
+ map :labels, :string, :string, 13
47
+ optional :runtime_config, :message, 14, "google.cloud.dataproc.v1.RuntimeConfig"
48
+ optional :environment_config, :message, 15, "google.cloud.dataproc.v1.EnvironmentConfig"
49
+ optional :operation, :string, 16
50
+ repeated :state_history, :message, 17, "google.cloud.dataproc.v1.Batch.StateHistory"
51
+ oneof :batch_config do
52
+ optional :pyspark_batch, :message, 4, "google.cloud.dataproc.v1.PySparkBatch"
53
+ optional :spark_batch, :message, 5, "google.cloud.dataproc.v1.SparkBatch"
54
+ optional :spark_r_batch, :message, 6, "google.cloud.dataproc.v1.SparkRBatch"
55
+ optional :spark_sql_batch, :message, 7, "google.cloud.dataproc.v1.SparkSqlBatch"
56
+ end
57
+ end
58
+ add_message "google.cloud.dataproc.v1.Batch.StateHistory" do
59
+ optional :state, :enum, 1, "google.cloud.dataproc.v1.Batch.State"
60
+ optional :state_message, :string, 2
61
+ optional :state_start_time, :message, 3, "google.protobuf.Timestamp"
62
+ end
63
+ add_enum "google.cloud.dataproc.v1.Batch.State" do
64
+ value :STATE_UNSPECIFIED, 0
65
+ value :PENDING, 1
66
+ value :RUNNING, 2
67
+ value :CANCELLING, 3
68
+ value :CANCELLED, 4
69
+ value :SUCCEEDED, 5
70
+ value :FAILED, 6
71
+ end
72
+ add_message "google.cloud.dataproc.v1.PySparkBatch" do
73
+ optional :main_python_file_uri, :string, 1
74
+ repeated :args, :string, 2
75
+ repeated :python_file_uris, :string, 3
76
+ repeated :jar_file_uris, :string, 4
77
+ repeated :file_uris, :string, 5
78
+ repeated :archive_uris, :string, 6
79
+ end
80
+ add_message "google.cloud.dataproc.v1.SparkBatch" do
81
+ repeated :args, :string, 3
82
+ repeated :jar_file_uris, :string, 4
83
+ repeated :file_uris, :string, 5
84
+ repeated :archive_uris, :string, 6
85
+ oneof :driver do
86
+ optional :main_jar_file_uri, :string, 1
87
+ optional :main_class, :string, 2
88
+ end
89
+ end
90
+ add_message "google.cloud.dataproc.v1.SparkRBatch" do
91
+ optional :main_r_file_uri, :string, 1
92
+ repeated :args, :string, 2
93
+ repeated :file_uris, :string, 3
94
+ repeated :archive_uris, :string, 4
95
+ end
96
+ add_message "google.cloud.dataproc.v1.SparkSqlBatch" do
97
+ optional :query_file_uri, :string, 1
98
+ map :query_variables, :string, :string, 2
99
+ repeated :jar_file_uris, :string, 3
100
+ end
101
+ end
102
+ end
103
+
104
+ module Google
105
+ module Cloud
106
+ module Dataproc
107
+ module V1
108
+ CreateBatchRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.CreateBatchRequest").msgclass
109
+ GetBatchRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.GetBatchRequest").msgclass
110
+ ListBatchesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.ListBatchesRequest").msgclass
111
+ ListBatchesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.ListBatchesResponse").msgclass
112
+ DeleteBatchRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.DeleteBatchRequest").msgclass
113
+ Batch = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.Batch").msgclass
114
+ Batch::StateHistory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.Batch.StateHistory").msgclass
115
+ Batch::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.Batch.State").enummodule
116
+ PySparkBatch = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.PySparkBatch").msgclass
117
+ SparkBatch = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.SparkBatch").msgclass
118
+ SparkRBatch = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.SparkRBatch").msgclass
119
+ SparkSqlBatch = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.SparkSqlBatch").msgclass
120
+ end
121
+ end
122
+ end
123
+ end
@@ -0,0 +1,52 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # Source: google/cloud/dataproc/v1/batches.proto for package 'google.cloud.dataproc.v1'
3
+ # Original file comments:
4
+ # Copyright 2021 Google LLC
5
+ #
6
+ # Licensed under the Apache License, Version 2.0 (the "License");
7
+ # you may not use this file except in compliance with the License.
8
+ # You may obtain a copy of the License at
9
+ #
10
+ # http://www.apache.org/licenses/LICENSE-2.0
11
+ #
12
+ # Unless required by applicable law or agreed to in writing, software
13
+ # distributed under the License is distributed on an "AS IS" BASIS,
14
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ # See the License for the specific language governing permissions and
16
+ # limitations under the License.
17
+ #
18
+
19
+ require 'grpc'
20
+ require 'google/cloud/dataproc/v1/batches_pb'
21
+
22
+ module Google
23
+ module Cloud
24
+ module Dataproc
25
+ module V1
26
+ module BatchController
27
+ # The BatchController provides methods to manage batch workloads.
28
+ class Service
29
+
30
+ include ::GRPC::GenericService
31
+
32
+ self.marshal_class_method = :encode
33
+ self.unmarshal_class_method = :decode
34
+ self.service_name = 'google.cloud.dataproc.v1.BatchController'
35
+
36
+ # Creates a batch workload that executes asynchronously.
37
+ rpc :CreateBatch, ::Google::Cloud::Dataproc::V1::CreateBatchRequest, ::Google::Longrunning::Operation
38
+ # Gets the batch workload resource representation.
39
+ rpc :GetBatch, ::Google::Cloud::Dataproc::V1::GetBatchRequest, ::Google::Cloud::Dataproc::V1::Batch
40
+ # Lists batch workloads.
41
+ rpc :ListBatches, ::Google::Cloud::Dataproc::V1::ListBatchesRequest, ::Google::Cloud::Dataproc::V1::ListBatchesResponse
42
+ # Deletes the batch workload resource. If the batch is not in terminal state,
43
+ # the delete fails and the response returns `FAILED_PRECONDITION`.
44
+ rpc :DeleteBatch, ::Google::Cloud::Dataproc::V1::DeleteBatchRequest, ::Google::Protobuf::Empty
45
+ end
46
+
47
+ Stub = Service.rpc_stub_class
48
+ end
49
+ end
50
+ end
51
+ end
52
+ end