diff --git a/packages/google-cloud-dataproc/google/cloud/dataproc_v1/proto/autoscaling_policies_pb2.py b/packages/google-cloud-dataproc/google/cloud/dataproc_v1/proto/autoscaling_policies_pb2.py index 4be07b7b9917..6347f728aa1f 100644 --- a/packages/google-cloud-dataproc/google/cloud/dataproc_v1/proto/autoscaling_policies_pb2.py +++ b/packages/google-cloud-dataproc/google/cloud/dataproc_v1/proto/autoscaling_policies_pb2.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/dataproc_v1/proto/autoscaling_policies.proto - +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection diff --git a/packages/google-cloud-dataproc/google/cloud/dataproc_v1/proto/autoscaling_policies_pb2_grpc.py b/packages/google-cloud-dataproc/google/cloud/dataproc_v1/proto/autoscaling_policies_pb2_grpc.py index 172d18151ed6..1d3e82592b33 100644 --- a/packages/google-cloud-dataproc/google/cloud/dataproc_v1/proto/autoscaling_policies_pb2_grpc.py +++ b/packages/google-cloud-dataproc/google/cloud/dataproc_v1/proto/autoscaling_policies_pb2_grpc.py @@ -1,4 +1,5 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc from google.cloud.dataproc_v1.proto import ( @@ -9,15 +10,15 @@ class AutoscalingPolicyServiceStub(object): """The API interface for managing autoscaling policies in the - Dataproc API. - """ + Dataproc API. + """ def __init__(self, channel): """Constructor. - Args: - channel: A grpc.Channel. - """ + Args: + channel: A grpc.Channel. + """ self.CreateAutoscalingPolicy = channel.unary_unary( "/google.cloud.dataproc.v1.AutoscalingPolicyService/CreateAutoscalingPolicy", request_serializer=google_dot_cloud_dot_dataproc__v1_dot_proto_dot_autoscaling__policies__pb2.CreateAutoscalingPolicyRequest.SerializeToString, @@ -47,12 +48,12 @@ def __init__(self, channel): class AutoscalingPolicyServiceServicer(object): """The API interface for managing autoscaling policies in the - Dataproc API. - """ + Dataproc API. + """ def CreateAutoscalingPolicy(self, request, context): """Creates new autoscaling policy. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -60,31 +61,31 @@ def CreateAutoscalingPolicy(self, request, context): def UpdateAutoscalingPolicy(self, request, context): """Updates (replaces) autoscaling policy. - Disabled check for update_mask, because all updates will be full - replacements. - """ + Disabled check for update_mask, because all updates will be full + replacements. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def GetAutoscalingPolicy(self, request, context): """Retrieves autoscaling policy. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def ListAutoscalingPolicies(self, request, context): """Lists autoscaling policies in the project. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def DeleteAutoscalingPolicy(self, request, context): """Deletes an autoscaling policy. It is an error to delete an autoscaling - policy that is in use by one or more clusters. - """ + policy that is in use by one or more clusters. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -122,3 +123,145 @@ def add_AutoscalingPolicyServiceServicer_to_server(servicer, server): "google.cloud.dataproc.v1.AutoscalingPolicyService", rpc_method_handlers ) server.add_generic_rpc_handlers((generic_handler,)) + + +# This class is part of an EXPERIMENTAL API. +class AutoscalingPolicyService(object): + """The API interface for managing autoscaling policies in the + Dataproc API. + """ + + @staticmethod + def CreateAutoscalingPolicy( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dataproc.v1.AutoscalingPolicyService/CreateAutoscalingPolicy", + google_dot_cloud_dot_dataproc__v1_dot_proto_dot_autoscaling__policies__pb2.CreateAutoscalingPolicyRequest.SerializeToString, + google_dot_cloud_dot_dataproc__v1_dot_proto_dot_autoscaling__policies__pb2.AutoscalingPolicy.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def UpdateAutoscalingPolicy( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dataproc.v1.AutoscalingPolicyService/UpdateAutoscalingPolicy", + google_dot_cloud_dot_dataproc__v1_dot_proto_dot_autoscaling__policies__pb2.UpdateAutoscalingPolicyRequest.SerializeToString, + google_dot_cloud_dot_dataproc__v1_dot_proto_dot_autoscaling__policies__pb2.AutoscalingPolicy.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def GetAutoscalingPolicy( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dataproc.v1.AutoscalingPolicyService/GetAutoscalingPolicy", + google_dot_cloud_dot_dataproc__v1_dot_proto_dot_autoscaling__policies__pb2.GetAutoscalingPolicyRequest.SerializeToString, + google_dot_cloud_dot_dataproc__v1_dot_proto_dot_autoscaling__policies__pb2.AutoscalingPolicy.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def ListAutoscalingPolicies( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dataproc.v1.AutoscalingPolicyService/ListAutoscalingPolicies", + google_dot_cloud_dot_dataproc__v1_dot_proto_dot_autoscaling__policies__pb2.ListAutoscalingPoliciesRequest.SerializeToString, + google_dot_cloud_dot_dataproc__v1_dot_proto_dot_autoscaling__policies__pb2.ListAutoscalingPoliciesResponse.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def DeleteAutoscalingPolicy( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dataproc.v1.AutoscalingPolicyService/DeleteAutoscalingPolicy", + google_dot_cloud_dot_dataproc__v1_dot_proto_dot_autoscaling__policies__pb2.DeleteAutoscalingPolicyRequest.SerializeToString, + google_dot_protobuf_dot_empty__pb2.Empty.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) diff --git a/packages/google-cloud-dataproc/google/cloud/dataproc_v1/proto/clusters_pb2.py b/packages/google-cloud-dataproc/google/cloud/dataproc_v1/proto/clusters_pb2.py index 7f173ea26877..c97bff9786be 100644 --- a/packages/google-cloud-dataproc/google/cloud/dataproc_v1/proto/clusters_pb2.py +++ b/packages/google-cloud-dataproc/google/cloud/dataproc_v1/proto/clusters_pb2.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/dataproc_v1/proto/clusters.proto - +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection diff --git a/packages/google-cloud-dataproc/google/cloud/dataproc_v1/proto/clusters_pb2_grpc.py b/packages/google-cloud-dataproc/google/cloud/dataproc_v1/proto/clusters_pb2_grpc.py index 391133b442f6..8eab4906f239 100644 --- a/packages/google-cloud-dataproc/google/cloud/dataproc_v1/proto/clusters_pb2_grpc.py +++ b/packages/google-cloud-dataproc/google/cloud/dataproc_v1/proto/clusters_pb2_grpc.py @@ -1,4 +1,5 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc from google.cloud.dataproc_v1.proto import ( @@ -11,15 +12,15 @@ class ClusterControllerStub(object): """The ClusterControllerService provides methods to manage clusters - of Compute Engine instances. - """ + of Compute Engine instances. + """ def __init__(self, channel): """Constructor. - Args: - channel: A grpc.Channel. - """ + Args: + channel: A grpc.Channel. + """ self.CreateCluster = channel.unary_unary( "/google.cloud.dataproc.v1.ClusterController/CreateCluster", request_serializer=google_dot_cloud_dot_dataproc__v1_dot_proto_dot_clusters__pb2.CreateClusterRequest.SerializeToString, @@ -54,59 +55,59 @@ def __init__(self, channel): class ClusterControllerServicer(object): """The ClusterControllerService provides methods to manage clusters - of Compute Engine instances. - """ + of Compute Engine instances. + """ def CreateCluster(self, request, context): """Creates a cluster in a project. The returned - [Operation.metadata][google.longrunning.Operation.metadata] will be - [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata). - """ + [Operation.metadata][google.longrunning.Operation.metadata] will be + [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata). + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def UpdateCluster(self, request, context): """Updates a cluster in a project. The returned - [Operation.metadata][google.longrunning.Operation.metadata] will be - [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata). - """ + [Operation.metadata][google.longrunning.Operation.metadata] will be + [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata). + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def DeleteCluster(self, request, context): """Deletes a cluster in a project. The returned - [Operation.metadata][google.longrunning.Operation.metadata] will be - [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata). - """ + [Operation.metadata][google.longrunning.Operation.metadata] will be + [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata). + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def GetCluster(self, request, context): """Gets the resource representation for a cluster in a project. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def ListClusters(self, request, context): """Lists all regions/{region}/clusters in a project alphabetically. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def DiagnoseCluster(self, request, context): """Gets cluster diagnostic information. The returned - [Operation.metadata][google.longrunning.Operation.metadata] will be - [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata). - After the operation completes, - [Operation.response][google.longrunning.Operation.response] - contains - [DiagnoseClusterResults](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#diagnoseclusterresults). - """ + [Operation.metadata][google.longrunning.Operation.metadata] will be + [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata). + After the operation completes, + [Operation.response][google.longrunning.Operation.response] + contains + [DiagnoseClusterResults](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#diagnoseclusterresults). + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -149,3 +150,172 @@ def add_ClusterControllerServicer_to_server(servicer, server): "google.cloud.dataproc.v1.ClusterController", rpc_method_handlers ) server.add_generic_rpc_handlers((generic_handler,)) + + +# This class is part of an EXPERIMENTAL API. +class ClusterController(object): + """The ClusterControllerService provides methods to manage clusters + of Compute Engine instances. + """ + + @staticmethod + def CreateCluster( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dataproc.v1.ClusterController/CreateCluster", + google_dot_cloud_dot_dataproc__v1_dot_proto_dot_clusters__pb2.CreateClusterRequest.SerializeToString, + google_dot_longrunning_dot_operations__pb2.Operation.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def UpdateCluster( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dataproc.v1.ClusterController/UpdateCluster", + google_dot_cloud_dot_dataproc__v1_dot_proto_dot_clusters__pb2.UpdateClusterRequest.SerializeToString, + google_dot_longrunning_dot_operations__pb2.Operation.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def DeleteCluster( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dataproc.v1.ClusterController/DeleteCluster", + google_dot_cloud_dot_dataproc__v1_dot_proto_dot_clusters__pb2.DeleteClusterRequest.SerializeToString, + google_dot_longrunning_dot_operations__pb2.Operation.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def GetCluster( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dataproc.v1.ClusterController/GetCluster", + google_dot_cloud_dot_dataproc__v1_dot_proto_dot_clusters__pb2.GetClusterRequest.SerializeToString, + google_dot_cloud_dot_dataproc__v1_dot_proto_dot_clusters__pb2.Cluster.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def ListClusters( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dataproc.v1.ClusterController/ListClusters", + google_dot_cloud_dot_dataproc__v1_dot_proto_dot_clusters__pb2.ListClustersRequest.SerializeToString, + google_dot_cloud_dot_dataproc__v1_dot_proto_dot_clusters__pb2.ListClustersResponse.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def DiagnoseCluster( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dataproc.v1.ClusterController/DiagnoseCluster", + google_dot_cloud_dot_dataproc__v1_dot_proto_dot_clusters__pb2.DiagnoseClusterRequest.SerializeToString, + google_dot_longrunning_dot_operations__pb2.Operation.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) diff --git a/packages/google-cloud-dataproc/google/cloud/dataproc_v1/proto/jobs_pb2.py b/packages/google-cloud-dataproc/google/cloud/dataproc_v1/proto/jobs_pb2.py index d20e73aebe37..83e4176572b2 100644 --- a/packages/google-cloud-dataproc/google/cloud/dataproc_v1/proto/jobs_pb2.py +++ b/packages/google-cloud-dataproc/google/cloud/dataproc_v1/proto/jobs_pb2.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/dataproc_v1/proto/jobs.proto - +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection diff --git a/packages/google-cloud-dataproc/google/cloud/dataproc_v1/proto/jobs_pb2_grpc.py b/packages/google-cloud-dataproc/google/cloud/dataproc_v1/proto/jobs_pb2_grpc.py index 0f52c0e9e835..106082cba69a 100644 --- a/packages/google-cloud-dataproc/google/cloud/dataproc_v1/proto/jobs_pb2_grpc.py +++ b/packages/google-cloud-dataproc/google/cloud/dataproc_v1/proto/jobs_pb2_grpc.py @@ -1,4 +1,5 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc from google.cloud.dataproc_v1.proto import ( @@ -12,14 +13,14 @@ class JobControllerStub(object): """The JobController provides methods to manage jobs. - """ + """ def __init__(self, channel): """Constructor. - Args: - channel: A grpc.Channel. - """ + Args: + channel: A grpc.Channel. + """ self.SubmitJob = channel.unary_unary( "/google.cloud.dataproc.v1.JobController/SubmitJob", request_serializer=google_dot_cloud_dot_dataproc__v1_dot_proto_dot_jobs__pb2.SubmitJobRequest.SerializeToString, @@ -59,58 +60,58 @@ def __init__(self, channel): class JobControllerServicer(object): """The JobController provides methods to manage jobs. - """ + """ def SubmitJob(self, request, context): """Submits a job to a cluster. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def SubmitJobAsOperation(self, request, context): """Submits job to a cluster. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def GetJob(self, request, context): """Gets the resource representation for a job in a project. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def ListJobs(self, request, context): """Lists regions/{region}/jobs in a project. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def UpdateJob(self, request, context): """Updates a job in a project. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def CancelJob(self, request, context): """Starts a job cancellation request. To access the job resource - after cancellation, call - [regions/{region}/jobs.list](https://cloud.google.com/dataproc/docs/reference/rest/v1/projects.regions.jobs/list) - or - [regions/{region}/jobs.get](https://cloud.google.com/dataproc/docs/reference/rest/v1/projects.regions.jobs/get). - """ + after cancellation, call + [regions/{region}/jobs.list](https://cloud.google.com/dataproc/docs/reference/rest/v1/projects.regions.jobs/list) + or + [regions/{region}/jobs.get](https://cloud.google.com/dataproc/docs/reference/rest/v1/projects.regions.jobs/get). + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def DeleteJob(self, request, context): """Deletes the job from the project. If the job is active, the delete fails, - and the response returns `FAILED_PRECONDITION`. - """ + and the response returns `FAILED_PRECONDITION`. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -158,3 +159,198 @@ def add_JobControllerServicer_to_server(servicer, server): "google.cloud.dataproc.v1.JobController", rpc_method_handlers ) server.add_generic_rpc_handlers((generic_handler,)) + + +# This class is part of an EXPERIMENTAL API. +class JobController(object): + """The JobController provides methods to manage jobs. + """ + + @staticmethod + def SubmitJob( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dataproc.v1.JobController/SubmitJob", + google_dot_cloud_dot_dataproc__v1_dot_proto_dot_jobs__pb2.SubmitJobRequest.SerializeToString, + google_dot_cloud_dot_dataproc__v1_dot_proto_dot_jobs__pb2.Job.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def SubmitJobAsOperation( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dataproc.v1.JobController/SubmitJobAsOperation", + google_dot_cloud_dot_dataproc__v1_dot_proto_dot_jobs__pb2.SubmitJobRequest.SerializeToString, + google_dot_longrunning_dot_operations__pb2.Operation.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def GetJob( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dataproc.v1.JobController/GetJob", + google_dot_cloud_dot_dataproc__v1_dot_proto_dot_jobs__pb2.GetJobRequest.SerializeToString, + google_dot_cloud_dot_dataproc__v1_dot_proto_dot_jobs__pb2.Job.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def ListJobs( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dataproc.v1.JobController/ListJobs", + google_dot_cloud_dot_dataproc__v1_dot_proto_dot_jobs__pb2.ListJobsRequest.SerializeToString, + google_dot_cloud_dot_dataproc__v1_dot_proto_dot_jobs__pb2.ListJobsResponse.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def UpdateJob( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dataproc.v1.JobController/UpdateJob", + google_dot_cloud_dot_dataproc__v1_dot_proto_dot_jobs__pb2.UpdateJobRequest.SerializeToString, + google_dot_cloud_dot_dataproc__v1_dot_proto_dot_jobs__pb2.Job.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def CancelJob( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dataproc.v1.JobController/CancelJob", + google_dot_cloud_dot_dataproc__v1_dot_proto_dot_jobs__pb2.CancelJobRequest.SerializeToString, + google_dot_cloud_dot_dataproc__v1_dot_proto_dot_jobs__pb2.Job.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def DeleteJob( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dataproc.v1.JobController/DeleteJob", + google_dot_cloud_dot_dataproc__v1_dot_proto_dot_jobs__pb2.DeleteJobRequest.SerializeToString, + google_dot_protobuf_dot_empty__pb2.Empty.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) diff --git a/packages/google-cloud-dataproc/google/cloud/dataproc_v1/proto/operations_pb2.py b/packages/google-cloud-dataproc/google/cloud/dataproc_v1/proto/operations_pb2.py index 0d9888f7028d..32caa1382b97 100644 --- a/packages/google-cloud-dataproc/google/cloud/dataproc_v1/proto/operations_pb2.py +++ b/packages/google-cloud-dataproc/google/cloud/dataproc_v1/proto/operations_pb2.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/dataproc_v1/proto/operations.proto - +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection diff --git a/packages/google-cloud-dataproc/google/cloud/dataproc_v1/proto/operations_pb2_grpc.py b/packages/google-cloud-dataproc/google/cloud/dataproc_v1/proto/operations_pb2_grpc.py index 07cb78fe03a9..8a9393943bdf 100644 --- a/packages/google-cloud-dataproc/google/cloud/dataproc_v1/proto/operations_pb2_grpc.py +++ b/packages/google-cloud-dataproc/google/cloud/dataproc_v1/proto/operations_pb2_grpc.py @@ -1,2 +1,3 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc diff --git a/packages/google-cloud-dataproc/google/cloud/dataproc_v1/proto/shared_pb2.py b/packages/google-cloud-dataproc/google/cloud/dataproc_v1/proto/shared_pb2.py index e3c7df440084..4c8495ad6c61 100644 --- a/packages/google-cloud-dataproc/google/cloud/dataproc_v1/proto/shared_pb2.py +++ b/packages/google-cloud-dataproc/google/cloud/dataproc_v1/proto/shared_pb2.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/dataproc_v1/proto/shared.proto - +"""Generated protocol buffer code.""" from google.protobuf.internal import enum_type_wrapper from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message diff --git a/packages/google-cloud-dataproc/google/cloud/dataproc_v1/proto/shared_pb2_grpc.py b/packages/google-cloud-dataproc/google/cloud/dataproc_v1/proto/shared_pb2_grpc.py index 07cb78fe03a9..8a9393943bdf 100644 --- a/packages/google-cloud-dataproc/google/cloud/dataproc_v1/proto/shared_pb2_grpc.py +++ b/packages/google-cloud-dataproc/google/cloud/dataproc_v1/proto/shared_pb2_grpc.py @@ -1,2 +1,3 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc diff --git a/packages/google-cloud-dataproc/google/cloud/dataproc_v1/proto/workflow_templates_pb2.py b/packages/google-cloud-dataproc/google/cloud/dataproc_v1/proto/workflow_templates_pb2.py index d32138b36124..8433240b1a88 100644 --- a/packages/google-cloud-dataproc/google/cloud/dataproc_v1/proto/workflow_templates_pb2.py +++ b/packages/google-cloud-dataproc/google/cloud/dataproc_v1/proto/workflow_templates_pb2.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/dataproc_v1/proto/workflow_templates.proto - +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection diff --git a/packages/google-cloud-dataproc/google/cloud/dataproc_v1/proto/workflow_templates_pb2_grpc.py b/packages/google-cloud-dataproc/google/cloud/dataproc_v1/proto/workflow_templates_pb2_grpc.py index f766e9ea85ae..26effdb61c6a 100644 --- a/packages/google-cloud-dataproc/google/cloud/dataproc_v1/proto/workflow_templates_pb2_grpc.py +++ b/packages/google-cloud-dataproc/google/cloud/dataproc_v1/proto/workflow_templates_pb2_grpc.py @@ -1,4 +1,5 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc from google.cloud.dataproc_v1.proto import ( @@ -12,15 +13,15 @@ class WorkflowTemplateServiceStub(object): """The API interface for managing Workflow Templates in the - Dataproc API. - """ + Dataproc API. + """ def __init__(self, channel): """Constructor. - Args: - channel: A grpc.Channel. - """ + Args: + channel: A grpc.Channel. + """ self.CreateWorkflowTemplate = channel.unary_unary( "/google.cloud.dataproc.v1.WorkflowTemplateService/CreateWorkflowTemplate", request_serializer=google_dot_cloud_dot_dataproc__v1_dot_proto_dot_workflow__templates__pb2.CreateWorkflowTemplateRequest.SerializeToString, @@ -60,12 +61,12 @@ def __init__(self, channel): class WorkflowTemplateServiceServicer(object): """The API interface for managing Workflow Templates in the - Dataproc API. - """ + Dataproc API. + """ def CreateWorkflowTemplate(self, request, context): """Creates new workflow template. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -73,9 +74,9 @@ def CreateWorkflowTemplate(self, request, context): def GetWorkflowTemplate(self, request, context): """Retrieves the latest workflow template. - Can retrieve previously instantiated template by specifying optional - version parameter. - """ + Can retrieve previously instantiated template by specifying optional + version parameter. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -83,25 +84,25 @@ def GetWorkflowTemplate(self, request, context): def InstantiateWorkflowTemplate(self, request, context): """Instantiates a template and begins execution. - The returned Operation can be used to track execution of - workflow by polling - [operations.get][google.longrunning.Operations.GetOperation]. - The Operation will complete when entire workflow is finished. + The returned Operation can be used to track execution of + workflow by polling + [operations.get][google.longrunning.Operations.GetOperation]. + The Operation will complete when entire workflow is finished. - The running workflow can be aborted via - [operations.cancel][google.longrunning.Operations.CancelOperation]. - This will cause any inflight jobs to be cancelled and workflow-owned - clusters to be deleted. + The running workflow can be aborted via + [operations.cancel][google.longrunning.Operations.CancelOperation]. + This will cause any inflight jobs to be cancelled and workflow-owned + clusters to be deleted. - The [Operation.metadata][google.longrunning.Operation.metadata] will be - [WorkflowMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#workflowmetadata). - Also see [Using - WorkflowMetadata](https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata). + The [Operation.metadata][google.longrunning.Operation.metadata] will be + [WorkflowMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#workflowmetadata). + Also see [Using + WorkflowMetadata](https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata). - On successful completion, - [Operation.response][google.longrunning.Operation.response] will be - [Empty][google.protobuf.Empty]. - """ + On successful completion, + [Operation.response][google.longrunning.Operation.response] will be + [Empty][google.protobuf.Empty]. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -109,51 +110,51 @@ def InstantiateWorkflowTemplate(self, request, context): def InstantiateInlineWorkflowTemplate(self, request, context): """Instantiates a template and begins execution. - This method is equivalent to executing the sequence - [CreateWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.CreateWorkflowTemplate], [InstantiateWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.InstantiateWorkflowTemplate], - [DeleteWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.DeleteWorkflowTemplate]. + This method is equivalent to executing the sequence + [CreateWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.CreateWorkflowTemplate], [InstantiateWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.InstantiateWorkflowTemplate], + [DeleteWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.DeleteWorkflowTemplate]. - The returned Operation can be used to track execution of - workflow by polling - [operations.get][google.longrunning.Operations.GetOperation]. - The Operation will complete when entire workflow is finished. + The returned Operation can be used to track execution of + workflow by polling + [operations.get][google.longrunning.Operations.GetOperation]. + The Operation will complete when entire workflow is finished. - The running workflow can be aborted via - [operations.cancel][google.longrunning.Operations.CancelOperation]. - This will cause any inflight jobs to be cancelled and workflow-owned - clusters to be deleted. + The running workflow can be aborted via + [operations.cancel][google.longrunning.Operations.CancelOperation]. + This will cause any inflight jobs to be cancelled and workflow-owned + clusters to be deleted. - The [Operation.metadata][google.longrunning.Operation.metadata] will be - [WorkflowMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#workflowmetadata). - Also see [Using - WorkflowMetadata](https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata). + The [Operation.metadata][google.longrunning.Operation.metadata] will be + [WorkflowMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#workflowmetadata). + Also see [Using + WorkflowMetadata](https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata). - On successful completion, - [Operation.response][google.longrunning.Operation.response] will be - [Empty][google.protobuf.Empty]. - """ + On successful completion, + [Operation.response][google.longrunning.Operation.response] will be + [Empty][google.protobuf.Empty]. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def UpdateWorkflowTemplate(self, request, context): """Updates (replaces) workflow template. The updated template - must contain version that matches the current server version. - """ + must contain version that matches the current server version. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def ListWorkflowTemplates(self, request, context): """Lists workflows that match the specified filter in the request. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def DeleteWorkflowTemplate(self, request, context): """Deletes a workflow template. It does not cancel in-progress workflows. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -201,3 +202,199 @@ def add_WorkflowTemplateServiceServicer_to_server(servicer, server): "google.cloud.dataproc.v1.WorkflowTemplateService", rpc_method_handlers ) server.add_generic_rpc_handlers((generic_handler,)) + + +# This class is part of an EXPERIMENTAL API. +class WorkflowTemplateService(object): + """The API interface for managing Workflow Templates in the + Dataproc API. + """ + + @staticmethod + def CreateWorkflowTemplate( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dataproc.v1.WorkflowTemplateService/CreateWorkflowTemplate", + google_dot_cloud_dot_dataproc__v1_dot_proto_dot_workflow__templates__pb2.CreateWorkflowTemplateRequest.SerializeToString, + google_dot_cloud_dot_dataproc__v1_dot_proto_dot_workflow__templates__pb2.WorkflowTemplate.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def GetWorkflowTemplate( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dataproc.v1.WorkflowTemplateService/GetWorkflowTemplate", + google_dot_cloud_dot_dataproc__v1_dot_proto_dot_workflow__templates__pb2.GetWorkflowTemplateRequest.SerializeToString, + google_dot_cloud_dot_dataproc__v1_dot_proto_dot_workflow__templates__pb2.WorkflowTemplate.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def InstantiateWorkflowTemplate( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dataproc.v1.WorkflowTemplateService/InstantiateWorkflowTemplate", + google_dot_cloud_dot_dataproc__v1_dot_proto_dot_workflow__templates__pb2.InstantiateWorkflowTemplateRequest.SerializeToString, + google_dot_longrunning_dot_operations__pb2.Operation.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def InstantiateInlineWorkflowTemplate( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dataproc.v1.WorkflowTemplateService/InstantiateInlineWorkflowTemplate", + google_dot_cloud_dot_dataproc__v1_dot_proto_dot_workflow__templates__pb2.InstantiateInlineWorkflowTemplateRequest.SerializeToString, + google_dot_longrunning_dot_operations__pb2.Operation.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def UpdateWorkflowTemplate( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dataproc.v1.WorkflowTemplateService/UpdateWorkflowTemplate", + google_dot_cloud_dot_dataproc__v1_dot_proto_dot_workflow__templates__pb2.UpdateWorkflowTemplateRequest.SerializeToString, + google_dot_cloud_dot_dataproc__v1_dot_proto_dot_workflow__templates__pb2.WorkflowTemplate.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def ListWorkflowTemplates( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dataproc.v1.WorkflowTemplateService/ListWorkflowTemplates", + google_dot_cloud_dot_dataproc__v1_dot_proto_dot_workflow__templates__pb2.ListWorkflowTemplatesRequest.SerializeToString, + google_dot_cloud_dot_dataproc__v1_dot_proto_dot_workflow__templates__pb2.ListWorkflowTemplatesResponse.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def DeleteWorkflowTemplate( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dataproc.v1.WorkflowTemplateService/DeleteWorkflowTemplate", + google_dot_cloud_dot_dataproc__v1_dot_proto_dot_workflow__templates__pb2.DeleteWorkflowTemplateRequest.SerializeToString, + google_dot_protobuf_dot_empty__pb2.Empty.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) diff --git a/packages/google-cloud-dataproc/google/cloud/dataproc_v1beta2/proto/autoscaling_policies_pb2.py b/packages/google-cloud-dataproc/google/cloud/dataproc_v1beta2/proto/autoscaling_policies_pb2.py index 0470e53f4f24..a64d446240b2 100644 --- a/packages/google-cloud-dataproc/google/cloud/dataproc_v1beta2/proto/autoscaling_policies_pb2.py +++ b/packages/google-cloud-dataproc/google/cloud/dataproc_v1beta2/proto/autoscaling_policies_pb2.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/dataproc_v1beta2/proto/autoscaling_policies.proto - +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection diff --git a/packages/google-cloud-dataproc/google/cloud/dataproc_v1beta2/proto/autoscaling_policies_pb2_grpc.py b/packages/google-cloud-dataproc/google/cloud/dataproc_v1beta2/proto/autoscaling_policies_pb2_grpc.py index 0163633a703e..44c55e582d91 100644 --- a/packages/google-cloud-dataproc/google/cloud/dataproc_v1beta2/proto/autoscaling_policies_pb2_grpc.py +++ b/packages/google-cloud-dataproc/google/cloud/dataproc_v1beta2/proto/autoscaling_policies_pb2_grpc.py @@ -1,4 +1,5 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc from google.cloud.dataproc_v1beta2.proto import ( @@ -9,15 +10,15 @@ class AutoscalingPolicyServiceStub(object): """The API interface for managing autoscaling policies in the - Cloud Dataproc API. - """ + Cloud Dataproc API. + """ def __init__(self, channel): """Constructor. - Args: - channel: A grpc.Channel. - """ + Args: + channel: A grpc.Channel. + """ self.CreateAutoscalingPolicy = channel.unary_unary( "/google.cloud.dataproc.v1beta2.AutoscalingPolicyService/CreateAutoscalingPolicy", request_serializer=google_dot_cloud_dot_dataproc__v1beta2_dot_proto_dot_autoscaling__policies__pb2.CreateAutoscalingPolicyRequest.SerializeToString, @@ -47,12 +48,12 @@ def __init__(self, channel): class AutoscalingPolicyServiceServicer(object): """The API interface for managing autoscaling policies in the - Cloud Dataproc API. - """ + Cloud Dataproc API. + """ def CreateAutoscalingPolicy(self, request, context): """Creates new autoscaling policy. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -60,31 +61,31 @@ def CreateAutoscalingPolicy(self, request, context): def UpdateAutoscalingPolicy(self, request, context): """Updates (replaces) autoscaling policy. - Disabled check for update_mask, because all updates will be full - replacements. - """ + Disabled check for update_mask, because all updates will be full + replacements. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def GetAutoscalingPolicy(self, request, context): """Retrieves autoscaling policy. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def ListAutoscalingPolicies(self, request, context): """Lists autoscaling policies in the project. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def DeleteAutoscalingPolicy(self, request, context): """Deletes an autoscaling policy. It is an error to delete an autoscaling - policy that is in use by one or more clusters. - """ + policy that is in use by one or more clusters. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -122,3 +123,145 @@ def add_AutoscalingPolicyServiceServicer_to_server(servicer, server): "google.cloud.dataproc.v1beta2.AutoscalingPolicyService", rpc_method_handlers ) server.add_generic_rpc_handlers((generic_handler,)) + + +# This class is part of an EXPERIMENTAL API. +class AutoscalingPolicyService(object): + """The API interface for managing autoscaling policies in the + Cloud Dataproc API. + """ + + @staticmethod + def CreateAutoscalingPolicy( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dataproc.v1beta2.AutoscalingPolicyService/CreateAutoscalingPolicy", + google_dot_cloud_dot_dataproc__v1beta2_dot_proto_dot_autoscaling__policies__pb2.CreateAutoscalingPolicyRequest.SerializeToString, + google_dot_cloud_dot_dataproc__v1beta2_dot_proto_dot_autoscaling__policies__pb2.AutoscalingPolicy.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def UpdateAutoscalingPolicy( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dataproc.v1beta2.AutoscalingPolicyService/UpdateAutoscalingPolicy", + google_dot_cloud_dot_dataproc__v1beta2_dot_proto_dot_autoscaling__policies__pb2.UpdateAutoscalingPolicyRequest.SerializeToString, + google_dot_cloud_dot_dataproc__v1beta2_dot_proto_dot_autoscaling__policies__pb2.AutoscalingPolicy.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def GetAutoscalingPolicy( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dataproc.v1beta2.AutoscalingPolicyService/GetAutoscalingPolicy", + google_dot_cloud_dot_dataproc__v1beta2_dot_proto_dot_autoscaling__policies__pb2.GetAutoscalingPolicyRequest.SerializeToString, + google_dot_cloud_dot_dataproc__v1beta2_dot_proto_dot_autoscaling__policies__pb2.AutoscalingPolicy.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def ListAutoscalingPolicies( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dataproc.v1beta2.AutoscalingPolicyService/ListAutoscalingPolicies", + google_dot_cloud_dot_dataproc__v1beta2_dot_proto_dot_autoscaling__policies__pb2.ListAutoscalingPoliciesRequest.SerializeToString, + google_dot_cloud_dot_dataproc__v1beta2_dot_proto_dot_autoscaling__policies__pb2.ListAutoscalingPoliciesResponse.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def DeleteAutoscalingPolicy( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dataproc.v1beta2.AutoscalingPolicyService/DeleteAutoscalingPolicy", + google_dot_cloud_dot_dataproc__v1beta2_dot_proto_dot_autoscaling__policies__pb2.DeleteAutoscalingPolicyRequest.SerializeToString, + google_dot_protobuf_dot_empty__pb2.Empty.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) diff --git a/packages/google-cloud-dataproc/google/cloud/dataproc_v1beta2/proto/clusters_pb2.py b/packages/google-cloud-dataproc/google/cloud/dataproc_v1beta2/proto/clusters_pb2.py index c8304de1b62d..db9e5f880ee5 100644 --- a/packages/google-cloud-dataproc/google/cloud/dataproc_v1beta2/proto/clusters_pb2.py +++ b/packages/google-cloud-dataproc/google/cloud/dataproc_v1beta2/proto/clusters_pb2.py @@ -2,7 +2,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/dataproc_v1beta2/proto/clusters.proto - +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection diff --git a/packages/google-cloud-dataproc/google/cloud/dataproc_v1beta2/proto/clusters_pb2_grpc.py b/packages/google-cloud-dataproc/google/cloud/dataproc_v1beta2/proto/clusters_pb2_grpc.py index 4ad03d3c2a70..e5b15eecd745 100644 --- a/packages/google-cloud-dataproc/google/cloud/dataproc_v1beta2/proto/clusters_pb2_grpc.py +++ b/packages/google-cloud-dataproc/google/cloud/dataproc_v1beta2/proto/clusters_pb2_grpc.py @@ -1,4 +1,5 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc from google.cloud.dataproc_v1beta2.proto import ( @@ -11,15 +12,15 @@ class ClusterControllerStub(object): """The ClusterControllerService provides methods to manage clusters - of Compute Engine instances. - """ + of Compute Engine instances. + """ def __init__(self, channel): """Constructor. - Args: - channel: A grpc.Channel. - """ + Args: + channel: A grpc.Channel. + """ self.CreateCluster = channel.unary_unary( "/google.cloud.dataproc.v1beta2.ClusterController/CreateCluster", request_serializer=google_dot_cloud_dot_dataproc__v1beta2_dot_proto_dot_clusters__pb2.CreateClusterRequest.SerializeToString, @@ -54,59 +55,59 @@ def __init__(self, channel): class ClusterControllerServicer(object): """The ClusterControllerService provides methods to manage clusters - of Compute Engine instances. - """ + of Compute Engine instances. + """ def CreateCluster(self, request, context): """Creates a cluster in a project. The returned - [Operation.metadata][google.longrunning.Operation.metadata] will be - [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1beta2#clusteroperationmetadata). - """ + [Operation.metadata][google.longrunning.Operation.metadata] will be + [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1beta2#clusteroperationmetadata). + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def UpdateCluster(self, request, context): """Updates a cluster in a project. The returned - [Operation.metadata][google.longrunning.Operation.metadata] will be - [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1beta2#clusteroperationmetadata). - """ + [Operation.metadata][google.longrunning.Operation.metadata] will be + [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1beta2#clusteroperationmetadata). + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def DeleteCluster(self, request, context): """Deletes a cluster in a project. The returned - [Operation.metadata][google.longrunning.Operation.metadata] will be - [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1beta2#clusteroperationmetadata). - """ + [Operation.metadata][google.longrunning.Operation.metadata] will be + [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1beta2#clusteroperationmetadata). + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def GetCluster(self, request, context): """Gets the resource representation for a cluster in a project. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def ListClusters(self, request, context): """Lists all regions/{region}/clusters in a project alphabetically. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def DiagnoseCluster(self, request, context): """Gets cluster diagnostic information. The returned - [Operation.metadata][google.longrunning.Operation.metadata] will be - [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1beta2#clusteroperationmetadata). - After the operation completes, - [Operation.response][google.longrunning.Operation.response] - contains - [Empty][google.protobuf.Empty]. - """ + [Operation.metadata][google.longrunning.Operation.metadata] will be + [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1beta2#clusteroperationmetadata). + After the operation completes, + [Operation.response][google.longrunning.Operation.response] + contains + [Empty][google.protobuf.Empty]. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -149,3 +150,172 @@ def add_ClusterControllerServicer_to_server(servicer, server): "google.cloud.dataproc.v1beta2.ClusterController", rpc_method_handlers ) server.add_generic_rpc_handlers((generic_handler,)) + + +# This class is part of an EXPERIMENTAL API. +class ClusterController(object): + """The ClusterControllerService provides methods to manage clusters + of Compute Engine instances. + """ + + @staticmethod + def CreateCluster( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dataproc.v1beta2.ClusterController/CreateCluster", + google_dot_cloud_dot_dataproc__v1beta2_dot_proto_dot_clusters__pb2.CreateClusterRequest.SerializeToString, + google_dot_longrunning_dot_operations__pb2.Operation.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def UpdateCluster( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dataproc.v1beta2.ClusterController/UpdateCluster", + google_dot_cloud_dot_dataproc__v1beta2_dot_proto_dot_clusters__pb2.UpdateClusterRequest.SerializeToString, + google_dot_longrunning_dot_operations__pb2.Operation.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def DeleteCluster( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dataproc.v1beta2.ClusterController/DeleteCluster", + google_dot_cloud_dot_dataproc__v1beta2_dot_proto_dot_clusters__pb2.DeleteClusterRequest.SerializeToString, + google_dot_longrunning_dot_operations__pb2.Operation.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def GetCluster( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dataproc.v1beta2.ClusterController/GetCluster", + google_dot_cloud_dot_dataproc__v1beta2_dot_proto_dot_clusters__pb2.GetClusterRequest.SerializeToString, + google_dot_cloud_dot_dataproc__v1beta2_dot_proto_dot_clusters__pb2.Cluster.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def ListClusters( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dataproc.v1beta2.ClusterController/ListClusters", + google_dot_cloud_dot_dataproc__v1beta2_dot_proto_dot_clusters__pb2.ListClustersRequest.SerializeToString, + google_dot_cloud_dot_dataproc__v1beta2_dot_proto_dot_clusters__pb2.ListClustersResponse.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def DiagnoseCluster( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dataproc.v1beta2.ClusterController/DiagnoseCluster", + google_dot_cloud_dot_dataproc__v1beta2_dot_proto_dot_clusters__pb2.DiagnoseClusterRequest.SerializeToString, + google_dot_longrunning_dot_operations__pb2.Operation.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) diff --git a/packages/google-cloud-dataproc/google/cloud/dataproc_v1beta2/proto/jobs_pb2.py b/packages/google-cloud-dataproc/google/cloud/dataproc_v1beta2/proto/jobs_pb2.py index 2119f8edbc6f..52502c163bf3 100644 --- a/packages/google-cloud-dataproc/google/cloud/dataproc_v1beta2/proto/jobs_pb2.py +++ b/packages/google-cloud-dataproc/google/cloud/dataproc_v1beta2/proto/jobs_pb2.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/dataproc_v1beta2/proto/jobs.proto - +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection diff --git a/packages/google-cloud-dataproc/google/cloud/dataproc_v1beta2/proto/jobs_pb2_grpc.py b/packages/google-cloud-dataproc/google/cloud/dataproc_v1beta2/proto/jobs_pb2_grpc.py index 006838a973ad..f1a19a55fb65 100644 --- a/packages/google-cloud-dataproc/google/cloud/dataproc_v1beta2/proto/jobs_pb2_grpc.py +++ b/packages/google-cloud-dataproc/google/cloud/dataproc_v1beta2/proto/jobs_pb2_grpc.py @@ -1,4 +1,5 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc from google.cloud.dataproc_v1beta2.proto import ( @@ -12,14 +13,14 @@ class JobControllerStub(object): """The JobController provides methods to manage jobs. - """ + """ def __init__(self, channel): """Constructor. - Args: - channel: A grpc.Channel. - """ + Args: + channel: A grpc.Channel. + """ self.SubmitJob = channel.unary_unary( "/google.cloud.dataproc.v1beta2.JobController/SubmitJob", request_serializer=google_dot_cloud_dot_dataproc__v1beta2_dot_proto_dot_jobs__pb2.SubmitJobRequest.SerializeToString, @@ -59,58 +60,58 @@ def __init__(self, channel): class JobControllerServicer(object): """The JobController provides methods to manage jobs. - """ + """ def SubmitJob(self, request, context): """Submits a job to a cluster. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def SubmitJobAsOperation(self, request, context): """Submits job to a cluster. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def GetJob(self, request, context): """Gets the resource representation for a job in a project. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def ListJobs(self, request, context): """Lists regions/{region}/jobs in a project. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def UpdateJob(self, request, context): """Updates a job in a project. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def CancelJob(self, request, context): """Starts a job cancellation request. To access the job resource - after cancellation, call - [regions/{region}/jobs.list](https://cloud.google.com/dataproc/docs/reference/rest/v1beta2/projects.regions.jobs/list) - or - [regions/{region}/jobs.get](https://cloud.google.com/dataproc/docs/reference/rest/v1beta2/projects.regions.jobs/get). - """ + after cancellation, call + [regions/{region}/jobs.list](https://cloud.google.com/dataproc/docs/reference/rest/v1beta2/projects.regions.jobs/list) + or + [regions/{region}/jobs.get](https://cloud.google.com/dataproc/docs/reference/rest/v1beta2/projects.regions.jobs/get). + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def DeleteJob(self, request, context): """Deletes the job from the project. If the job is active, the delete fails, - and the response returns `FAILED_PRECONDITION`. - """ + and the response returns `FAILED_PRECONDITION`. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -158,3 +159,198 @@ def add_JobControllerServicer_to_server(servicer, server): "google.cloud.dataproc.v1beta2.JobController", rpc_method_handlers ) server.add_generic_rpc_handlers((generic_handler,)) + + +# This class is part of an EXPERIMENTAL API. +class JobController(object): + """The JobController provides methods to manage jobs. + """ + + @staticmethod + def SubmitJob( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dataproc.v1beta2.JobController/SubmitJob", + google_dot_cloud_dot_dataproc__v1beta2_dot_proto_dot_jobs__pb2.SubmitJobRequest.SerializeToString, + google_dot_cloud_dot_dataproc__v1beta2_dot_proto_dot_jobs__pb2.Job.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def SubmitJobAsOperation( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dataproc.v1beta2.JobController/SubmitJobAsOperation", + google_dot_cloud_dot_dataproc__v1beta2_dot_proto_dot_jobs__pb2.SubmitJobRequest.SerializeToString, + google_dot_longrunning_dot_operations__pb2.Operation.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def GetJob( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dataproc.v1beta2.JobController/GetJob", + google_dot_cloud_dot_dataproc__v1beta2_dot_proto_dot_jobs__pb2.GetJobRequest.SerializeToString, + google_dot_cloud_dot_dataproc__v1beta2_dot_proto_dot_jobs__pb2.Job.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def ListJobs( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dataproc.v1beta2.JobController/ListJobs", + google_dot_cloud_dot_dataproc__v1beta2_dot_proto_dot_jobs__pb2.ListJobsRequest.SerializeToString, + google_dot_cloud_dot_dataproc__v1beta2_dot_proto_dot_jobs__pb2.ListJobsResponse.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def UpdateJob( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dataproc.v1beta2.JobController/UpdateJob", + google_dot_cloud_dot_dataproc__v1beta2_dot_proto_dot_jobs__pb2.UpdateJobRequest.SerializeToString, + google_dot_cloud_dot_dataproc__v1beta2_dot_proto_dot_jobs__pb2.Job.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def CancelJob( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dataproc.v1beta2.JobController/CancelJob", + google_dot_cloud_dot_dataproc__v1beta2_dot_proto_dot_jobs__pb2.CancelJobRequest.SerializeToString, + google_dot_cloud_dot_dataproc__v1beta2_dot_proto_dot_jobs__pb2.Job.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def DeleteJob( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dataproc.v1beta2.JobController/DeleteJob", + google_dot_cloud_dot_dataproc__v1beta2_dot_proto_dot_jobs__pb2.DeleteJobRequest.SerializeToString, + google_dot_protobuf_dot_empty__pb2.Empty.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) diff --git a/packages/google-cloud-dataproc/google/cloud/dataproc_v1beta2/proto/operations_pb2.py b/packages/google-cloud-dataproc/google/cloud/dataproc_v1beta2/proto/operations_pb2.py index 02059abdb8a8..8c34fe75c234 100644 --- a/packages/google-cloud-dataproc/google/cloud/dataproc_v1beta2/proto/operations_pb2.py +++ b/packages/google-cloud-dataproc/google/cloud/dataproc_v1beta2/proto/operations_pb2.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/dataproc_v1beta2/proto/operations.proto - +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection diff --git a/packages/google-cloud-dataproc/google/cloud/dataproc_v1beta2/proto/operations_pb2_grpc.py b/packages/google-cloud-dataproc/google/cloud/dataproc_v1beta2/proto/operations_pb2_grpc.py index 07cb78fe03a9..8a9393943bdf 100644 --- a/packages/google-cloud-dataproc/google/cloud/dataproc_v1beta2/proto/operations_pb2_grpc.py +++ b/packages/google-cloud-dataproc/google/cloud/dataproc_v1beta2/proto/operations_pb2_grpc.py @@ -1,2 +1,3 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc diff --git a/packages/google-cloud-dataproc/google/cloud/dataproc_v1beta2/proto/shared_pb2.py b/packages/google-cloud-dataproc/google/cloud/dataproc_v1beta2/proto/shared_pb2.py index a0e553be83f9..925bd7886c33 100644 --- a/packages/google-cloud-dataproc/google/cloud/dataproc_v1beta2/proto/shared_pb2.py +++ b/packages/google-cloud-dataproc/google/cloud/dataproc_v1beta2/proto/shared_pb2.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/dataproc_v1beta2/proto/shared.proto - +"""Generated protocol buffer code.""" from google.protobuf.internal import enum_type_wrapper from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message diff --git a/packages/google-cloud-dataproc/google/cloud/dataproc_v1beta2/proto/shared_pb2_grpc.py b/packages/google-cloud-dataproc/google/cloud/dataproc_v1beta2/proto/shared_pb2_grpc.py index 07cb78fe03a9..8a9393943bdf 100644 --- a/packages/google-cloud-dataproc/google/cloud/dataproc_v1beta2/proto/shared_pb2_grpc.py +++ b/packages/google-cloud-dataproc/google/cloud/dataproc_v1beta2/proto/shared_pb2_grpc.py @@ -1,2 +1,3 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc diff --git a/packages/google-cloud-dataproc/google/cloud/dataproc_v1beta2/proto/workflow_templates_pb2.py b/packages/google-cloud-dataproc/google/cloud/dataproc_v1beta2/proto/workflow_templates_pb2.py index 730234193264..6e46e2b4a1af 100644 --- a/packages/google-cloud-dataproc/google/cloud/dataproc_v1beta2/proto/workflow_templates_pb2.py +++ b/packages/google-cloud-dataproc/google/cloud/dataproc_v1beta2/proto/workflow_templates_pb2.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/dataproc_v1beta2/proto/workflow_templates.proto - +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection diff --git a/packages/google-cloud-dataproc/google/cloud/dataproc_v1beta2/proto/workflow_templates_pb2_grpc.py b/packages/google-cloud-dataproc/google/cloud/dataproc_v1beta2/proto/workflow_templates_pb2_grpc.py index f9ea0bd6b78d..72d48e2389b8 100644 --- a/packages/google-cloud-dataproc/google/cloud/dataproc_v1beta2/proto/workflow_templates_pb2_grpc.py +++ b/packages/google-cloud-dataproc/google/cloud/dataproc_v1beta2/proto/workflow_templates_pb2_grpc.py @@ -1,4 +1,5 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc from google.cloud.dataproc_v1beta2.proto import ( @@ -12,15 +13,15 @@ class WorkflowTemplateServiceStub(object): """The API interface for managing Workflow Templates in the - Dataproc API. - """ + Dataproc API. + """ def __init__(self, channel): """Constructor. - Args: - channel: A grpc.Channel. - """ + Args: + channel: A grpc.Channel. + """ self.CreateWorkflowTemplate = channel.unary_unary( "/google.cloud.dataproc.v1beta2.WorkflowTemplateService/CreateWorkflowTemplate", request_serializer=google_dot_cloud_dot_dataproc__v1beta2_dot_proto_dot_workflow__templates__pb2.CreateWorkflowTemplateRequest.SerializeToString, @@ -60,12 +61,12 @@ def __init__(self, channel): class WorkflowTemplateServiceServicer(object): """The API interface for managing Workflow Templates in the - Dataproc API. - """ + Dataproc API. + """ def CreateWorkflowTemplate(self, request, context): """Creates new workflow template. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -73,9 +74,9 @@ def CreateWorkflowTemplate(self, request, context): def GetWorkflowTemplate(self, request, context): """Retrieves the latest workflow template. - Can retrieve previously instantiated template by specifying optional - version parameter. - """ + Can retrieve previously instantiated template by specifying optional + version parameter. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -83,25 +84,25 @@ def GetWorkflowTemplate(self, request, context): def InstantiateWorkflowTemplate(self, request, context): """Instantiates a template and begins execution. - The returned Operation can be used to track execution of - workflow by polling - [operations.get][google.longrunning.Operations.GetOperation]. - The Operation will complete when entire workflow is finished. + The returned Operation can be used to track execution of + workflow by polling + [operations.get][google.longrunning.Operations.GetOperation]. + The Operation will complete when entire workflow is finished. - The running workflow can be aborted via - [operations.cancel][google.longrunning.Operations.CancelOperation]. - This will cause any inflight jobs to be cancelled and workflow-owned - clusters to be deleted. + The running workflow can be aborted via + [operations.cancel][google.longrunning.Operations.CancelOperation]. + This will cause any inflight jobs to be cancelled and workflow-owned + clusters to be deleted. - The [Operation.metadata][google.longrunning.Operation.metadata] will be - [WorkflowMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1beta2#workflowmetadata). - Also see [Using - WorkflowMetadata](https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata). + The [Operation.metadata][google.longrunning.Operation.metadata] will be + [WorkflowMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1beta2#workflowmetadata). + Also see [Using + WorkflowMetadata](https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata). - On successful completion, - [Operation.response][google.longrunning.Operation.response] will be - [Empty][google.protobuf.Empty]. - """ + On successful completion, + [Operation.response][google.longrunning.Operation.response] will be + [Empty][google.protobuf.Empty]. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -109,51 +110,51 @@ def InstantiateWorkflowTemplate(self, request, context): def InstantiateInlineWorkflowTemplate(self, request, context): """Instantiates a template and begins execution. - This method is equivalent to executing the sequence - [CreateWorkflowTemplate][google.cloud.dataproc.v1beta2.WorkflowTemplateService.CreateWorkflowTemplate], [InstantiateWorkflowTemplate][google.cloud.dataproc.v1beta2.WorkflowTemplateService.InstantiateWorkflowTemplate], - [DeleteWorkflowTemplate][google.cloud.dataproc.v1beta2.WorkflowTemplateService.DeleteWorkflowTemplate]. + This method is equivalent to executing the sequence + [CreateWorkflowTemplate][google.cloud.dataproc.v1beta2.WorkflowTemplateService.CreateWorkflowTemplate], [InstantiateWorkflowTemplate][google.cloud.dataproc.v1beta2.WorkflowTemplateService.InstantiateWorkflowTemplate], + [DeleteWorkflowTemplate][google.cloud.dataproc.v1beta2.WorkflowTemplateService.DeleteWorkflowTemplate]. - The returned Operation can be used to track execution of - workflow by polling - [operations.get][google.longrunning.Operations.GetOperation]. - The Operation will complete when entire workflow is finished. + The returned Operation can be used to track execution of + workflow by polling + [operations.get][google.longrunning.Operations.GetOperation]. + The Operation will complete when entire workflow is finished. - The running workflow can be aborted via - [operations.cancel][google.longrunning.Operations.CancelOperation]. - This will cause any inflight jobs to be cancelled and workflow-owned - clusters to be deleted. + The running workflow can be aborted via + [operations.cancel][google.longrunning.Operations.CancelOperation]. + This will cause any inflight jobs to be cancelled and workflow-owned + clusters to be deleted. - The [Operation.metadata][google.longrunning.Operation.metadata] will be - [WorkflowMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#workflowmetadata). - Also see [Using - WorkflowMetadata](https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata). + The [Operation.metadata][google.longrunning.Operation.metadata] will be + [WorkflowMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#workflowmetadata). + Also see [Using + WorkflowMetadata](https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata). - On successful completion, - [Operation.response][google.longrunning.Operation.response] will be - [Empty][google.protobuf.Empty]. - """ + On successful completion, + [Operation.response][google.longrunning.Operation.response] will be + [Empty][google.protobuf.Empty]. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def UpdateWorkflowTemplate(self, request, context): """Updates (replaces) workflow template. The updated template - must contain version that matches the current server version. - """ + must contain version that matches the current server version. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def ListWorkflowTemplates(self, request, context): """Lists workflows that match the specified filter in the request. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def DeleteWorkflowTemplate(self, request, context): """Deletes a workflow template. It does not cancel in-progress workflows. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -201,3 +202,199 @@ def add_WorkflowTemplateServiceServicer_to_server(servicer, server): "google.cloud.dataproc.v1beta2.WorkflowTemplateService", rpc_method_handlers ) server.add_generic_rpc_handlers((generic_handler,)) + + +# This class is part of an EXPERIMENTAL API. +class WorkflowTemplateService(object): + """The API interface for managing Workflow Templates in the + Dataproc API. + """ + + @staticmethod + def CreateWorkflowTemplate( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dataproc.v1beta2.WorkflowTemplateService/CreateWorkflowTemplate", + google_dot_cloud_dot_dataproc__v1beta2_dot_proto_dot_workflow__templates__pb2.CreateWorkflowTemplateRequest.SerializeToString, + google_dot_cloud_dot_dataproc__v1beta2_dot_proto_dot_workflow__templates__pb2.WorkflowTemplate.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def GetWorkflowTemplate( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dataproc.v1beta2.WorkflowTemplateService/GetWorkflowTemplate", + google_dot_cloud_dot_dataproc__v1beta2_dot_proto_dot_workflow__templates__pb2.GetWorkflowTemplateRequest.SerializeToString, + google_dot_cloud_dot_dataproc__v1beta2_dot_proto_dot_workflow__templates__pb2.WorkflowTemplate.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def InstantiateWorkflowTemplate( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dataproc.v1beta2.WorkflowTemplateService/InstantiateWorkflowTemplate", + google_dot_cloud_dot_dataproc__v1beta2_dot_proto_dot_workflow__templates__pb2.InstantiateWorkflowTemplateRequest.SerializeToString, + google_dot_longrunning_dot_operations__pb2.Operation.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def InstantiateInlineWorkflowTemplate( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dataproc.v1beta2.WorkflowTemplateService/InstantiateInlineWorkflowTemplate", + google_dot_cloud_dot_dataproc__v1beta2_dot_proto_dot_workflow__templates__pb2.InstantiateInlineWorkflowTemplateRequest.SerializeToString, + google_dot_longrunning_dot_operations__pb2.Operation.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def UpdateWorkflowTemplate( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dataproc.v1beta2.WorkflowTemplateService/UpdateWorkflowTemplate", + google_dot_cloud_dot_dataproc__v1beta2_dot_proto_dot_workflow__templates__pb2.UpdateWorkflowTemplateRequest.SerializeToString, + google_dot_cloud_dot_dataproc__v1beta2_dot_proto_dot_workflow__templates__pb2.WorkflowTemplate.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def ListWorkflowTemplates( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dataproc.v1beta2.WorkflowTemplateService/ListWorkflowTemplates", + google_dot_cloud_dot_dataproc__v1beta2_dot_proto_dot_workflow__templates__pb2.ListWorkflowTemplatesRequest.SerializeToString, + google_dot_cloud_dot_dataproc__v1beta2_dot_proto_dot_workflow__templates__pb2.ListWorkflowTemplatesResponse.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def DeleteWorkflowTemplate( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dataproc.v1beta2.WorkflowTemplateService/DeleteWorkflowTemplate", + google_dot_cloud_dot_dataproc__v1beta2_dot_proto_dot_workflow__templates__pb2.DeleteWorkflowTemplateRequest.SerializeToString, + google_dot_protobuf_dot_empty__pb2.Empty.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) diff --git a/packages/google-cloud-dataproc/synth.metadata b/packages/google-cloud-dataproc/synth.metadata index 6b14f04330ab..9de5c41bd9f9 100644 --- a/packages/google-cloud-dataproc/synth.metadata +++ b/packages/google-cloud-dataproc/synth.metadata @@ -11,8 +11,8 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "184661793fbe3b89f2b485c303e7466cef9d21a1", - "internalRef": "316182409" + "sha": "5824c4db2d0a3cb5485cb7f4b68cbc2598758d2d", + "internalRef": "318081240" } }, {