google-cloud-dataproc 0.2.2 → 0.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.
Files changed (55) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/lib/google/cloud/dataproc.rb +56 -3
  4. data/lib/google/cloud/dataproc/v1.rb +62 -3
  5. data/lib/google/cloud/dataproc/v1/cluster_controller_client.rb +65 -5
  6. data/lib/google/cloud/dataproc/v1/cluster_controller_client_config.json +10 -7
  7. data/lib/google/cloud/dataproc/v1/clusters_pb.rb +11 -0
  8. data/lib/google/cloud/dataproc/v1/clusters_services_pb.rb +3 -2
  9. data/lib/google/cloud/dataproc/v1/credentials.rb +1 -1
  10. data/lib/google/cloud/dataproc/v1/doc/google/cloud/dataproc/v1/clusters.rb +128 -45
  11. data/lib/google/cloud/dataproc/v1/doc/google/cloud/dataproc/v1/jobs.rb +32 -15
  12. data/lib/google/cloud/dataproc/v1/doc/google/cloud/dataproc/v1/workflow_templates.rb +519 -0
  13. data/lib/google/cloud/dataproc/v1/doc/google/longrunning/operations.rb +1 -43
  14. data/lib/google/cloud/dataproc/v1/doc/google/protobuf/any.rb +1 -1
  15. data/lib/google/cloud/dataproc/v1/doc/google/protobuf/duration.rb +1 -1
  16. data/lib/google/cloud/dataproc/v1/doc/google/protobuf/empty.rb +1 -1
  17. data/lib/google/cloud/dataproc/v1/doc/google/protobuf/field_mask.rb +1 -1
  18. data/lib/google/cloud/dataproc/v1/doc/google/protobuf/timestamp.rb +1 -1
  19. data/lib/google/cloud/dataproc/v1/doc/google/rpc/status.rb +1 -1
  20. data/lib/google/cloud/dataproc/v1/job_controller_client.rb +16 -2
  21. data/lib/google/cloud/dataproc/v1/job_controller_client_config.json +9 -6
  22. data/lib/google/cloud/dataproc/v1/jobs_pb.rb +2 -0
  23. data/lib/google/cloud/dataproc/v1/jobs_services_pb.rb +2 -1
  24. data/lib/google/cloud/dataproc/v1/operations_pb.rb +0 -2
  25. data/lib/google/cloud/dataproc/v1/workflow_template_service_client.rb +690 -0
  26. data/lib/google/cloud/dataproc/v1/workflow_template_service_client_config.json +64 -0
  27. data/lib/google/cloud/dataproc/v1/workflow_templates_pb.rb +181 -0
  28. data/lib/google/cloud/dataproc/v1/workflow_templates_services_pb.rb +102 -0
  29. data/lib/google/cloud/dataproc/v1beta2.rb +281 -0
  30. data/lib/google/cloud/dataproc/v1beta2/cluster_controller_client.rb +799 -0
  31. data/lib/google/cloud/dataproc/v1beta2/cluster_controller_client_config.json +59 -0
  32. data/lib/google/cloud/dataproc/v1beta2/clusters_pb.rb +189 -0
  33. data/lib/google/cloud/dataproc/v1beta2/clusters_services_pb.rb +60 -0
  34. data/lib/google/cloud/dataproc/v1beta2/credentials.rb +41 -0
  35. data/lib/google/cloud/dataproc/v1beta2/doc/google/cloud/dataproc/v1beta2/clusters.rb +666 -0
  36. data/lib/google/cloud/dataproc/v1beta2/doc/google/cloud/dataproc/v1beta2/jobs.rb +691 -0
  37. data/lib/google/cloud/dataproc/v1beta2/doc/google/cloud/dataproc/v1beta2/workflow_templates.rb +524 -0
  38. data/lib/google/cloud/dataproc/v1beta2/doc/google/longrunning/operations.rb +51 -0
  39. data/lib/google/cloud/dataproc/v1beta2/doc/google/protobuf/any.rb +130 -0
  40. data/lib/google/cloud/dataproc/v1beta2/doc/google/protobuf/duration.rb +91 -0
  41. data/lib/google/cloud/dataproc/v1beta2/doc/google/protobuf/empty.rb +29 -0
  42. data/lib/google/cloud/dataproc/v1beta2/doc/google/protobuf/field_mask.rb +230 -0
  43. data/lib/google/cloud/dataproc/v1beta2/doc/google/protobuf/timestamp.rb +109 -0
  44. data/lib/google/cloud/dataproc/v1beta2/doc/google/rpc/status.rb +84 -0
  45. data/lib/google/cloud/dataproc/v1beta2/job_controller_client.rb +581 -0
  46. data/lib/google/cloud/dataproc/v1beta2/job_controller_client_config.json +59 -0
  47. data/lib/google/cloud/dataproc/v1beta2/jobs_pb.rb +248 -0
  48. data/lib/google/cloud/dataproc/v1beta2/jobs_services_pb.rb +61 -0
  49. data/lib/google/cloud/dataproc/v1beta2/operations_pb.rb +44 -0
  50. data/lib/google/cloud/dataproc/v1beta2/shared_pb.rb +18 -0
  51. data/lib/google/cloud/dataproc/v1beta2/workflow_template_service_client.rb +698 -0
  52. data/lib/google/cloud/dataproc/v1beta2/workflow_template_service_client_config.json +64 -0
  53. data/lib/google/cloud/dataproc/v1beta2/workflow_templates_pb.rb +183 -0
  54. data/lib/google/cloud/dataproc/v1beta2/workflow_templates_services_pb.rb +102 -0
  55. metadata +36 -5
@@ -0,0 +1,64 @@
1
+ {
2
+ "interfaces": {
3
+ "google.cloud.dataproc.v1.WorkflowTemplateService": {
4
+ "retry_codes": {
5
+ "idempotent": [
6
+ "DEADLINE_EXCEEDED",
7
+ "INTERNAL",
8
+ "UNAVAILABLE"
9
+ ],
10
+ "non_idempotent": [
11
+ "UNAVAILABLE"
12
+ ]
13
+ },
14
+ "retry_params": {
15
+ "default": {
16
+ "initial_retry_delay_millis": 100,
17
+ "retry_delay_multiplier": 1.3,
18
+ "max_retry_delay_millis": 60000,
19
+ "initial_rpc_timeout_millis": 20000,
20
+ "rpc_timeout_multiplier": 1.0,
21
+ "max_rpc_timeout_millis": 20000,
22
+ "total_timeout_millis": 600000
23
+ }
24
+ },
25
+ "methods": {
26
+ "CreateWorkflowTemplate": {
27
+ "timeout_millis": 30000,
28
+ "retry_codes_name": "non_idempotent",
29
+ "retry_params_name": "default"
30
+ },
31
+ "GetWorkflowTemplate": {
32
+ "timeout_millis": 60000,
33
+ "retry_codes_name": "idempotent",
34
+ "retry_params_name": "default"
35
+ },
36
+ "InstantiateWorkflowTemplate": {
37
+ "timeout_millis": 60000,
38
+ "retry_codes_name": "non_idempotent",
39
+ "retry_params_name": "default"
40
+ },
41
+ "InstantiateInlineWorkflowTemplate": {
42
+ "timeout_millis": 60000,
43
+ "retry_codes_name": "non_idempotent",
44
+ "retry_params_name": "default"
45
+ },
46
+ "UpdateWorkflowTemplate": {
47
+ "timeout_millis": 60000,
48
+ "retry_codes_name": "non_idempotent",
49
+ "retry_params_name": "default"
50
+ },
51
+ "ListWorkflowTemplates": {
52
+ "timeout_millis": 60000,
53
+ "retry_codes_name": "idempotent",
54
+ "retry_params_name": "default"
55
+ },
56
+ "DeleteWorkflowTemplate": {
57
+ "timeout_millis": 60000,
58
+ "retry_codes_name": "non_idempotent",
59
+ "retry_params_name": "default"
60
+ }
61
+ }
62
+ }
63
+ }
64
+ }
@@ -0,0 +1,181 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: google/cloud/dataproc/v1/workflow_templates.proto
3
+
4
+
5
+ require 'google/protobuf'
6
+
7
+ require 'google/api/annotations_pb'
8
+ require 'google/cloud/dataproc/v1/clusters_pb'
9
+ require 'google/cloud/dataproc/v1/jobs_pb'
10
+ require 'google/longrunning/operations_pb'
11
+ require 'google/protobuf/empty_pb'
12
+ require 'google/protobuf/timestamp_pb'
13
+ Google::Protobuf::DescriptorPool.generated_pool.build do
14
+ add_message "google.cloud.dataproc.v1.WorkflowTemplate" do
15
+ optional :id, :string, 2
16
+ optional :name, :string, 1
17
+ optional :version, :int32, 3
18
+ optional :create_time, :message, 4, "google.protobuf.Timestamp"
19
+ optional :update_time, :message, 5, "google.protobuf.Timestamp"
20
+ map :labels, :string, :string, 6
21
+ optional :placement, :message, 7, "google.cloud.dataproc.v1.WorkflowTemplatePlacement"
22
+ repeated :jobs, :message, 8, "google.cloud.dataproc.v1.OrderedJob"
23
+ repeated :parameters, :message, 9, "google.cloud.dataproc.v1.TemplateParameter"
24
+ end
25
+ add_message "google.cloud.dataproc.v1.WorkflowTemplatePlacement" do
26
+ oneof :placement do
27
+ optional :managed_cluster, :message, 1, "google.cloud.dataproc.v1.ManagedCluster"
28
+ optional :cluster_selector, :message, 2, "google.cloud.dataproc.v1.ClusterSelector"
29
+ end
30
+ end
31
+ add_message "google.cloud.dataproc.v1.ManagedCluster" do
32
+ optional :cluster_name, :string, 2
33
+ optional :config, :message, 3, "google.cloud.dataproc.v1.ClusterConfig"
34
+ map :labels, :string, :string, 4
35
+ end
36
+ add_message "google.cloud.dataproc.v1.ClusterSelector" do
37
+ optional :zone, :string, 1
38
+ map :cluster_labels, :string, :string, 2
39
+ end
40
+ add_message "google.cloud.dataproc.v1.OrderedJob" do
41
+ optional :step_id, :string, 1
42
+ map :labels, :string, :string, 8
43
+ optional :scheduling, :message, 9, "google.cloud.dataproc.v1.JobScheduling"
44
+ repeated :prerequisite_step_ids, :string, 10
45
+ oneof :job_type do
46
+ optional :hadoop_job, :message, 2, "google.cloud.dataproc.v1.HadoopJob"
47
+ optional :spark_job, :message, 3, "google.cloud.dataproc.v1.SparkJob"
48
+ optional :pyspark_job, :message, 4, "google.cloud.dataproc.v1.PySparkJob"
49
+ optional :hive_job, :message, 5, "google.cloud.dataproc.v1.HiveJob"
50
+ optional :pig_job, :message, 6, "google.cloud.dataproc.v1.PigJob"
51
+ optional :spark_sql_job, :message, 7, "google.cloud.dataproc.v1.SparkSqlJob"
52
+ end
53
+ end
54
+ add_message "google.cloud.dataproc.v1.TemplateParameter" do
55
+ optional :name, :string, 1
56
+ repeated :fields, :string, 2
57
+ optional :description, :string, 3
58
+ optional :validation, :message, 4, "google.cloud.dataproc.v1.ParameterValidation"
59
+ end
60
+ add_message "google.cloud.dataproc.v1.ParameterValidation" do
61
+ oneof :validation_type do
62
+ optional :regex, :message, 1, "google.cloud.dataproc.v1.RegexValidation"
63
+ optional :values, :message, 2, "google.cloud.dataproc.v1.ValueValidation"
64
+ end
65
+ end
66
+ add_message "google.cloud.dataproc.v1.RegexValidation" do
67
+ repeated :regexes, :string, 1
68
+ end
69
+ add_message "google.cloud.dataproc.v1.ValueValidation" do
70
+ repeated :values, :string, 1
71
+ end
72
+ add_message "google.cloud.dataproc.v1.WorkflowMetadata" do
73
+ optional :template, :string, 1
74
+ optional :version, :int32, 2
75
+ optional :create_cluster, :message, 3, "google.cloud.dataproc.v1.ClusterOperation"
76
+ optional :graph, :message, 4, "google.cloud.dataproc.v1.WorkflowGraph"
77
+ optional :delete_cluster, :message, 5, "google.cloud.dataproc.v1.ClusterOperation"
78
+ optional :state, :enum, 6, "google.cloud.dataproc.v1.WorkflowMetadata.State"
79
+ optional :cluster_name, :string, 7
80
+ map :parameters, :string, :string, 8
81
+ optional :start_time, :message, 9, "google.protobuf.Timestamp"
82
+ optional :end_time, :message, 10, "google.protobuf.Timestamp"
83
+ optional :cluster_uuid, :string, 11
84
+ end
85
+ add_enum "google.cloud.dataproc.v1.WorkflowMetadata.State" do
86
+ value :UNKNOWN, 0
87
+ value :PENDING, 1
88
+ value :RUNNING, 2
89
+ value :DONE, 3
90
+ end
91
+ add_message "google.cloud.dataproc.v1.ClusterOperation" do
92
+ optional :operation_id, :string, 1
93
+ optional :error, :string, 2
94
+ optional :done, :bool, 3
95
+ end
96
+ add_message "google.cloud.dataproc.v1.WorkflowGraph" do
97
+ repeated :nodes, :message, 1, "google.cloud.dataproc.v1.WorkflowNode"
98
+ end
99
+ add_message "google.cloud.dataproc.v1.WorkflowNode" do
100
+ optional :step_id, :string, 1
101
+ repeated :prerequisite_step_ids, :string, 2
102
+ optional :job_id, :string, 3
103
+ optional :state, :enum, 5, "google.cloud.dataproc.v1.WorkflowNode.NodeState"
104
+ optional :error, :string, 6
105
+ end
106
+ add_enum "google.cloud.dataproc.v1.WorkflowNode.NodeState" do
107
+ value :NODE_STATE_UNSPECIFIED, 0
108
+ value :BLOCKED, 1
109
+ value :RUNNABLE, 2
110
+ value :RUNNING, 3
111
+ value :COMPLETED, 4
112
+ value :FAILED, 5
113
+ end
114
+ add_message "google.cloud.dataproc.v1.CreateWorkflowTemplateRequest" do
115
+ optional :parent, :string, 1
116
+ optional :template, :message, 2, "google.cloud.dataproc.v1.WorkflowTemplate"
117
+ end
118
+ add_message "google.cloud.dataproc.v1.GetWorkflowTemplateRequest" do
119
+ optional :name, :string, 1
120
+ optional :version, :int32, 2
121
+ end
122
+ add_message "google.cloud.dataproc.v1.InstantiateWorkflowTemplateRequest" do
123
+ optional :name, :string, 1
124
+ optional :version, :int32, 2
125
+ optional :request_id, :string, 5
126
+ map :parameters, :string, :string, 6
127
+ end
128
+ add_message "google.cloud.dataproc.v1.InstantiateInlineWorkflowTemplateRequest" do
129
+ optional :parent, :string, 1
130
+ optional :template, :message, 2, "google.cloud.dataproc.v1.WorkflowTemplate"
131
+ optional :request_id, :string, 3
132
+ end
133
+ add_message "google.cloud.dataproc.v1.UpdateWorkflowTemplateRequest" do
134
+ optional :template, :message, 1, "google.cloud.dataproc.v1.WorkflowTemplate"
135
+ end
136
+ add_message "google.cloud.dataproc.v1.ListWorkflowTemplatesRequest" do
137
+ optional :parent, :string, 1
138
+ optional :page_size, :int32, 2
139
+ optional :page_token, :string, 3
140
+ end
141
+ add_message "google.cloud.dataproc.v1.ListWorkflowTemplatesResponse" do
142
+ repeated :templates, :message, 1, "google.cloud.dataproc.v1.WorkflowTemplate"
143
+ optional :next_page_token, :string, 2
144
+ end
145
+ add_message "google.cloud.dataproc.v1.DeleteWorkflowTemplateRequest" do
146
+ optional :name, :string, 1
147
+ optional :version, :int32, 2
148
+ end
149
+ end
150
+
151
+ module Google
152
+ module Cloud
153
+ module Dataproc
154
+ module V1
155
+ WorkflowTemplate = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.WorkflowTemplate").msgclass
156
+ WorkflowTemplatePlacement = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.WorkflowTemplatePlacement").msgclass
157
+ ManagedCluster = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.ManagedCluster").msgclass
158
+ ClusterSelector = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.ClusterSelector").msgclass
159
+ OrderedJob = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.OrderedJob").msgclass
160
+ TemplateParameter = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.TemplateParameter").msgclass
161
+ ParameterValidation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.ParameterValidation").msgclass
162
+ RegexValidation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.RegexValidation").msgclass
163
+ ValueValidation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.ValueValidation").msgclass
164
+ WorkflowMetadata = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.WorkflowMetadata").msgclass
165
+ WorkflowMetadata::State = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.WorkflowMetadata.State").enummodule
166
+ ClusterOperation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.ClusterOperation").msgclass
167
+ WorkflowGraph = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.WorkflowGraph").msgclass
168
+ WorkflowNode = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.WorkflowNode").msgclass
169
+ WorkflowNode::NodeState = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.WorkflowNode.NodeState").enummodule
170
+ CreateWorkflowTemplateRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.CreateWorkflowTemplateRequest").msgclass
171
+ GetWorkflowTemplateRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.GetWorkflowTemplateRequest").msgclass
172
+ InstantiateWorkflowTemplateRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.InstantiateWorkflowTemplateRequest").msgclass
173
+ InstantiateInlineWorkflowTemplateRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.InstantiateInlineWorkflowTemplateRequest").msgclass
174
+ UpdateWorkflowTemplateRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.UpdateWorkflowTemplateRequest").msgclass
175
+ ListWorkflowTemplatesRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.ListWorkflowTemplatesRequest").msgclass
176
+ ListWorkflowTemplatesResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.ListWorkflowTemplatesResponse").msgclass
177
+ DeleteWorkflowTemplateRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.DeleteWorkflowTemplateRequest").msgclass
178
+ end
179
+ end
180
+ end
181
+ end
@@ -0,0 +1,102 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # Source: google/cloud/dataproc/v1/workflow_templates.proto for package 'google.cloud.dataproc.v1'
3
+ # Original file comments:
4
+ # Copyright 2018 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
+
20
+
21
+ require 'grpc'
22
+ require 'google/cloud/dataproc/v1/workflow_templates_pb'
23
+
24
+ module Google
25
+ module Cloud
26
+ module Dataproc
27
+ module V1
28
+ module WorkflowTemplateService
29
+ # The API interface for managing Workflow Templates in the
30
+ # Cloud Dataproc API.
31
+ class Service
32
+
33
+ include GRPC::GenericService
34
+
35
+ self.marshal_class_method = :encode
36
+ self.unmarshal_class_method = :decode
37
+ self.service_name = 'google.cloud.dataproc.v1.WorkflowTemplateService'
38
+
39
+ # Creates new workflow template.
40
+ rpc :CreateWorkflowTemplate, CreateWorkflowTemplateRequest, WorkflowTemplate
41
+ # Retrieves the latest workflow template.
42
+ #
43
+ # Can retrieve previously instantiated template by specifying optional
44
+ # version parameter.
45
+ rpc :GetWorkflowTemplate, GetWorkflowTemplateRequest, WorkflowTemplate
46
+ # Instantiates a template and begins execution.
47
+ #
48
+ # The returned Operation can be used to track execution of
49
+ # workflow by polling
50
+ # [operations.get][google.longrunning.Operations.GetOperation].
51
+ # The Operation will complete when entire workflow is finished.
52
+ #
53
+ # The running workflow can be aborted via
54
+ # [operations.cancel][google.longrunning.Operations.CancelOperation].
55
+ # This will cause any inflight jobs to be cancelled and workflow-owned
56
+ # clusters to be deleted.
57
+ #
58
+ # The [Operation.metadata][google.longrunning.Operation.metadata] will be
59
+ # [WorkflowMetadata][google.cloud.dataproc.v1.WorkflowMetadata].
60
+ #
61
+ # On successful completion,
62
+ # [Operation.response][google.longrunning.Operation.response] will be
63
+ # [Empty][google.protobuf.Empty].
64
+ rpc :InstantiateWorkflowTemplate, InstantiateWorkflowTemplateRequest, Google::Longrunning::Operation
65
+ # Instantiates a template and begins execution.
66
+ #
67
+ # This method is equivalent to executing the sequence
68
+ # [CreateWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.CreateWorkflowTemplate], [InstantiateWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.InstantiateWorkflowTemplate],
69
+ # [DeleteWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.DeleteWorkflowTemplate].
70
+ #
71
+ # The returned Operation can be used to track execution of
72
+ # workflow by polling
73
+ # [operations.get][google.longrunning.Operations.GetOperation].
74
+ # The Operation will complete when entire workflow is finished.
75
+ #
76
+ # The running workflow can be aborted via
77
+ # [operations.cancel][google.longrunning.Operations.CancelOperation].
78
+ # This will cause any inflight jobs to be cancelled and workflow-owned
79
+ # clusters to be deleted.
80
+ #
81
+ # The [Operation.metadata][google.longrunning.Operation.metadata] will be
82
+ # [WorkflowMetadata][google.cloud.dataproc.v1.WorkflowMetadata].
83
+ #
84
+ # On successful completion,
85
+ # [Operation.response][google.longrunning.Operation.response] will be
86
+ # [Empty][google.protobuf.Empty].
87
+ rpc :InstantiateInlineWorkflowTemplate, InstantiateInlineWorkflowTemplateRequest, Google::Longrunning::Operation
88
+ # Updates (replaces) workflow template. The updated template
89
+ # must contain version that matches the current server version.
90
+ rpc :UpdateWorkflowTemplate, UpdateWorkflowTemplateRequest, WorkflowTemplate
91
+ # Lists workflows that match the specified filter in the request.
92
+ rpc :ListWorkflowTemplates, ListWorkflowTemplatesRequest, ListWorkflowTemplatesResponse
93
+ # Deletes a workflow template. It does not cancel in-progress workflows.
94
+ rpc :DeleteWorkflowTemplate, DeleteWorkflowTemplateRequest, Google::Protobuf::Empty
95
+ end
96
+
97
+ Stub = Service.rpc_stub_class
98
+ end
99
+ end
100
+ end
101
+ end
102
+ end
@@ -0,0 +1,281 @@
1
+ # Copyright 2019 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # https://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+
16
+ require "google/cloud/dataproc/v1beta2/cluster_controller_client"
17
+ require "google/cloud/dataproc/v1beta2/job_controller_client"
18
+ require "google/cloud/dataproc/v1beta2/workflow_template_service_client"
19
+ require "google/cloud/dataproc/v1beta2/clusters_pb"
20
+ require "google/cloud/dataproc/v1beta2/operations_pb"
21
+ require "google/cloud/dataproc/v1beta2/workflow_templates_pb"
22
+
23
+ module Google
24
+ module Cloud
25
+ module Dataproc
26
+ # rubocop:disable LineLength
27
+
28
+ ##
29
+ # # Ruby Client for Google Cloud Dataproc API ([Alpha](https://github.com/googleapis/google-cloud-ruby#versioning))
30
+ #
31
+ # [Google Cloud Dataproc API][Product Documentation]:
32
+ # Manages Hadoop-based clusters and jobs on Google Cloud Platform.
33
+ # - [Product Documentation][]
34
+ #
35
+ # ## Quick Start
36
+ # In order to use this library, you first need to go through the following
37
+ # steps:
38
+ #
39
+ # 1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
40
+ # 2. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
41
+ # 3. [Enable the Google Cloud Dataproc API.](https://console.cloud.google.com/apis/library/dataproc.googleapis.com)
42
+ # 4. [Setup Authentication.](https://googleapis.github.io/google-cloud-ruby/#/docs/google-cloud/master/guides/authentication)
43
+ #
44
+ # ### Installation
45
+ # ```
46
+ # $ gem install google-cloud-dataproc
47
+ # ```
48
+ #
49
+ # ### Preview
50
+ # #### ClusterControllerClient
51
+ # ```rb
52
+ # require "google/cloud/dataproc"
53
+ #
54
+ # cluster_controller_client = Google::Cloud::Dataproc::ClusterController.new(version: :v1beta2)
55
+ # project_id_2 = project_id
56
+ # region = "global"
57
+ #
58
+ # # Iterate over all results.
59
+ # cluster_controller_client.list_clusters(project_id_2, region).each do |element|
60
+ # # Process element.
61
+ # end
62
+ #
63
+ # # Or iterate over results one page at a time.
64
+ # cluster_controller_client.list_clusters(project_id_2, region).each_page do |page|
65
+ # # Process each page at a time.
66
+ # page.each do |element|
67
+ # # Process element.
68
+ # end
69
+ # end
70
+ # ```
71
+ #
72
+ # ### Next Steps
73
+ # - Read the [Google Cloud Dataproc API Product documentation][Product Documentation]
74
+ # to learn more about the product and see How-to Guides.
75
+ # - View this [repository's main README](https://github.com/googleapis/google-cloud-ruby/blob/master/README.md)
76
+ # to see the full list of Cloud APIs that we cover.
77
+ #
78
+ # [Product Documentation]: https://cloud.google.com/dataproc
79
+ #
80
+ # ## Enabling Logging
81
+ #
82
+ # To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
83
+ # The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib-2.5.0/libdoc/logger/rdoc/Logger.html) as shown below,
84
+ # or a [`Google::Cloud::Logging::Logger`](https://googleapis.github.io/google-cloud-ruby/#/docs/google-cloud-logging/latest/google/cloud/logging/logger)
85
+ # that will write logs to [Stackdriver Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
86
+ # and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
87
+ #
88
+ # Configuring a Ruby stdlib logger:
89
+ #
90
+ # ```ruby
91
+ # require "logger"
92
+ #
93
+ # module MyLogger
94
+ # LOGGER = Logger.new $stderr, level: Logger::WARN
95
+ # def logger
96
+ # LOGGER
97
+ # end
98
+ # end
99
+ #
100
+ # # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
101
+ # module GRPC
102
+ # extend MyLogger
103
+ # end
104
+ # ```
105
+ #
106
+ module V1beta2
107
+ # rubocop:enable LineLength
108
+
109
+ module ClusterController
110
+ ##
111
+ # The ClusterControllerService provides methods to manage clusters
112
+ # of Compute Engine instances.
113
+ #
114
+ # @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc]
115
+ # Provides the means for authenticating requests made by the client. This parameter can
116
+ # be many types.
117
+ # A `Google::Auth::Credentials` uses a the properties of its represented keyfile for
118
+ # authenticating requests made by this client.
119
+ # A `String` will be treated as the path to the keyfile to be used for the construction of
120
+ # credentials for this client.
121
+ # A `Hash` will be treated as the contents of a keyfile to be used for the construction of
122
+ # credentials for this client.
123
+ # A `GRPC::Core::Channel` will be used to make calls through.
124
+ # A `GRPC::Core::ChannelCredentials` for the setting up the RPC client. The channel credentials
125
+ # should already be composed with a `GRPC::Core::CallCredentials` object.
126
+ # A `Proc` will be used as an updater_proc for the Grpc channel. The proc transforms the
127
+ # metadata for requests, generally, to give OAuth credentials.
128
+ # @param scopes [Array<String>]
129
+ # The OAuth scopes for this service. This parameter is ignored if
130
+ # an updater_proc is supplied.
131
+ # @param client_config [Hash]
132
+ # A Hash for call options for each method. See
133
+ # Google::Gax#construct_settings for the structure of
134
+ # this data. Falls back to the default config if not specified
135
+ # or the specified config is missing data points.
136
+ # @param timeout [Numeric]
137
+ # The default timeout, in seconds, for calls made through this client.
138
+ # @param metadata [Hash]
139
+ # Default metadata to be sent with each request. This can be overridden on a per call basis.
140
+ # @param exception_transformer [Proc]
141
+ # An optional proc that intercepts any exceptions raised during an API call to inject
142
+ # custom error handling.
143
+ def self.new \
144
+ credentials: nil,
145
+ scopes: nil,
146
+ client_config: nil,
147
+ timeout: nil,
148
+ metadata: nil,
149
+ exception_transformer: nil,
150
+ lib_name: nil,
151
+ lib_version: nil
152
+ kwargs = {
153
+ credentials: credentials,
154
+ scopes: scopes,
155
+ client_config: client_config,
156
+ timeout: timeout,
157
+ metadata: metadata,
158
+ exception_transformer: exception_transformer,
159
+ lib_name: lib_name,
160
+ lib_version: lib_version
161
+ }.select { |_, v| v != nil }
162
+ Google::Cloud::Dataproc::V1beta2::ClusterControllerClient.new(**kwargs)
163
+ end
164
+ end
165
+
166
+ module JobController
167
+ ##
168
+ # The JobController provides methods to manage jobs.
169
+ #
170
+ # @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc]
171
+ # Provides the means for authenticating requests made by the client. This parameter can
172
+ # be many types.
173
+ # A `Google::Auth::Credentials` uses a the properties of its represented keyfile for
174
+ # authenticating requests made by this client.
175
+ # A `String` will be treated as the path to the keyfile to be used for the construction of
176
+ # credentials for this client.
177
+ # A `Hash` will be treated as the contents of a keyfile to be used for the construction of
178
+ # credentials for this client.
179
+ # A `GRPC::Core::Channel` will be used to make calls through.
180
+ # A `GRPC::Core::ChannelCredentials` for the setting up the RPC client. The channel credentials
181
+ # should already be composed with a `GRPC::Core::CallCredentials` object.
182
+ # A `Proc` will be used as an updater_proc for the Grpc channel. The proc transforms the
183
+ # metadata for requests, generally, to give OAuth credentials.
184
+ # @param scopes [Array<String>]
185
+ # The OAuth scopes for this service. This parameter is ignored if
186
+ # an updater_proc is supplied.
187
+ # @param client_config [Hash]
188
+ # A Hash for call options for each method. See
189
+ # Google::Gax#construct_settings for the structure of
190
+ # this data. Falls back to the default config if not specified
191
+ # or the specified config is missing data points.
192
+ # @param timeout [Numeric]
193
+ # The default timeout, in seconds, for calls made through this client.
194
+ # @param metadata [Hash]
195
+ # Default metadata to be sent with each request. This can be overridden on a per call basis.
196
+ # @param exception_transformer [Proc]
197
+ # An optional proc that intercepts any exceptions raised during an API call to inject
198
+ # custom error handling.
199
+ def self.new \
200
+ credentials: nil,
201
+ scopes: nil,
202
+ client_config: nil,
203
+ timeout: nil,
204
+ metadata: nil,
205
+ exception_transformer: nil,
206
+ lib_name: nil,
207
+ lib_version: nil
208
+ kwargs = {
209
+ credentials: credentials,
210
+ scopes: scopes,
211
+ client_config: client_config,
212
+ timeout: timeout,
213
+ metadata: metadata,
214
+ exception_transformer: exception_transformer,
215
+ lib_name: lib_name,
216
+ lib_version: lib_version
217
+ }.select { |_, v| v != nil }
218
+ Google::Cloud::Dataproc::V1beta2::JobControllerClient.new(**kwargs)
219
+ end
220
+ end
221
+
222
+ module WorkflowTemplateService
223
+ ##
224
+ # The API interface for managing Workflow Templates in the
225
+ # Cloud Dataproc API.
226
+ #
227
+ # @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc]
228
+ # Provides the means for authenticating requests made by the client. This parameter can
229
+ # be many types.
230
+ # A `Google::Auth::Credentials` uses a the properties of its represented keyfile for
231
+ # authenticating requests made by this client.
232
+ # A `String` will be treated as the path to the keyfile to be used for the construction of
233
+ # credentials for this client.
234
+ # A `Hash` will be treated as the contents of a keyfile to be used for the construction of
235
+ # credentials for this client.
236
+ # A `GRPC::Core::Channel` will be used to make calls through.
237
+ # A `GRPC::Core::ChannelCredentials` for the setting up the RPC client. The channel credentials
238
+ # should already be composed with a `GRPC::Core::CallCredentials` object.
239
+ # A `Proc` will be used as an updater_proc for the Grpc channel. The proc transforms the
240
+ # metadata for requests, generally, to give OAuth credentials.
241
+ # @param scopes [Array<String>]
242
+ # The OAuth scopes for this service. This parameter is ignored if
243
+ # an updater_proc is supplied.
244
+ # @param client_config [Hash]
245
+ # A Hash for call options for each method. See
246
+ # Google::Gax#construct_settings for the structure of
247
+ # this data. Falls back to the default config if not specified
248
+ # or the specified config is missing data points.
249
+ # @param timeout [Numeric]
250
+ # The default timeout, in seconds, for calls made through this client.
251
+ # @param metadata [Hash]
252
+ # Default metadata to be sent with each request. This can be overridden on a per call basis.
253
+ # @param exception_transformer [Proc]
254
+ # An optional proc that intercepts any exceptions raised during an API call to inject
255
+ # custom error handling.
256
+ def self.new \
257
+ credentials: nil,
258
+ scopes: nil,
259
+ client_config: nil,
260
+ timeout: nil,
261
+ metadata: nil,
262
+ exception_transformer: nil,
263
+ lib_name: nil,
264
+ lib_version: nil
265
+ kwargs = {
266
+ credentials: credentials,
267
+ scopes: scopes,
268
+ client_config: client_config,
269
+ timeout: timeout,
270
+ metadata: metadata,
271
+ exception_transformer: exception_transformer,
272
+ lib_name: lib_name,
273
+ lib_version: lib_version
274
+ }.select { |_, v| v != nil }
275
+ Google::Cloud::Dataproc::V1beta2::WorkflowTemplateServiceClient.new(**kwargs)
276
+ end
277
+ end
278
+ end
279
+ end
280
+ end
281
+ end