google-cloud-scheduler-v1 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.yardopts +12 -0
- data/AUTHENTICATION.md +169 -0
- data/LICENSE.md +203 -0
- data/README.md +71 -0
- data/lib/google/cloud/common_resources_pb.rb +15 -0
- data/lib/google/cloud/scheduler/v1/cloud_scheduler/client.rb +966 -0
- data/lib/google/cloud/scheduler/v1/cloud_scheduler/credentials.rb +51 -0
- data/lib/google/cloud/scheduler/v1/cloud_scheduler/paths.rb +86 -0
- data/lib/google/cloud/scheduler/v1/cloud_scheduler.rb +50 -0
- data/lib/google/cloud/scheduler/v1/cloudscheduler_pb.rb +66 -0
- data/lib/google/cloud/scheduler/v1/cloudscheduler_services_pb.rb +83 -0
- data/lib/google/cloud/scheduler/v1/job_pb.rb +59 -0
- data/lib/google/cloud/scheduler/v1/target_pb.rb +73 -0
- data/lib/google/cloud/scheduler/v1/version.rb +28 -0
- data/lib/google/cloud/scheduler/v1.rb +35 -0
- data/lib/google-cloud-scheduler-v1.rb +21 -0
- data/proto_docs/README.md +4 -0
- data/proto_docs/google/api/field_behavior.rb +59 -0
- data/proto_docs/google/api/resource.rb +247 -0
- data/proto_docs/google/cloud/scheduler/v1/cloudscheduler.rb +155 -0
- data/proto_docs/google/cloud/scheduler/v1/job.rb +229 -0
- data/proto_docs/google/cloud/scheduler/v1/target.rb +385 -0
- data/proto_docs/google/protobuf/any.rb +138 -0
- data/proto_docs/google/protobuf/duration.rb +98 -0
- data/proto_docs/google/protobuf/empty.rb +36 -0
- data/proto_docs/google/protobuf/field_mask.rb +229 -0
- data/proto_docs/google/protobuf/timestamp.rb +120 -0
- data/proto_docs/google/rpc/status.rb +46 -0
- metadata +187 -0
@@ -0,0 +1,51 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
require "googleauth"
|
20
|
+
|
21
|
+
module Google
|
22
|
+
module Cloud
|
23
|
+
module Scheduler
|
24
|
+
module V1
|
25
|
+
module CloudScheduler
|
26
|
+
# Credentials for the CloudScheduler API.
|
27
|
+
class Credentials < ::Google::Auth::Credentials
|
28
|
+
self.scope = [
|
29
|
+
"https://www.googleapis.com/auth/cloud-platform"
|
30
|
+
]
|
31
|
+
self.env_vars = [
|
32
|
+
"SCHEDULER_CREDENTIALS",
|
33
|
+
"SCHEDULER_KEYFILE",
|
34
|
+
"GOOGLE_CLOUD_CREDENTIALS",
|
35
|
+
"GOOGLE_CLOUD_KEYFILE",
|
36
|
+
"GCLOUD_KEYFILE",
|
37
|
+
"SCHEDULER_CREDENTIALS_JSON",
|
38
|
+
"SCHEDULER_KEYFILE_JSON",
|
39
|
+
"GOOGLE_CLOUD_CREDENTIALS_JSON",
|
40
|
+
"GOOGLE_CLOUD_KEYFILE_JSON",
|
41
|
+
"GCLOUD_KEYFILE_JSON"
|
42
|
+
]
|
43
|
+
self.paths = [
|
44
|
+
"~/.config/google_cloud/application_default_credentials.json"
|
45
|
+
]
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
@@ -0,0 +1,86 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Cloud
|
22
|
+
module Scheduler
|
23
|
+
module V1
|
24
|
+
module CloudScheduler
|
25
|
+
# Path helper methods for the CloudScheduler API.
|
26
|
+
module Paths
|
27
|
+
##
|
28
|
+
# Create a fully-qualified Job resource string.
|
29
|
+
#
|
30
|
+
# The resource will be in the following format:
|
31
|
+
#
|
32
|
+
# `projects/{project}/locations/{location}/jobs/{job}`
|
33
|
+
#
|
34
|
+
# @param project [String]
|
35
|
+
# @param location [String]
|
36
|
+
# @param job [String]
|
37
|
+
#
|
38
|
+
# @return [::String]
|
39
|
+
def job_path project:, location:, job:
|
40
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
41
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
42
|
+
|
43
|
+
"projects/#{project}/locations/#{location}/jobs/#{job}"
|
44
|
+
end
|
45
|
+
|
46
|
+
##
|
47
|
+
# Create a fully-qualified Location resource string.
|
48
|
+
#
|
49
|
+
# The resource will be in the following format:
|
50
|
+
#
|
51
|
+
# `projects/{project}/locations/{location}`
|
52
|
+
#
|
53
|
+
# @param project [String]
|
54
|
+
# @param location [String]
|
55
|
+
#
|
56
|
+
# @return [::String]
|
57
|
+
def location_path project:, location:
|
58
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
59
|
+
|
60
|
+
"projects/#{project}/locations/#{location}"
|
61
|
+
end
|
62
|
+
|
63
|
+
##
|
64
|
+
# Create a fully-qualified Topic resource string.
|
65
|
+
#
|
66
|
+
# The resource will be in the following format:
|
67
|
+
#
|
68
|
+
# `projects/{project}/topics/{topic}`
|
69
|
+
#
|
70
|
+
# @param project [String]
|
71
|
+
# @param topic [String]
|
72
|
+
#
|
73
|
+
# @return [::String]
|
74
|
+
def topic_path project:, topic:
|
75
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
76
|
+
|
77
|
+
"projects/#{project}/topics/#{topic}"
|
78
|
+
end
|
79
|
+
|
80
|
+
extend self
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
@@ -0,0 +1,50 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
require "gapic/common"
|
20
|
+
require "gapic/config"
|
21
|
+
require "gapic/config/method"
|
22
|
+
|
23
|
+
require "google/cloud/scheduler/v1/version"
|
24
|
+
|
25
|
+
require "google/cloud/scheduler/v1/cloud_scheduler/credentials"
|
26
|
+
require "google/cloud/scheduler/v1/cloud_scheduler/paths"
|
27
|
+
require "google/cloud/scheduler/v1/cloud_scheduler/client"
|
28
|
+
|
29
|
+
module Google
|
30
|
+
module Cloud
|
31
|
+
module Scheduler
|
32
|
+
module V1
|
33
|
+
##
|
34
|
+
# The Cloud Scheduler API allows external entities to reliably
|
35
|
+
# schedule asynchronous jobs.
|
36
|
+
#
|
37
|
+
# To load this service and instantiate a client:
|
38
|
+
#
|
39
|
+
# require "google/cloud/scheduler/v1/cloud_scheduler"
|
40
|
+
# client = ::Google::Cloud::Scheduler::V1::CloudScheduler::Client.new
|
41
|
+
#
|
42
|
+
module CloudScheduler
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
helper_path = ::File.join __dir__, "cloud_scheduler", "helpers.rb"
|
50
|
+
require "google/cloud/scheduler/v1/cloud_scheduler/helpers" if ::File.file? helper_path
|
@@ -0,0 +1,66 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: google/cloud/scheduler/v1/cloudscheduler.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'google/api/annotations_pb'
|
7
|
+
require 'google/api/client_pb'
|
8
|
+
require 'google/api/field_behavior_pb'
|
9
|
+
require 'google/api/resource_pb'
|
10
|
+
require 'google/cloud/scheduler/v1/job_pb'
|
11
|
+
require 'google/protobuf/empty_pb'
|
12
|
+
require 'google/protobuf/field_mask_pb'
|
13
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
14
|
+
add_file("google/cloud/scheduler/v1/cloudscheduler.proto", :syntax => :proto3) do
|
15
|
+
add_message "google.cloud.scheduler.v1.ListJobsRequest" do
|
16
|
+
optional :parent, :string, 1
|
17
|
+
optional :page_size, :int32, 5
|
18
|
+
optional :page_token, :string, 6
|
19
|
+
end
|
20
|
+
add_message "google.cloud.scheduler.v1.ListJobsResponse" do
|
21
|
+
repeated :jobs, :message, 1, "google.cloud.scheduler.v1.Job"
|
22
|
+
optional :next_page_token, :string, 2
|
23
|
+
end
|
24
|
+
add_message "google.cloud.scheduler.v1.GetJobRequest" do
|
25
|
+
optional :name, :string, 1
|
26
|
+
end
|
27
|
+
add_message "google.cloud.scheduler.v1.CreateJobRequest" do
|
28
|
+
optional :parent, :string, 1
|
29
|
+
optional :job, :message, 2, "google.cloud.scheduler.v1.Job"
|
30
|
+
end
|
31
|
+
add_message "google.cloud.scheduler.v1.UpdateJobRequest" do
|
32
|
+
optional :job, :message, 1, "google.cloud.scheduler.v1.Job"
|
33
|
+
optional :update_mask, :message, 2, "google.protobuf.FieldMask"
|
34
|
+
end
|
35
|
+
add_message "google.cloud.scheduler.v1.DeleteJobRequest" do
|
36
|
+
optional :name, :string, 1
|
37
|
+
end
|
38
|
+
add_message "google.cloud.scheduler.v1.PauseJobRequest" do
|
39
|
+
optional :name, :string, 1
|
40
|
+
end
|
41
|
+
add_message "google.cloud.scheduler.v1.ResumeJobRequest" do
|
42
|
+
optional :name, :string, 1
|
43
|
+
end
|
44
|
+
add_message "google.cloud.scheduler.v1.RunJobRequest" do
|
45
|
+
optional :name, :string, 1
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
module Google
|
51
|
+
module Cloud
|
52
|
+
module Scheduler
|
53
|
+
module V1
|
54
|
+
ListJobsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.scheduler.v1.ListJobsRequest").msgclass
|
55
|
+
ListJobsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.scheduler.v1.ListJobsResponse").msgclass
|
56
|
+
GetJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.scheduler.v1.GetJobRequest").msgclass
|
57
|
+
CreateJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.scheduler.v1.CreateJobRequest").msgclass
|
58
|
+
UpdateJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.scheduler.v1.UpdateJobRequest").msgclass
|
59
|
+
DeleteJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.scheduler.v1.DeleteJobRequest").msgclass
|
60
|
+
PauseJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.scheduler.v1.PauseJobRequest").msgclass
|
61
|
+
ResumeJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.scheduler.v1.ResumeJobRequest").msgclass
|
62
|
+
RunJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.scheduler.v1.RunJobRequest").msgclass
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
@@ -0,0 +1,83 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# Source: google/cloud/scheduler/v1/cloudscheduler.proto for package 'google.cloud.scheduler.v1'
|
3
|
+
# Original file comments:
|
4
|
+
# Copyright 2019 Google LLC.
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
#
|
18
|
+
#
|
19
|
+
|
20
|
+
require 'grpc'
|
21
|
+
require 'google/cloud/scheduler/v1/cloudscheduler_pb'
|
22
|
+
|
23
|
+
module Google
|
24
|
+
module Cloud
|
25
|
+
module Scheduler
|
26
|
+
module V1
|
27
|
+
module CloudScheduler
|
28
|
+
# The Cloud Scheduler API allows external entities to reliably
|
29
|
+
# schedule asynchronous jobs.
|
30
|
+
class Service
|
31
|
+
|
32
|
+
include GRPC::GenericService
|
33
|
+
|
34
|
+
self.marshal_class_method = :encode
|
35
|
+
self.unmarshal_class_method = :decode
|
36
|
+
self.service_name = 'google.cloud.scheduler.v1.CloudScheduler'
|
37
|
+
|
38
|
+
# Lists jobs.
|
39
|
+
rpc :ListJobs, ListJobsRequest, ListJobsResponse
|
40
|
+
# Gets a job.
|
41
|
+
rpc :GetJob, GetJobRequest, Job
|
42
|
+
# Creates a job.
|
43
|
+
rpc :CreateJob, CreateJobRequest, Job
|
44
|
+
# Updates a job.
|
45
|
+
#
|
46
|
+
# If successful, the updated [Job][google.cloud.scheduler.v1.Job] is returned. If the job does
|
47
|
+
# not exist, `NOT_FOUND` is returned.
|
48
|
+
#
|
49
|
+
# If UpdateJob does not successfully return, it is possible for the
|
50
|
+
# job to be in an [Job.State.UPDATE_FAILED][google.cloud.scheduler.v1.Job.State.UPDATE_FAILED] state. A job in this state may
|
51
|
+
# not be executed. If this happens, retry the UpdateJob request
|
52
|
+
# until a successful response is received.
|
53
|
+
rpc :UpdateJob, UpdateJobRequest, Job
|
54
|
+
# Deletes a job.
|
55
|
+
rpc :DeleteJob, DeleteJobRequest, Google::Protobuf::Empty
|
56
|
+
# Pauses a job.
|
57
|
+
#
|
58
|
+
# If a job is paused then the system will stop executing the job
|
59
|
+
# until it is re-enabled via [ResumeJob][google.cloud.scheduler.v1.CloudScheduler.ResumeJob]. The
|
60
|
+
# state of the job is stored in [state][google.cloud.scheduler.v1.Job.state]; if paused it
|
61
|
+
# 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]
|
62
|
+
# to be paused.
|
63
|
+
rpc :PauseJob, PauseJobRequest, Job
|
64
|
+
# Resume a job.
|
65
|
+
#
|
66
|
+
# This method reenables a job after it has been [Job.State.PAUSED][google.cloud.scheduler.v1.Job.State.PAUSED]. The
|
67
|
+
# state of a job is stored in [Job.state][google.cloud.scheduler.v1.Job.state]; after calling this method it
|
68
|
+
# will be set to [Job.State.ENABLED][google.cloud.scheduler.v1.Job.State.ENABLED]. A job must be in
|
69
|
+
# [Job.State.PAUSED][google.cloud.scheduler.v1.Job.State.PAUSED] to be resumed.
|
70
|
+
rpc :ResumeJob, ResumeJobRequest, Job
|
71
|
+
# Forces a job to run now.
|
72
|
+
#
|
73
|
+
# When this method is called, Cloud Scheduler will dispatch the job, even
|
74
|
+
# if the job is already running.
|
75
|
+
rpc :RunJob, RunJobRequest, Job
|
76
|
+
end
|
77
|
+
|
78
|
+
Stub = Service.rpc_stub_class
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
@@ -0,0 +1,59 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: google/cloud/scheduler/v1/job.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'google/api/resource_pb'
|
7
|
+
require 'google/cloud/scheduler/v1/target_pb'
|
8
|
+
require 'google/protobuf/duration_pb'
|
9
|
+
require 'google/protobuf/timestamp_pb'
|
10
|
+
require 'google/rpc/status_pb'
|
11
|
+
require 'google/api/annotations_pb'
|
12
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
13
|
+
add_file("google/cloud/scheduler/v1/job.proto", :syntax => :proto3) do
|
14
|
+
add_message "google.cloud.scheduler.v1.Job" do
|
15
|
+
optional :name, :string, 1
|
16
|
+
optional :description, :string, 2
|
17
|
+
optional :schedule, :string, 20
|
18
|
+
optional :time_zone, :string, 21
|
19
|
+
optional :user_update_time, :message, 9, "google.protobuf.Timestamp"
|
20
|
+
optional :state, :enum, 10, "google.cloud.scheduler.v1.Job.State"
|
21
|
+
optional :status, :message, 11, "google.rpc.Status"
|
22
|
+
optional :schedule_time, :message, 17, "google.protobuf.Timestamp"
|
23
|
+
optional :last_attempt_time, :message, 18, "google.protobuf.Timestamp"
|
24
|
+
optional :retry_config, :message, 19, "google.cloud.scheduler.v1.RetryConfig"
|
25
|
+
optional :attempt_deadline, :message, 22, "google.protobuf.Duration"
|
26
|
+
oneof :target do
|
27
|
+
optional :pubsub_target, :message, 4, "google.cloud.scheduler.v1.PubsubTarget"
|
28
|
+
optional :app_engine_http_target, :message, 5, "google.cloud.scheduler.v1.AppEngineHttpTarget"
|
29
|
+
optional :http_target, :message, 6, "google.cloud.scheduler.v1.HttpTarget"
|
30
|
+
end
|
31
|
+
end
|
32
|
+
add_enum "google.cloud.scheduler.v1.Job.State" do
|
33
|
+
value :STATE_UNSPECIFIED, 0
|
34
|
+
value :ENABLED, 1
|
35
|
+
value :PAUSED, 2
|
36
|
+
value :DISABLED, 3
|
37
|
+
value :UPDATE_FAILED, 4
|
38
|
+
end
|
39
|
+
add_message "google.cloud.scheduler.v1.RetryConfig" do
|
40
|
+
optional :retry_count, :int32, 1
|
41
|
+
optional :max_retry_duration, :message, 2, "google.protobuf.Duration"
|
42
|
+
optional :min_backoff_duration, :message, 3, "google.protobuf.Duration"
|
43
|
+
optional :max_backoff_duration, :message, 4, "google.protobuf.Duration"
|
44
|
+
optional :max_doublings, :int32, 5
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
module Google
|
50
|
+
module Cloud
|
51
|
+
module Scheduler
|
52
|
+
module V1
|
53
|
+
Job = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.scheduler.v1.Job").msgclass
|
54
|
+
Job::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.scheduler.v1.Job.State").enummodule
|
55
|
+
RetryConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.scheduler.v1.RetryConfig").msgclass
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
@@ -0,0 +1,73 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: google/cloud/scheduler/v1/target.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'google/api/resource_pb'
|
7
|
+
require 'google/api/annotations_pb'
|
8
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
9
|
+
add_file("google/cloud/scheduler/v1/target.proto", :syntax => :proto3) do
|
10
|
+
add_message "google.cloud.scheduler.v1.HttpTarget" do
|
11
|
+
optional :uri, :string, 1
|
12
|
+
optional :http_method, :enum, 2, "google.cloud.scheduler.v1.HttpMethod"
|
13
|
+
map :headers, :string, :string, 3
|
14
|
+
optional :body, :bytes, 4
|
15
|
+
oneof :authorization_header do
|
16
|
+
optional :oauth_token, :message, 5, "google.cloud.scheduler.v1.OAuthToken"
|
17
|
+
optional :oidc_token, :message, 6, "google.cloud.scheduler.v1.OidcToken"
|
18
|
+
end
|
19
|
+
end
|
20
|
+
add_message "google.cloud.scheduler.v1.AppEngineHttpTarget" do
|
21
|
+
optional :http_method, :enum, 1, "google.cloud.scheduler.v1.HttpMethod"
|
22
|
+
optional :app_engine_routing, :message, 2, "google.cloud.scheduler.v1.AppEngineRouting"
|
23
|
+
optional :relative_uri, :string, 3
|
24
|
+
map :headers, :string, :string, 4
|
25
|
+
optional :body, :bytes, 5
|
26
|
+
end
|
27
|
+
add_message "google.cloud.scheduler.v1.PubsubTarget" do
|
28
|
+
optional :topic_name, :string, 1
|
29
|
+
optional :data, :bytes, 3
|
30
|
+
map :attributes, :string, :string, 4
|
31
|
+
end
|
32
|
+
add_message "google.cloud.scheduler.v1.AppEngineRouting" do
|
33
|
+
optional :service, :string, 1
|
34
|
+
optional :version, :string, 2
|
35
|
+
optional :instance, :string, 3
|
36
|
+
optional :host, :string, 4
|
37
|
+
end
|
38
|
+
add_message "google.cloud.scheduler.v1.OAuthToken" do
|
39
|
+
optional :service_account_email, :string, 1
|
40
|
+
optional :scope, :string, 2
|
41
|
+
end
|
42
|
+
add_message "google.cloud.scheduler.v1.OidcToken" do
|
43
|
+
optional :service_account_email, :string, 1
|
44
|
+
optional :audience, :string, 2
|
45
|
+
end
|
46
|
+
add_enum "google.cloud.scheduler.v1.HttpMethod" do
|
47
|
+
value :HTTP_METHOD_UNSPECIFIED, 0
|
48
|
+
value :POST, 1
|
49
|
+
value :GET, 2
|
50
|
+
value :HEAD, 3
|
51
|
+
value :PUT, 4
|
52
|
+
value :DELETE, 5
|
53
|
+
value :PATCH, 6
|
54
|
+
value :OPTIONS, 7
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
module Google
|
60
|
+
module Cloud
|
61
|
+
module Scheduler
|
62
|
+
module V1
|
63
|
+
HttpTarget = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.scheduler.v1.HttpTarget").msgclass
|
64
|
+
AppEngineHttpTarget = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.scheduler.v1.AppEngineHttpTarget").msgclass
|
65
|
+
PubsubTarget = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.scheduler.v1.PubsubTarget").msgclass
|
66
|
+
AppEngineRouting = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.scheduler.v1.AppEngineRouting").msgclass
|
67
|
+
OAuthToken = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.scheduler.v1.OAuthToken").msgclass
|
68
|
+
OidcToken = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.scheduler.v1.OidcToken").msgclass
|
69
|
+
HttpMethod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.scheduler.v1.HttpMethod").enummodule
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Cloud
|
22
|
+
module Scheduler
|
23
|
+
module V1
|
24
|
+
VERSION = "0.1.0"
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
require "google/cloud/scheduler/v1/cloud_scheduler"
|
20
|
+
require "google/cloud/scheduler/v1/version"
|
21
|
+
|
22
|
+
module Google
|
23
|
+
module Cloud
|
24
|
+
module Scheduler
|
25
|
+
##
|
26
|
+
# To load this package, including all its services, and instantiate a client:
|
27
|
+
#
|
28
|
+
# require "google/cloud/scheduler/v1"
|
29
|
+
# client = ::Google::Cloud::Scheduler::V1::CloudScheduler::Client.new
|
30
|
+
#
|
31
|
+
module V1
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
# This gem does not autoload during Bundler.require. To load this gem,
|
20
|
+
# issue explicit require statements for the packages desired, e.g.:
|
21
|
+
# require "google/cloud/scheduler/v1"
|
@@ -0,0 +1,59 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Api
|
22
|
+
# An indicator of the behavior of a given field (for example, that a field
|
23
|
+
# is required in requests, or given as output but ignored as input).
|
24
|
+
# This **does not** change the behavior in protocol buffers itself; it only
|
25
|
+
# denotes the behavior and may affect how API tooling handles the field.
|
26
|
+
#
|
27
|
+
# Note: This enum **may** receive new values in the future.
|
28
|
+
module FieldBehavior
|
29
|
+
# Conventional default for enums. Do not use this.
|
30
|
+
FIELD_BEHAVIOR_UNSPECIFIED = 0
|
31
|
+
|
32
|
+
# Specifically denotes a field as optional.
|
33
|
+
# While all fields in protocol buffers are optional, this may be specified
|
34
|
+
# for emphasis if appropriate.
|
35
|
+
OPTIONAL = 1
|
36
|
+
|
37
|
+
# Denotes a field as required.
|
38
|
+
# This indicates that the field **must** be provided as part of the request,
|
39
|
+
# and failure to do so will cause an error (usually `INVALID_ARGUMENT`).
|
40
|
+
REQUIRED = 2
|
41
|
+
|
42
|
+
# Denotes a field as output only.
|
43
|
+
# This indicates that the field is provided in responses, but including the
|
44
|
+
# field in a request does nothing (the server *must* ignore it and
|
45
|
+
# *must not* throw an error as a result of the field's presence).
|
46
|
+
OUTPUT_ONLY = 3
|
47
|
+
|
48
|
+
# Denotes a field as input only.
|
49
|
+
# This indicates that the field is provided in requests, and the
|
50
|
+
# corresponding field is not included in output.
|
51
|
+
INPUT_ONLY = 4
|
52
|
+
|
53
|
+
# Denotes a field as immutable.
|
54
|
+
# This indicates that the field may be set once in a request to create a
|
55
|
+
# resource, but may not be changed thereafter.
|
56
|
+
IMMUTABLE = 5
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|