Skip to content

Commit

Permalink
chore: update grpc version (#22)
Browse files Browse the repository at this point in the history
* chore: update grpc to v1.30.0

PiperOrigin-RevId: 317949519

Source-Author: Google APIs <[email protected]>
Source-Date: Tue Jun 23 15:22:22 2020 -0700
Source-Repo: googleapis/googleapis
Source-Sha: 7157f9552747421572cf1ab3aec1105c05ebd4f9
Source-Link: googleapis/googleapis@7157f95

* Updates to build Google Ads API build files.

PiperOrigin-RevId: 318028816

Source-Author: Google APIs <[email protected]>
Source-Date: Wed Jun 24 02:32:38 2020 -0700
Source-Repo: googleapis/googleapis
Source-Sha: b882b8e6bfcd708042ff00f7adc67ce750817dd0
Source-Link: googleapis/googleapis@b882b8e

Co-authored-by: Bu Sun Kim <[email protected]>
  • Loading branch information
yoshi-automation and busunkim96 authored Aug 19, 2020
1 parent 199a6f1 commit a0be5c0
Show file tree
Hide file tree
Showing 13 changed files with 524 additions and 72 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -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.scheduler_v1.proto import (
Expand All @@ -12,15 +13,15 @@

class CloudSchedulerStub(object):
"""The Cloud Scheduler API allows external entities to reliably
schedule asynchronous jobs.
"""
schedule asynchronous jobs.
"""

def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
Args:
channel: A grpc.Channel.
"""
self.ListJobs = channel.unary_unary(
"/google.cloud.scheduler.v1.CloudScheduler/ListJobs",
request_serializer=google_dot_cloud_dot_scheduler__v1_dot_proto_dot_cloudscheduler__pb2.ListJobsRequest.SerializeToString,
Expand Down Expand Up @@ -65,83 +66,83 @@ def __init__(self, channel):

class CloudSchedulerServicer(object):
"""The Cloud Scheduler API allows external entities to reliably
schedule asynchronous jobs.
"""
schedule asynchronous jobs.
"""

def ListJobs(self, request, context):
"""Lists jobs.
"""
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details("Method not implemented!")
raise NotImplementedError("Method not implemented!")

def GetJob(self, request, context):
"""Gets a job.
"""
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details("Method not implemented!")
raise NotImplementedError("Method not implemented!")

def CreateJob(self, request, context):
"""Creates a job.
"""
"""
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.
If successful, the updated [Job][google.cloud.scheduler.v1.Job] is returned. If the job does
not exist, `NOT_FOUND` is returned.
If successful, the updated [Job][google.cloud.scheduler.v1.Job] is returned. If the job does
not exist, `NOT_FOUND` is returned.
If UpdateJob does not successfully return, it is possible for the
job to be in an [Job.State.UPDATE_FAILED][google.cloud.scheduler.v1.Job.State.UPDATE_FAILED] state. A job in this state may
not be executed. If this happens, retry the UpdateJob request
until a successful response is received.
"""
If UpdateJob does not successfully return, it is possible for the
job to be in an [Job.State.UPDATE_FAILED][google.cloud.scheduler.v1.Job.State.UPDATE_FAILED] state. A job in this state may
not be executed. If this happens, retry the UpdateJob request
until a successful response is received.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details("Method not implemented!")
raise NotImplementedError("Method not implemented!")

def DeleteJob(self, request, context):
"""Deletes a job.
"""
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details("Method not implemented!")
raise NotImplementedError("Method not implemented!")

def PauseJob(self, request, context):
"""Pauses a job.
If a job is paused then the system will stop executing the job
until it is re-enabled via [ResumeJob][google.cloud.scheduler.v1.CloudScheduler.ResumeJob]. The
state of the job is stored in [state][google.cloud.scheduler.v1.Job.state]; if paused it
will be set to [Job.State.PAUSED][google.cloud.scheduler.v1.Job.State.PAUSED]. A job must be in [Job.State.ENABLED][google.cloud.scheduler.v1.Job.State.ENABLED]
to be paused.
"""
If a job is paused then the system will stop executing the job
until it is re-enabled via [ResumeJob][google.cloud.scheduler.v1.CloudScheduler.ResumeJob]. The
state of the job is stored in [state][google.cloud.scheduler.v1.Job.state]; if paused it
will be set to [Job.State.PAUSED][google.cloud.scheduler.v1.Job.State.PAUSED]. A job must be in [Job.State.ENABLED][google.cloud.scheduler.v1.Job.State.ENABLED]
to be paused.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details("Method not implemented!")
raise NotImplementedError("Method not implemented!")

def ResumeJob(self, request, context):
"""Resume a job.
This method reenables a job after it has been [Job.State.PAUSED][google.cloud.scheduler.v1.Job.State.PAUSED]. The
state of a job is stored in [Job.state][google.cloud.scheduler.v1.Job.state]; after calling this method it
will be set to [Job.State.ENABLED][google.cloud.scheduler.v1.Job.State.ENABLED]. A job must be in
[Job.State.PAUSED][google.cloud.scheduler.v1.Job.State.PAUSED] to be resumed.
"""
This method reenables a job after it has been [Job.State.PAUSED][google.cloud.scheduler.v1.Job.State.PAUSED]. The
state of a job is stored in [Job.state][google.cloud.scheduler.v1.Job.state]; after calling this method it
will be set to [Job.State.ENABLED][google.cloud.scheduler.v1.Job.State.ENABLED]. A job must be in
[Job.State.PAUSED][google.cloud.scheduler.v1.Job.State.PAUSED] to be resumed.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details("Method not implemented!")
raise NotImplementedError("Method not implemented!")

def RunJob(self, request, context):
"""Forces a job to run now.
When this method is called, Cloud Scheduler will dispatch the job, even
if the job is already running.
"""
When this method is called, Cloud Scheduler will dispatch the job, even
if the job is already running.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details("Method not implemented!")
raise NotImplementedError("Method not implemented!")
Expand Down Expand Up @@ -194,3 +195,226 @@ def add_CloudSchedulerServicer_to_server(servicer, server):
"google.cloud.scheduler.v1.CloudScheduler", rpc_method_handlers
)
server.add_generic_rpc_handlers((generic_handler,))


# This class is part of an EXPERIMENTAL API.
class CloudScheduler(object):
"""The Cloud Scheduler API allows external entities to reliably
schedule asynchronous jobs.
"""

@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.scheduler.v1.CloudScheduler/ListJobs",
google_dot_cloud_dot_scheduler__v1_dot_proto_dot_cloudscheduler__pb2.ListJobsRequest.SerializeToString,
google_dot_cloud_dot_scheduler__v1_dot_proto_dot_cloudscheduler__pb2.ListJobsResponse.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.scheduler.v1.CloudScheduler/GetJob",
google_dot_cloud_dot_scheduler__v1_dot_proto_dot_cloudscheduler__pb2.GetJobRequest.SerializeToString,
google_dot_cloud_dot_scheduler__v1_dot_proto_dot_job__pb2.Job.FromString,
options,
channel_credentials,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
)

@staticmethod
def CreateJob(
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.scheduler.v1.CloudScheduler/CreateJob",
google_dot_cloud_dot_scheduler__v1_dot_proto_dot_cloudscheduler__pb2.CreateJobRequest.SerializeToString,
google_dot_cloud_dot_scheduler__v1_dot_proto_dot_job__pb2.Job.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.scheduler.v1.CloudScheduler/UpdateJob",
google_dot_cloud_dot_scheduler__v1_dot_proto_dot_cloudscheduler__pb2.UpdateJobRequest.SerializeToString,
google_dot_cloud_dot_scheduler__v1_dot_proto_dot_job__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.scheduler.v1.CloudScheduler/DeleteJob",
google_dot_cloud_dot_scheduler__v1_dot_proto_dot_cloudscheduler__pb2.DeleteJobRequest.SerializeToString,
google_dot_protobuf_dot_empty__pb2.Empty.FromString,
options,
channel_credentials,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
)

@staticmethod
def PauseJob(
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.scheduler.v1.CloudScheduler/PauseJob",
google_dot_cloud_dot_scheduler__v1_dot_proto_dot_cloudscheduler__pb2.PauseJobRequest.SerializeToString,
google_dot_cloud_dot_scheduler__v1_dot_proto_dot_job__pb2.Job.FromString,
options,
channel_credentials,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
)

@staticmethod
def ResumeJob(
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.scheduler.v1.CloudScheduler/ResumeJob",
google_dot_cloud_dot_scheduler__v1_dot_proto_dot_cloudscheduler__pb2.ResumeJobRequest.SerializeToString,
google_dot_cloud_dot_scheduler__v1_dot_proto_dot_job__pb2.Job.FromString,
options,
channel_credentials,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
)

@staticmethod
def RunJob(
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.scheduler.v1.CloudScheduler/RunJob",
google_dot_cloud_dot_scheduler__v1_dot_proto_dot_cloudscheduler__pb2.RunJobRequest.SerializeToString,
google_dot_cloud_dot_scheduler__v1_dot_proto_dot_job__pb2.Job.FromString,
options,
channel_credentials,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
)

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -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

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -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
Loading

0 comments on commit a0be5c0

Please sign in to comment.