google-api-client 0.25.0 → 0.26.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/{CONTRIBUTING.md → .github/CONTRIBUTING.md} +0 -0
- data/.github/ISSUE_TEMPLATE/bug_report.md +36 -0
- data/.github/ISSUE_TEMPLATE/feature_request.md +21 -0
- data/.github/ISSUE_TEMPLATE/support_request.md +7 -0
- data/.kokoro/build.bat +8 -0
- data/.kokoro/build.sh +36 -0
- data/.kokoro/common.cfg +22 -0
- data/.kokoro/continuous/common.cfg +20 -0
- data/.kokoro/continuous/linux.cfg +15 -0
- data/.kokoro/continuous/osx.cfg +3 -0
- data/.kokoro/continuous/windows.cfg +3 -0
- data/.kokoro/osx.sh +35 -0
- data/.kokoro/presubmit/common.cfg +19 -0
- data/.kokoro/presubmit/linux.cfg +14 -0
- data/.kokoro/presubmit/osx.cfg +3 -0
- data/.kokoro/presubmit/windows.cfg +3 -0
- data/.kokoro/trampoline.sh +24 -0
- data/.kokoro/windows.sh +32 -0
- data/CHANGELOG.md +83 -0
- data/Gemfile +2 -2
- data/generated/google/apis/adexchangebuyer2_v2beta1.rb +1 -1
- data/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb +3 -1
- data/generated/google/apis/alertcenter_v1beta1.rb +5 -3
- data/generated/google/apis/alertcenter_v1beta1/classes.rb +110 -101
- data/generated/google/apis/alertcenter_v1beta1/representations.rb +13 -0
- data/generated/google/apis/alertcenter_v1beta1/service.rb +83 -76
- data/generated/google/apis/androiddeviceprovisioning_v1.rb +1 -1
- data/generated/google/apis/androiddeviceprovisioning_v1/classes.rb +7 -0
- data/generated/google/apis/androiddeviceprovisioning_v1/representations.rb +2 -0
- data/generated/google/apis/androiddeviceprovisioning_v1/service.rb +1 -1
- data/generated/google/apis/androidenterprise_v1.rb +1 -1
- data/generated/google/apis/androidenterprise_v1/classes.rb +129 -44
- data/generated/google/apis/androidenterprise_v1/representations.rb +48 -0
- data/generated/google/apis/androidenterprise_v1/service.rb +218 -0
- data/generated/google/apis/androidmanagement_v1.rb +1 -1
- data/generated/google/apis/androidmanagement_v1/classes.rb +1 -1
- data/generated/google/apis/androidpublisher_v3.rb +1 -1
- data/generated/google/apis/androidpublisher_v3/classes.rb +8 -0
- data/generated/google/apis/androidpublisher_v3/representations.rb +1 -0
- data/generated/google/apis/appengine_v1.rb +1 -1
- data/generated/google/apis/appengine_v1beta.rb +1 -1
- data/generated/google/apis/bigquery_v2.rb +1 -1
- data/generated/google/apis/bigquery_v2/classes.rb +87 -29
- data/generated/google/apis/bigquery_v2/representations.rb +21 -0
- data/generated/google/apis/bigquery_v2/service.rb +7 -9
- data/generated/google/apis/calendar_v3.rb +2 -2
- data/generated/google/apis/calendar_v3/classes.rb +14 -6
- data/generated/google/apis/classroom_v1.rb +1 -1
- data/generated/google/apis/classroom_v1/service.rb +1 -1
- data/generated/google/apis/cloudasset_v1beta1.rb +1 -1
- data/generated/google/apis/cloudasset_v1beta1/classes.rb +14 -10
- data/generated/google/apis/cloudasset_v1beta1/service.rb +4 -4
- data/generated/google/apis/clouddebugger_v2.rb +1 -1
- data/generated/google/apis/clouddebugger_v2/classes.rb +2 -2
- data/generated/google/apis/cloudfunctions_v1.rb +1 -1
- data/generated/google/apis/cloudfunctions_v1/classes.rb +2 -3
- data/generated/google/apis/cloudfunctions_v1beta2.rb +1 -1
- data/generated/google/apis/cloudfunctions_v1beta2/classes.rb +2 -3
- data/generated/google/apis/cloudiot_v1.rb +1 -1
- data/generated/google/apis/cloudiot_v1/classes.rb +127 -0
- data/generated/google/apis/cloudiot_v1/representations.rb +70 -0
- data/generated/google/apis/cloudiot_v1/service.rb +172 -2
- data/generated/google/apis/cloudkms_v1.rb +1 -1
- data/generated/google/apis/cloudkms_v1/service.rb +107 -0
- data/generated/google/apis/{cloudiot_v1beta1.rb → cloudscheduler_v1beta1.rb} +8 -12
- data/generated/google/apis/cloudscheduler_v1beta1/classes.rb +882 -0
- data/generated/google/apis/cloudscheduler_v1beta1/representations.rb +264 -0
- data/generated/google/apis/cloudscheduler_v1beta1/service.rb +445 -0
- data/generated/google/apis/cloudsearch_v1.rb +1 -1
- data/generated/google/apis/cloudsearch_v1/classes.rb +79 -1
- data/generated/google/apis/cloudsearch_v1/representations.rb +44 -0
- data/generated/google/apis/cloudsearch_v1/service.rb +88 -3
- data/generated/google/apis/composer_v1.rb +1 -1
- data/generated/google/apis/composer_v1/classes.rb +9 -0
- data/generated/google/apis/composer_v1/representations.rb +1 -0
- data/generated/google/apis/compute_alpha.rb +1 -1
- data/generated/google/apis/compute_alpha/classes.rb +938 -117
- data/generated/google/apis/compute_alpha/representations.rb +310 -2
- data/generated/google/apis/compute_alpha/service.rb +1203 -245
- data/generated/google/apis/compute_beta.rb +1 -1
- data/generated/google/apis/compute_beta/classes.rb +1175 -219
- data/generated/google/apis/compute_beta/representations.rb +375 -2
- data/generated/google/apis/compute_beta/service.rb +907 -139
- data/generated/google/apis/compute_v1.rb +1 -1
- data/generated/google/apis/compute_v1/classes.rb +1485 -143
- data/generated/google/apis/compute_v1/representations.rb +503 -0
- data/generated/google/apis/compute_v1/service.rb +1375 -85
- data/generated/google/apis/container_v1.rb +3 -3
- data/generated/google/apis/container_v1/classes.rb +99 -6
- data/generated/google/apis/container_v1/representations.rb +39 -0
- data/generated/google/apis/container_v1/service.rb +2 -2
- data/generated/google/apis/container_v1beta1.rb +3 -3
- data/generated/google/apis/container_v1beta1/classes.rb +162 -9
- data/generated/google/apis/container_v1beta1/representations.rb +80 -0
- data/generated/google/apis/container_v1beta1/service.rb +3 -3
- data/generated/google/apis/content_v2.rb +1 -1
- data/generated/google/apis/content_v2/classes.rb +40 -32
- data/generated/google/apis/content_v2/representations.rb +0 -1
- data/generated/google/apis/content_v2/service.rb +3 -3
- data/generated/google/apis/content_v2_1.rb +35 -0
- data/generated/google/apis/content_v2_1/classes.rb +9104 -0
- data/generated/google/apis/content_v2_1/representations.rb +3967 -0
- data/generated/google/apis/content_v2_1/service.rb +3463 -0
- data/generated/google/apis/dataflow_v1b3.rb +1 -1
- data/generated/google/apis/dataflow_v1b3/classes.rb +82 -0
- data/generated/google/apis/dataflow_v1b3/representations.rb +33 -0
- data/generated/google/apis/dataflow_v1b3/service.rb +97 -6
- data/generated/google/apis/dataproc_v1.rb +1 -1
- data/generated/google/apis/dataproc_v1/classes.rb +15 -1
- data/generated/google/apis/dataproc_v1/representations.rb +2 -0
- data/generated/google/apis/dataproc_v1beta2.rb +1 -1
- data/generated/google/apis/dataproc_v1beta2/classes.rb +125 -1
- data/generated/google/apis/dataproc_v1beta2/representations.rb +41 -0
- data/generated/google/apis/dialogflow_v2.rb +1 -1
- data/generated/google/apis/dialogflow_v2/classes.rb +13 -6
- data/generated/google/apis/dialogflow_v2/service.rb +2 -0
- data/generated/google/apis/dialogflow_v2beta1.rb +1 -1
- data/generated/google/apis/dialogflow_v2beta1/classes.rb +26 -6
- data/generated/google/apis/dialogflow_v2beta1/representations.rb +12 -0
- data/generated/google/apis/dialogflow_v2beta1/service.rb +261 -12
- data/generated/google/apis/dlp_v2.rb +1 -1
- data/generated/google/apis/dlp_v2/classes.rb +4 -4
- data/generated/google/apis/dns_v1beta2.rb +1 -1
- data/generated/google/apis/dns_v1beta2/classes.rb +326 -0
- data/generated/google/apis/dns_v1beta2/representations.rb +149 -0
- data/generated/google/apis/dns_v1beta2/service.rb +246 -0
- data/generated/google/apis/drive_v2.rb +3 -3
- data/generated/google/apis/drive_v3.rb +3 -3
- data/generated/google/apis/driveactivity_v2.rb +37 -0
- data/generated/google/apis/driveactivity_v2/classes.rb +1388 -0
- data/generated/google/apis/driveactivity_v2/representations.rb +799 -0
- data/generated/google/apis/driveactivity_v2/service.rb +89 -0
- data/generated/google/apis/firebasedynamiclinks_v1.rb +1 -1
- data/generated/google/apis/firebasedynamiclinks_v1/classes.rb +8 -1
- data/generated/google/apis/firebasedynamiclinks_v1/representations.rb +1 -0
- data/generated/google/apis/firebasehosting_v1beta1.rb +3 -2
- data/generated/google/apis/firebasehosting_v1beta1/classes.rb +43 -17
- data/generated/google/apis/firebasehosting_v1beta1/representations.rb +13 -0
- data/generated/google/apis/firebasehosting_v1beta1/service.rb +74 -1
- data/generated/google/apis/firestore_v1.rb +1 -1
- data/generated/google/apis/firestore_v1/classes.rb +2225 -520
- data/generated/google/apis/firestore_v1/representations.rb +800 -33
- data/generated/google/apis/firestore_v1/service.rb +526 -0
- data/generated/google/apis/fitness_v1.rb +1 -1
- data/generated/google/apis/fitness_v1/classes.rb +1 -2
- data/generated/google/apis/fitness_v1/service.rb +7 -3
- data/generated/google/apis/games_management_v1management.rb +1 -4
- data/generated/google/apis/games_v1.rb +1 -4
- data/generated/google/apis/genomics_v2alpha1.rb +1 -1
- data/generated/google/apis/genomics_v2alpha1/classes.rb +6 -1
- data/generated/google/apis/gmail_v1.rb +2 -2
- data/generated/google/apis/iap_v1.rb +34 -0
- data/generated/google/apis/iap_v1/classes.rb +308 -0
- data/generated/google/apis/iap_v1/representations.rb +126 -0
- data/generated/google/apis/iap_v1/service.rb +725 -0
- data/generated/google/apis/iap_v1beta1.rb +1 -1
- data/generated/google/apis/iap_v1beta1/classes.rb +0 -132
- data/generated/google/apis/iap_v1beta1/representations.rb +0 -32
- data/generated/google/apis/jobs_v2.rb +1 -1
- data/generated/google/apis/jobs_v2/classes.rb +8 -9
- data/generated/google/apis/jobs_v3.rb +1 -1
- data/generated/google/apis/jobs_v3/classes.rb +6 -6
- data/generated/google/apis/jobs_v3/service.rb +8 -8
- data/generated/google/apis/jobs_v3p1beta1.rb +1 -1
- data/generated/google/apis/jobs_v3p1beta1/classes.rb +9 -9
- data/generated/google/apis/jobs_v3p1beta1/service.rb +8 -8
- data/generated/google/apis/monitoring_v3.rb +1 -1
- data/generated/google/apis/monitoring_v3/classes.rb +20 -7
- data/generated/google/apis/monitoring_v3/representations.rb +1 -0
- data/generated/google/apis/monitoring_v3/service.rb +0 -365
- data/generated/google/apis/pagespeedonline_v5.rb +32 -0
- data/generated/google/apis/pagespeedonline_v5/classes.rb +724 -0
- data/generated/google/apis/pagespeedonline_v5/representations.rb +315 -0
- data/generated/google/apis/pagespeedonline_v5/service.rb +116 -0
- data/generated/google/apis/people_v1.rb +3 -3
- data/generated/google/apis/pubsub_v1.rb +1 -1
- data/generated/google/apis/pubsub_v1/classes.rb +63 -12
- data/generated/google/apis/pubsub_v1/representations.rb +15 -0
- data/generated/google/apis/pubsub_v1/service.rb +26 -18
- data/generated/google/apis/redis_v1.rb +2 -3
- data/generated/google/apis/redis_v1/service.rb +1 -2
- data/generated/google/apis/redis_v1beta1.rb +2 -3
- data/generated/google/apis/redis_v1beta1/service.rb +1 -2
- data/generated/google/apis/runtimeconfig_v1beta1.rb +1 -1
- data/generated/google/apis/runtimeconfig_v1beta1/classes.rb +2 -2
- data/generated/google/apis/script_v1.rb +24 -6
- data/generated/google/apis/serviceconsumermanagement_v1.rb +1 -1
- data/generated/google/apis/serviceconsumermanagement_v1/classes.rb +66 -1
- data/generated/google/apis/serviceconsumermanagement_v1/representations.rb +30 -0
- data/generated/google/apis/serviceconsumermanagement_v1/service.rb +89 -0
- data/generated/google/apis/servicecontrol_v1.rb +1 -1
- data/generated/google/apis/servicemanagement_v1.rb +1 -1
- data/generated/google/apis/servicemanagement_v1/classes.rb +7 -0
- data/generated/google/apis/servicemanagement_v1/representations.rb +1 -0
- data/generated/google/apis/servicenetworking_v1beta.rb +1 -1
- data/generated/google/apis/servicenetworking_v1beta/classes.rb +84 -37
- data/generated/google/apis/servicenetworking_v1beta/representations.rb +15 -0
- data/generated/google/apis/servicenetworking_v1beta/service.rb +132 -43
- data/generated/google/apis/serviceusage_v1.rb +1 -1
- data/generated/google/apis/serviceusage_v1/classes.rb +1 -1
- data/generated/google/apis/serviceusage_v1beta1.rb +1 -1
- data/generated/google/apis/serviceusage_v1beta1/classes.rb +1 -1
- data/generated/google/apis/sheets_v4.rb +4 -4
- data/generated/google/apis/slides_v1.rb +4 -4
- data/generated/google/apis/slides_v1/classes.rb +187 -2
- data/generated/google/apis/slides_v1/representations.rb +67 -0
- data/generated/google/apis/slides_v1/service.rb +4 -3
- data/generated/google/apis/sourcerepo_v1.rb +2 -2
- data/generated/google/apis/sourcerepo_v1/service.rb +1 -1
- data/generated/google/apis/speech_v1.rb +1 -1
- data/generated/google/apis/speech_v1/classes.rb +58 -10
- data/generated/google/apis/speech_v1/representations.rb +29 -1
- data/generated/google/apis/{speech_v1beta1.rb → speech_v1p1beta1.rb} +6 -6
- data/generated/google/apis/speech_v1p1beta1/classes.rb +922 -0
- data/generated/google/apis/speech_v1p1beta1/representations.rb +294 -0
- data/generated/google/apis/{speech_v1beta1 → speech_v1p1beta1}/service.rb +33 -35
- data/generated/google/apis/sqladmin_v1beta4.rb +1 -1
- data/generated/google/apis/sqladmin_v1beta4/classes.rb +64 -3
- data/generated/google/apis/sqladmin_v1beta4/representations.rb +31 -0
- data/generated/google/apis/storage_v1.rb +1 -1
- data/generated/google/apis/storage_v1/classes.rb +54 -0
- data/generated/google/apis/storage_v1/representations.rb +31 -0
- data/generated/google/apis/streetviewpublish_v1.rb +1 -1
- data/generated/google/apis/streetviewpublish_v1/classes.rb +26 -0
- data/generated/google/apis/streetviewpublish_v1/representations.rb +4 -0
- data/generated/google/apis/streetviewpublish_v1/service.rb +29 -3
- data/generated/google/apis/tasks_v1.rb +1 -1
- data/generated/google/apis/testing_v1.rb +1 -1
- data/generated/google/apis/testing_v1/classes.rb +49 -19
- data/generated/google/apis/testing_v1/representations.rb +20 -2
- data/generated/google/apis/toolresults_v1beta3.rb +1 -1
- data/generated/google/apis/toolresults_v1beta3/classes.rb +77 -70
- data/generated/google/apis/vault_v1.rb +1 -1
- data/generated/google/apis/vault_v1/classes.rb +78 -7
- data/generated/google/apis/vault_v1/representations.rb +34 -1
- data/generated/google/apis/vault_v1/service.rb +141 -0
- data/generated/google/apis/vision_v1.rb +1 -1
- data/generated/google/apis/vision_v1/classes.rb +33 -0
- data/generated/google/apis/vision_v1/representations.rb +16 -0
- data/generated/google/apis/vision_v1/service.rb +2 -2
- data/generated/google/apis/vision_v1p1beta1.rb +1 -1
- data/generated/google/apis/vision_v1p1beta1/classes.rb +33 -0
- data/generated/google/apis/vision_v1p1beta1/representations.rb +16 -0
- data/generated/google/apis/vision_v1p2beta1.rb +1 -1
- data/generated/google/apis/vision_v1p2beta1/classes.rb +33 -0
- data/generated/google/apis/vision_v1p2beta1/representations.rb +16 -0
- data/generated/google/apis/youtube_partner_v1.rb +1 -1
- data/google-api-client.gemspec +1 -1
- data/lib/google/api_client/auth/installed_app.rb +17 -2
- data/lib/google/api_client/client_secrets.rb +1 -1
- data/lib/google/apis/core/download.rb +2 -2
- data/lib/google/apis/errors.rb +9 -0
- data/lib/google/apis/generator/annotator.rb +2 -2
- data/lib/google/apis/version.rb +1 -1
- metadata +46 -17
- data/generated/google/apis/cloudiot_v1beta1/classes.rb +0 -959
- data/generated/google/apis/cloudiot_v1beta1/representations.rb +0 -375
- data/generated/google/apis/cloudiot_v1beta1/service.rb +0 -618
- data/generated/google/apis/dfareporting_v3_0.rb +0 -40
- data/generated/google/apis/dfareporting_v3_0/classes.rb +0 -12119
- data/generated/google/apis/dfareporting_v3_0/representations.rb +0 -4336
- data/generated/google/apis/dfareporting_v3_0/service.rb +0 -8701
- data/generated/google/apis/speech_v1beta1/classes.rb +0 -480
- data/generated/google/apis/speech_v1beta1/representations.rb +0 -194
@@ -0,0 +1,264 @@
|
|
1
|
+
# Copyright 2015 Google Inc.
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
require 'date'
|
16
|
+
require 'google/apis/core/base_service'
|
17
|
+
require 'google/apis/core/json_representation'
|
18
|
+
require 'google/apis/core/hashable'
|
19
|
+
require 'google/apis/errors'
|
20
|
+
|
21
|
+
module Google
|
22
|
+
module Apis
|
23
|
+
module CloudschedulerV1beta1
|
24
|
+
|
25
|
+
class AppEngineHttpTarget
|
26
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
27
|
+
|
28
|
+
include Google::Apis::Core::JsonObjectSupport
|
29
|
+
end
|
30
|
+
|
31
|
+
class AppEngineRouting
|
32
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
33
|
+
|
34
|
+
include Google::Apis::Core::JsonObjectSupport
|
35
|
+
end
|
36
|
+
|
37
|
+
class Empty
|
38
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
39
|
+
|
40
|
+
include Google::Apis::Core::JsonObjectSupport
|
41
|
+
end
|
42
|
+
|
43
|
+
class HttpTarget
|
44
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
45
|
+
|
46
|
+
include Google::Apis::Core::JsonObjectSupport
|
47
|
+
end
|
48
|
+
|
49
|
+
class Job
|
50
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
51
|
+
|
52
|
+
include Google::Apis::Core::JsonObjectSupport
|
53
|
+
end
|
54
|
+
|
55
|
+
class ListJobsResponse
|
56
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
57
|
+
|
58
|
+
include Google::Apis::Core::JsonObjectSupport
|
59
|
+
end
|
60
|
+
|
61
|
+
class ListLocationsResponse
|
62
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
63
|
+
|
64
|
+
include Google::Apis::Core::JsonObjectSupport
|
65
|
+
end
|
66
|
+
|
67
|
+
class Location
|
68
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
69
|
+
|
70
|
+
include Google::Apis::Core::JsonObjectSupport
|
71
|
+
end
|
72
|
+
|
73
|
+
class PauseJobRequest
|
74
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
75
|
+
|
76
|
+
include Google::Apis::Core::JsonObjectSupport
|
77
|
+
end
|
78
|
+
|
79
|
+
class PubsubMessage
|
80
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
81
|
+
|
82
|
+
include Google::Apis::Core::JsonObjectSupport
|
83
|
+
end
|
84
|
+
|
85
|
+
class PubsubTarget
|
86
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
87
|
+
|
88
|
+
include Google::Apis::Core::JsonObjectSupport
|
89
|
+
end
|
90
|
+
|
91
|
+
class ResumeJobRequest
|
92
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
93
|
+
|
94
|
+
include Google::Apis::Core::JsonObjectSupport
|
95
|
+
end
|
96
|
+
|
97
|
+
class RetryConfig
|
98
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
99
|
+
|
100
|
+
include Google::Apis::Core::JsonObjectSupport
|
101
|
+
end
|
102
|
+
|
103
|
+
class RunJobRequest
|
104
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
105
|
+
|
106
|
+
include Google::Apis::Core::JsonObjectSupport
|
107
|
+
end
|
108
|
+
|
109
|
+
class Status
|
110
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
111
|
+
|
112
|
+
include Google::Apis::Core::JsonObjectSupport
|
113
|
+
end
|
114
|
+
|
115
|
+
class AppEngineHttpTarget
|
116
|
+
# @private
|
117
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
118
|
+
property :app_engine_routing, as: 'appEngineRouting', class: Google::Apis::CloudschedulerV1beta1::AppEngineRouting, decorator: Google::Apis::CloudschedulerV1beta1::AppEngineRouting::Representation
|
119
|
+
|
120
|
+
property :body, :base64 => true, as: 'body'
|
121
|
+
hash :headers, as: 'headers'
|
122
|
+
property :http_method, as: 'httpMethod'
|
123
|
+
property :relative_uri, as: 'relativeUri'
|
124
|
+
end
|
125
|
+
end
|
126
|
+
|
127
|
+
class AppEngineRouting
|
128
|
+
# @private
|
129
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
130
|
+
property :host, as: 'host'
|
131
|
+
property :instance, as: 'instance'
|
132
|
+
property :service, as: 'service'
|
133
|
+
property :version, as: 'version'
|
134
|
+
end
|
135
|
+
end
|
136
|
+
|
137
|
+
class Empty
|
138
|
+
# @private
|
139
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
140
|
+
end
|
141
|
+
end
|
142
|
+
|
143
|
+
class HttpTarget
|
144
|
+
# @private
|
145
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
146
|
+
property :body, :base64 => true, as: 'body'
|
147
|
+
hash :headers, as: 'headers'
|
148
|
+
property :http_method, as: 'httpMethod'
|
149
|
+
property :uri, as: 'uri'
|
150
|
+
end
|
151
|
+
end
|
152
|
+
|
153
|
+
class Job
|
154
|
+
# @private
|
155
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
156
|
+
property :app_engine_http_target, as: 'appEngineHttpTarget', class: Google::Apis::CloudschedulerV1beta1::AppEngineHttpTarget, decorator: Google::Apis::CloudschedulerV1beta1::AppEngineHttpTarget::Representation
|
157
|
+
|
158
|
+
property :description, as: 'description'
|
159
|
+
property :http_target, as: 'httpTarget', class: Google::Apis::CloudschedulerV1beta1::HttpTarget, decorator: Google::Apis::CloudschedulerV1beta1::HttpTarget::Representation
|
160
|
+
|
161
|
+
property :last_attempt_time, as: 'lastAttemptTime'
|
162
|
+
property :name, as: 'name'
|
163
|
+
property :pubsub_target, as: 'pubsubTarget', class: Google::Apis::CloudschedulerV1beta1::PubsubTarget, decorator: Google::Apis::CloudschedulerV1beta1::PubsubTarget::Representation
|
164
|
+
|
165
|
+
property :retry_config, as: 'retryConfig', class: Google::Apis::CloudschedulerV1beta1::RetryConfig, decorator: Google::Apis::CloudschedulerV1beta1::RetryConfig::Representation
|
166
|
+
|
167
|
+
property :schedule, as: 'schedule'
|
168
|
+
property :schedule_time, as: 'scheduleTime'
|
169
|
+
property :state, as: 'state'
|
170
|
+
property :status, as: 'status', class: Google::Apis::CloudschedulerV1beta1::Status, decorator: Google::Apis::CloudschedulerV1beta1::Status::Representation
|
171
|
+
|
172
|
+
property :time_zone, as: 'timeZone'
|
173
|
+
property :user_update_time, as: 'userUpdateTime'
|
174
|
+
end
|
175
|
+
end
|
176
|
+
|
177
|
+
class ListJobsResponse
|
178
|
+
# @private
|
179
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
180
|
+
collection :jobs, as: 'jobs', class: Google::Apis::CloudschedulerV1beta1::Job, decorator: Google::Apis::CloudschedulerV1beta1::Job::Representation
|
181
|
+
|
182
|
+
property :next_page_token, as: 'nextPageToken'
|
183
|
+
end
|
184
|
+
end
|
185
|
+
|
186
|
+
class ListLocationsResponse
|
187
|
+
# @private
|
188
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
189
|
+
collection :locations, as: 'locations', class: Google::Apis::CloudschedulerV1beta1::Location, decorator: Google::Apis::CloudschedulerV1beta1::Location::Representation
|
190
|
+
|
191
|
+
property :next_page_token, as: 'nextPageToken'
|
192
|
+
end
|
193
|
+
end
|
194
|
+
|
195
|
+
class Location
|
196
|
+
# @private
|
197
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
198
|
+
property :display_name, as: 'displayName'
|
199
|
+
hash :labels, as: 'labels'
|
200
|
+
property :location_id, as: 'locationId'
|
201
|
+
hash :metadata, as: 'metadata'
|
202
|
+
property :name, as: 'name'
|
203
|
+
end
|
204
|
+
end
|
205
|
+
|
206
|
+
class PauseJobRequest
|
207
|
+
# @private
|
208
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
209
|
+
end
|
210
|
+
end
|
211
|
+
|
212
|
+
class PubsubMessage
|
213
|
+
# @private
|
214
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
215
|
+
hash :attributes, as: 'attributes'
|
216
|
+
property :data, :base64 => true, as: 'data'
|
217
|
+
property :message_id, as: 'messageId'
|
218
|
+
property :publish_time, as: 'publishTime'
|
219
|
+
end
|
220
|
+
end
|
221
|
+
|
222
|
+
class PubsubTarget
|
223
|
+
# @private
|
224
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
225
|
+
hash :attributes, as: 'attributes'
|
226
|
+
property :data, :base64 => true, as: 'data'
|
227
|
+
property :topic_name, as: 'topicName'
|
228
|
+
end
|
229
|
+
end
|
230
|
+
|
231
|
+
class ResumeJobRequest
|
232
|
+
# @private
|
233
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
234
|
+
end
|
235
|
+
end
|
236
|
+
|
237
|
+
class RetryConfig
|
238
|
+
# @private
|
239
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
240
|
+
property :max_backoff_duration, as: 'maxBackoffDuration'
|
241
|
+
property :max_doublings, as: 'maxDoublings'
|
242
|
+
property :max_retry_duration, as: 'maxRetryDuration'
|
243
|
+
property :min_backoff_duration, as: 'minBackoffDuration'
|
244
|
+
property :retry_count, as: 'retryCount'
|
245
|
+
end
|
246
|
+
end
|
247
|
+
|
248
|
+
class RunJobRequest
|
249
|
+
# @private
|
250
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
251
|
+
end
|
252
|
+
end
|
253
|
+
|
254
|
+
class Status
|
255
|
+
# @private
|
256
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
257
|
+
property :code, as: 'code'
|
258
|
+
collection :details, as: 'details'
|
259
|
+
property :message, as: 'message'
|
260
|
+
end
|
261
|
+
end
|
262
|
+
end
|
263
|
+
end
|
264
|
+
end
|
@@ -0,0 +1,445 @@
|
|
1
|
+
# Copyright 2015 Google Inc.
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
require 'google/apis/core/base_service'
|
16
|
+
require 'google/apis/core/json_representation'
|
17
|
+
require 'google/apis/core/hashable'
|
18
|
+
require 'google/apis/errors'
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Apis
|
22
|
+
module CloudschedulerV1beta1
|
23
|
+
# Cloud Scheduler API
|
24
|
+
#
|
25
|
+
# Creates and manages jobs run on a regular recurring schedule.
|
26
|
+
#
|
27
|
+
# @example
|
28
|
+
# require 'google/apis/cloudscheduler_v1beta1'
|
29
|
+
#
|
30
|
+
# Cloudscheduler = Google::Apis::CloudschedulerV1beta1 # Alias the module
|
31
|
+
# service = Cloudscheduler::CloudSchedulerService.new
|
32
|
+
#
|
33
|
+
# @see https://cloud.google.com/scheduler/
|
34
|
+
class CloudSchedulerService < Google::Apis::Core::BaseService
|
35
|
+
# @return [String]
|
36
|
+
# API key. Your API key identifies your project and provides you with API access,
|
37
|
+
# quota, and reports. Required unless you provide an OAuth 2.0 token.
|
38
|
+
attr_accessor :key
|
39
|
+
|
40
|
+
# @return [String]
|
41
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
42
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
43
|
+
attr_accessor :quota_user
|
44
|
+
|
45
|
+
def initialize
|
46
|
+
super('https://cloudscheduler.googleapis.com/', '')
|
47
|
+
@batch_path = 'batch'
|
48
|
+
end
|
49
|
+
|
50
|
+
# Gets information about a location.
|
51
|
+
# @param [String] name
|
52
|
+
# Resource name for the location.
|
53
|
+
# @param [String] fields
|
54
|
+
# Selector specifying which fields to include in a partial response.
|
55
|
+
# @param [String] quota_user
|
56
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
57
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
58
|
+
# @param [Google::Apis::RequestOptions] options
|
59
|
+
# Request-specific options
|
60
|
+
#
|
61
|
+
# @yield [result, err] Result & error if block supplied
|
62
|
+
# @yieldparam result [Google::Apis::CloudschedulerV1beta1::Location] parsed result object
|
63
|
+
# @yieldparam err [StandardError] error object if request failed
|
64
|
+
#
|
65
|
+
# @return [Google::Apis::CloudschedulerV1beta1::Location]
|
66
|
+
#
|
67
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
68
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
69
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
70
|
+
def get_project_location(name, fields: nil, quota_user: nil, options: nil, &block)
|
71
|
+
command = make_simple_command(:get, 'v1beta1/{+name}', options)
|
72
|
+
command.response_representation = Google::Apis::CloudschedulerV1beta1::Location::Representation
|
73
|
+
command.response_class = Google::Apis::CloudschedulerV1beta1::Location
|
74
|
+
command.params['name'] = name unless name.nil?
|
75
|
+
command.query['fields'] = fields unless fields.nil?
|
76
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
77
|
+
execute_or_queue_command(command, &block)
|
78
|
+
end
|
79
|
+
|
80
|
+
# Lists information about the supported locations for this service.
|
81
|
+
# @param [String] name
|
82
|
+
# The resource that owns the locations collection, if applicable.
|
83
|
+
# @param [String] filter
|
84
|
+
# The standard list filter.
|
85
|
+
# @param [Fixnum] page_size
|
86
|
+
# The standard list page size.
|
87
|
+
# @param [String] page_token
|
88
|
+
# The standard list page token.
|
89
|
+
# @param [String] fields
|
90
|
+
# Selector specifying which fields to include in a partial response.
|
91
|
+
# @param [String] quota_user
|
92
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
93
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
94
|
+
# @param [Google::Apis::RequestOptions] options
|
95
|
+
# Request-specific options
|
96
|
+
#
|
97
|
+
# @yield [result, err] Result & error if block supplied
|
98
|
+
# @yieldparam result [Google::Apis::CloudschedulerV1beta1::ListLocationsResponse] parsed result object
|
99
|
+
# @yieldparam err [StandardError] error object if request failed
|
100
|
+
#
|
101
|
+
# @return [Google::Apis::CloudschedulerV1beta1::ListLocationsResponse]
|
102
|
+
#
|
103
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
104
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
105
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
106
|
+
def list_project_locations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
107
|
+
command = make_simple_command(:get, 'v1beta1/{+name}/locations', options)
|
108
|
+
command.response_representation = Google::Apis::CloudschedulerV1beta1::ListLocationsResponse::Representation
|
109
|
+
command.response_class = Google::Apis::CloudschedulerV1beta1::ListLocationsResponse
|
110
|
+
command.params['name'] = name unless name.nil?
|
111
|
+
command.query['filter'] = filter unless filter.nil?
|
112
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
113
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
114
|
+
command.query['fields'] = fields unless fields.nil?
|
115
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
116
|
+
execute_or_queue_command(command, &block)
|
117
|
+
end
|
118
|
+
|
119
|
+
# Creates a job.
|
120
|
+
# @param [String] parent
|
121
|
+
# Required.
|
122
|
+
# The location name. For example:
|
123
|
+
# `projects/PROJECT_ID/locations/LOCATION_ID`.
|
124
|
+
# @param [Google::Apis::CloudschedulerV1beta1::Job] job_object
|
125
|
+
# @param [String] fields
|
126
|
+
# Selector specifying which fields to include in a partial response.
|
127
|
+
# @param [String] quota_user
|
128
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
129
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
130
|
+
# @param [Google::Apis::RequestOptions] options
|
131
|
+
# Request-specific options
|
132
|
+
#
|
133
|
+
# @yield [result, err] Result & error if block supplied
|
134
|
+
# @yieldparam result [Google::Apis::CloudschedulerV1beta1::Job] parsed result object
|
135
|
+
# @yieldparam err [StandardError] error object if request failed
|
136
|
+
#
|
137
|
+
# @return [Google::Apis::CloudschedulerV1beta1::Job]
|
138
|
+
#
|
139
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
140
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
141
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
142
|
+
def create_project_location_job(parent, job_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
143
|
+
command = make_simple_command(:post, 'v1beta1/{+parent}/jobs', options)
|
144
|
+
command.request_representation = Google::Apis::CloudschedulerV1beta1::Job::Representation
|
145
|
+
command.request_object = job_object
|
146
|
+
command.response_representation = Google::Apis::CloudschedulerV1beta1::Job::Representation
|
147
|
+
command.response_class = Google::Apis::CloudschedulerV1beta1::Job
|
148
|
+
command.params['parent'] = parent unless parent.nil?
|
149
|
+
command.query['fields'] = fields unless fields.nil?
|
150
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
151
|
+
execute_or_queue_command(command, &block)
|
152
|
+
end
|
153
|
+
|
154
|
+
# Deletes a job.
|
155
|
+
# @param [String] name
|
156
|
+
# Required.
|
157
|
+
# The job name. For example:
|
158
|
+
# `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
|
159
|
+
# @param [String] fields
|
160
|
+
# Selector specifying which fields to include in a partial response.
|
161
|
+
# @param [String] quota_user
|
162
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
163
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
164
|
+
# @param [Google::Apis::RequestOptions] options
|
165
|
+
# Request-specific options
|
166
|
+
#
|
167
|
+
# @yield [result, err] Result & error if block supplied
|
168
|
+
# @yieldparam result [Google::Apis::CloudschedulerV1beta1::Empty] parsed result object
|
169
|
+
# @yieldparam err [StandardError] error object if request failed
|
170
|
+
#
|
171
|
+
# @return [Google::Apis::CloudschedulerV1beta1::Empty]
|
172
|
+
#
|
173
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
174
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
175
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
176
|
+
def delete_project_location_job(name, fields: nil, quota_user: nil, options: nil, &block)
|
177
|
+
command = make_simple_command(:delete, 'v1beta1/{+name}', options)
|
178
|
+
command.response_representation = Google::Apis::CloudschedulerV1beta1::Empty::Representation
|
179
|
+
command.response_class = Google::Apis::CloudschedulerV1beta1::Empty
|
180
|
+
command.params['name'] = name unless name.nil?
|
181
|
+
command.query['fields'] = fields unless fields.nil?
|
182
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
183
|
+
execute_or_queue_command(command, &block)
|
184
|
+
end
|
185
|
+
|
186
|
+
# Gets a job.
|
187
|
+
# @param [String] name
|
188
|
+
# Required.
|
189
|
+
# The job name. For example:
|
190
|
+
# `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
|
191
|
+
# @param [String] fields
|
192
|
+
# Selector specifying which fields to include in a partial response.
|
193
|
+
# @param [String] quota_user
|
194
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
195
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
196
|
+
# @param [Google::Apis::RequestOptions] options
|
197
|
+
# Request-specific options
|
198
|
+
#
|
199
|
+
# @yield [result, err] Result & error if block supplied
|
200
|
+
# @yieldparam result [Google::Apis::CloudschedulerV1beta1::Job] parsed result object
|
201
|
+
# @yieldparam err [StandardError] error object if request failed
|
202
|
+
#
|
203
|
+
# @return [Google::Apis::CloudschedulerV1beta1::Job]
|
204
|
+
#
|
205
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
206
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
207
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
208
|
+
def get_project_location_job(name, fields: nil, quota_user: nil, options: nil, &block)
|
209
|
+
command = make_simple_command(:get, 'v1beta1/{+name}', options)
|
210
|
+
command.response_representation = Google::Apis::CloudschedulerV1beta1::Job::Representation
|
211
|
+
command.response_class = Google::Apis::CloudschedulerV1beta1::Job
|
212
|
+
command.params['name'] = name unless name.nil?
|
213
|
+
command.query['fields'] = fields unless fields.nil?
|
214
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
215
|
+
execute_or_queue_command(command, &block)
|
216
|
+
end
|
217
|
+
|
218
|
+
# Lists jobs.
|
219
|
+
# @param [String] parent
|
220
|
+
# Required.
|
221
|
+
# The location name. For example:
|
222
|
+
# `projects/PROJECT_ID/locations/LOCATION_ID`.
|
223
|
+
# @param [Fixnum] page_size
|
224
|
+
# Requested page size.
|
225
|
+
# The maximum page size is 500. If unspecified, the page size will
|
226
|
+
# be the maximum. Fewer jobs than requested might be returned,
|
227
|
+
# even if more jobs exist; use next_page_token to determine if more
|
228
|
+
# jobs exist.
|
229
|
+
# @param [String] page_token
|
230
|
+
# A token identifying a page of results the server will return. To
|
231
|
+
# request the first page results, page_token must be empty. To
|
232
|
+
# request the next page of results, page_token must be the value of
|
233
|
+
# next_page_token returned from
|
234
|
+
# the previous call to ListJobs. It is an error to
|
235
|
+
# switch the value of filter or
|
236
|
+
# order_by while iterating through pages.
|
237
|
+
# @param [String] fields
|
238
|
+
# Selector specifying which fields to include in a partial response.
|
239
|
+
# @param [String] quota_user
|
240
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
241
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
242
|
+
# @param [Google::Apis::RequestOptions] options
|
243
|
+
# Request-specific options
|
244
|
+
#
|
245
|
+
# @yield [result, err] Result & error if block supplied
|
246
|
+
# @yieldparam result [Google::Apis::CloudschedulerV1beta1::ListJobsResponse] parsed result object
|
247
|
+
# @yieldparam err [StandardError] error object if request failed
|
248
|
+
#
|
249
|
+
# @return [Google::Apis::CloudschedulerV1beta1::ListJobsResponse]
|
250
|
+
#
|
251
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
252
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
253
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
254
|
+
def list_project_location_jobs(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
255
|
+
command = make_simple_command(:get, 'v1beta1/{+parent}/jobs', options)
|
256
|
+
command.response_representation = Google::Apis::CloudschedulerV1beta1::ListJobsResponse::Representation
|
257
|
+
command.response_class = Google::Apis::CloudschedulerV1beta1::ListJobsResponse
|
258
|
+
command.params['parent'] = parent unless parent.nil?
|
259
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
260
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
261
|
+
command.query['fields'] = fields unless fields.nil?
|
262
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
263
|
+
execute_or_queue_command(command, &block)
|
264
|
+
end
|
265
|
+
|
266
|
+
# Updates a job.
|
267
|
+
# If successful, the updated Job is returned. If the job does
|
268
|
+
# not exist, `NOT_FOUND` is returned.
|
269
|
+
# If UpdateJob does not successfully return, it is possible for the
|
270
|
+
# job to be in an Job.State.UPDATE_FAILED state. A job in this state may
|
271
|
+
# not be executed. If this happens, retry the UpdateJob request
|
272
|
+
# until a successful response is received.
|
273
|
+
# @param [String] name
|
274
|
+
# The job name. For example:
|
275
|
+
# `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
|
276
|
+
# * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
|
277
|
+
# hyphens (-), colons (:), or periods (.).
|
278
|
+
# For more information, see
|
279
|
+
# [Identifying projects](https://cloud.google.com/resource-manager/docs/
|
280
|
+
# creating-managing-projects#identifying_projects)
|
281
|
+
# * `LOCATION_ID` is the canonical ID for the job's location.
|
282
|
+
# The list of available locations can be obtained by calling
|
283
|
+
# ListLocations.
|
284
|
+
# For more information, see https://cloud.google.com/about/locations/.
|
285
|
+
# * `JOB_ID` can contain only letters ([A-Za-z]), numbers ([0-9]),
|
286
|
+
# hyphens (-), or underscores (_). The maximum length is 500 characters.
|
287
|
+
# @param [Google::Apis::CloudschedulerV1beta1::Job] job_object
|
288
|
+
# @param [String] update_mask
|
289
|
+
# A mask used to specify which fields of the job are being updated.
|
290
|
+
# @param [String] fields
|
291
|
+
# Selector specifying which fields to include in a partial response.
|
292
|
+
# @param [String] quota_user
|
293
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
294
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
295
|
+
# @param [Google::Apis::RequestOptions] options
|
296
|
+
# Request-specific options
|
297
|
+
#
|
298
|
+
# @yield [result, err] Result & error if block supplied
|
299
|
+
# @yieldparam result [Google::Apis::CloudschedulerV1beta1::Job] parsed result object
|
300
|
+
# @yieldparam err [StandardError] error object if request failed
|
301
|
+
#
|
302
|
+
# @return [Google::Apis::CloudschedulerV1beta1::Job]
|
303
|
+
#
|
304
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
305
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
306
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
307
|
+
def patch_project_location_job(name, job_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
|
308
|
+
command = make_simple_command(:patch, 'v1beta1/{+name}', options)
|
309
|
+
command.request_representation = Google::Apis::CloudschedulerV1beta1::Job::Representation
|
310
|
+
command.request_object = job_object
|
311
|
+
command.response_representation = Google::Apis::CloudschedulerV1beta1::Job::Representation
|
312
|
+
command.response_class = Google::Apis::CloudschedulerV1beta1::Job
|
313
|
+
command.params['name'] = name unless name.nil?
|
314
|
+
command.query['updateMask'] = update_mask unless update_mask.nil?
|
315
|
+
command.query['fields'] = fields unless fields.nil?
|
316
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
317
|
+
execute_or_queue_command(command, &block)
|
318
|
+
end
|
319
|
+
|
320
|
+
# Pauses a job.
|
321
|
+
# If a job is paused then the system will stop executing the job
|
322
|
+
# until it is re-enabled via ResumeJob. The
|
323
|
+
# state of the job is stored in state; if paused it
|
324
|
+
# will be set to Job.State.PAUSED. A job must be in Job.State.ENABLED
|
325
|
+
# to be paused.
|
326
|
+
# @param [String] name
|
327
|
+
# Required.
|
328
|
+
# The job name. For example:
|
329
|
+
# `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
|
330
|
+
# @param [Google::Apis::CloudschedulerV1beta1::PauseJobRequest] pause_job_request_object
|
331
|
+
# @param [String] fields
|
332
|
+
# Selector specifying which fields to include in a partial response.
|
333
|
+
# @param [String] quota_user
|
334
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
335
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
336
|
+
# @param [Google::Apis::RequestOptions] options
|
337
|
+
# Request-specific options
|
338
|
+
#
|
339
|
+
# @yield [result, err] Result & error if block supplied
|
340
|
+
# @yieldparam result [Google::Apis::CloudschedulerV1beta1::Job] parsed result object
|
341
|
+
# @yieldparam err [StandardError] error object if request failed
|
342
|
+
#
|
343
|
+
# @return [Google::Apis::CloudschedulerV1beta1::Job]
|
344
|
+
#
|
345
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
346
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
347
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
348
|
+
def pause_job(name, pause_job_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
349
|
+
command = make_simple_command(:post, 'v1beta1/{+name}:pause', options)
|
350
|
+
command.request_representation = Google::Apis::CloudschedulerV1beta1::PauseJobRequest::Representation
|
351
|
+
command.request_object = pause_job_request_object
|
352
|
+
command.response_representation = Google::Apis::CloudschedulerV1beta1::Job::Representation
|
353
|
+
command.response_class = Google::Apis::CloudschedulerV1beta1::Job
|
354
|
+
command.params['name'] = name unless name.nil?
|
355
|
+
command.query['fields'] = fields unless fields.nil?
|
356
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
357
|
+
execute_or_queue_command(command, &block)
|
358
|
+
end
|
359
|
+
|
360
|
+
# Resume a job.
|
361
|
+
# This method reenables a job after it has been Job.State.PAUSED. The
|
362
|
+
# state of a job is stored in Job.state; after calling this method it
|
363
|
+
# will be set to Job.State.ENABLED. A job must be in
|
364
|
+
# Job.State.PAUSED to be resumed.
|
365
|
+
# @param [String] name
|
366
|
+
# Required.
|
367
|
+
# The job name. For example:
|
368
|
+
# `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
|
369
|
+
# @param [Google::Apis::CloudschedulerV1beta1::ResumeJobRequest] resume_job_request_object
|
370
|
+
# @param [String] fields
|
371
|
+
# Selector specifying which fields to include in a partial response.
|
372
|
+
# @param [String] quota_user
|
373
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
374
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
375
|
+
# @param [Google::Apis::RequestOptions] options
|
376
|
+
# Request-specific options
|
377
|
+
#
|
378
|
+
# @yield [result, err] Result & error if block supplied
|
379
|
+
# @yieldparam result [Google::Apis::CloudschedulerV1beta1::Job] parsed result object
|
380
|
+
# @yieldparam err [StandardError] error object if request failed
|
381
|
+
#
|
382
|
+
# @return [Google::Apis::CloudschedulerV1beta1::Job]
|
383
|
+
#
|
384
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
385
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
386
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
387
|
+
def resume_job(name, resume_job_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
388
|
+
command = make_simple_command(:post, 'v1beta1/{+name}:resume', options)
|
389
|
+
command.request_representation = Google::Apis::CloudschedulerV1beta1::ResumeJobRequest::Representation
|
390
|
+
command.request_object = resume_job_request_object
|
391
|
+
command.response_representation = Google::Apis::CloudschedulerV1beta1::Job::Representation
|
392
|
+
command.response_class = Google::Apis::CloudschedulerV1beta1::Job
|
393
|
+
command.params['name'] = name unless name.nil?
|
394
|
+
command.query['fields'] = fields unless fields.nil?
|
395
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
396
|
+
execute_or_queue_command(command, &block)
|
397
|
+
end
|
398
|
+
|
399
|
+
# Forces a job to run now.
|
400
|
+
# When this method is called, Cloud Scheduler will dispatch the job, even
|
401
|
+
# if the job is already running.
|
402
|
+
# @param [String] name
|
403
|
+
# Required.
|
404
|
+
# The job name. For example:
|
405
|
+
# `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
|
406
|
+
# @param [Google::Apis::CloudschedulerV1beta1::RunJobRequest] run_job_request_object
|
407
|
+
# @param [String] fields
|
408
|
+
# Selector specifying which fields to include in a partial response.
|
409
|
+
# @param [String] quota_user
|
410
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
411
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
412
|
+
# @param [Google::Apis::RequestOptions] options
|
413
|
+
# Request-specific options
|
414
|
+
#
|
415
|
+
# @yield [result, err] Result & error if block supplied
|
416
|
+
# @yieldparam result [Google::Apis::CloudschedulerV1beta1::Job] parsed result object
|
417
|
+
# @yieldparam err [StandardError] error object if request failed
|
418
|
+
#
|
419
|
+
# @return [Google::Apis::CloudschedulerV1beta1::Job]
|
420
|
+
#
|
421
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
422
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
423
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
424
|
+
def run_job(name, run_job_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
425
|
+
command = make_simple_command(:post, 'v1beta1/{+name}:run', options)
|
426
|
+
command.request_representation = Google::Apis::CloudschedulerV1beta1::RunJobRequest::Representation
|
427
|
+
command.request_object = run_job_request_object
|
428
|
+
command.response_representation = Google::Apis::CloudschedulerV1beta1::Job::Representation
|
429
|
+
command.response_class = Google::Apis::CloudschedulerV1beta1::Job
|
430
|
+
command.params['name'] = name unless name.nil?
|
431
|
+
command.query['fields'] = fields unless fields.nil?
|
432
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
433
|
+
execute_or_queue_command(command, &block)
|
434
|
+
end
|
435
|
+
|
436
|
+
protected
|
437
|
+
|
438
|
+
def apply_command_defaults(command)
|
439
|
+
command.query['key'] = key unless key.nil?
|
440
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
441
|
+
end
|
442
|
+
end
|
443
|
+
end
|
444
|
+
end
|
445
|
+
end
|