google-api-client 0.10.2 → 0.10.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +25 -0
- data/MIGRATING.md +22 -7
- data/README.md +4 -8
- data/api_names.yaml +1210 -37815
- data/generated/google/apis/acceleratedmobilepageurl_v1.rb +32 -0
- data/generated/google/apis/acceleratedmobilepageurl_v1/classes.rb +144 -0
- data/generated/google/apis/acceleratedmobilepageurl_v1/representations.rb +86 -0
- data/generated/google/apis/acceleratedmobilepageurl_v1/service.rb +90 -0
- data/generated/google/apis/adexchangebuyer2_v2beta1.rb +1 -1
- data/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb +764 -764
- data/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb +180 -180
- data/generated/google/apis/adexchangebuyer2_v2beta1/service.rb +421 -421
- data/generated/google/apis/adexchangebuyer_v1_4/classes.rb +1 -0
- data/generated/google/apis/admin_directory_v1/classes.rb +1 -0
- data/generated/google/apis/admin_reports_v1.rb +1 -1
- data/generated/google/apis/adsense_v1_4.rb +1 -1
- data/generated/google/apis/adsensehost_v4_1.rb +1 -1
- data/generated/google/apis/analyticsreporting_v4/classes.rb +187 -187
- data/generated/google/apis/analyticsreporting_v4/representations.rb +42 -42
- data/generated/google/apis/appengine_v1.rb +40 -0
- data/generated/google/apis/appengine_v1/classes.rb +2251 -0
- data/generated/google/apis/appengine_v1/representations.rb +858 -0
- data/generated/google/apis/appengine_v1/service.rb +894 -0
- data/generated/google/apis/bigquery_v2.rb +1 -1
- data/generated/google/apis/bigquery_v2/classes.rb +11 -6
- data/generated/google/apis/books_v1.rb +1 -1
- data/generated/google/apis/books_v1/classes.rb +26 -0
- data/generated/google/apis/books_v1/representations.rb +15 -0
- data/generated/google/apis/books_v1/service.rb +4 -1
- data/generated/google/apis/calendar_v3.rb +1 -1
- data/generated/google/apis/classroom_v1.rb +1 -1
- data/generated/google/apis/cloudbuild_v1.rb +1 -1
- data/generated/google/apis/cloudbuild_v1/classes.rb +638 -637
- data/generated/google/apis/cloudbuild_v1/representations.rb +110 -110
- data/generated/google/apis/cloudbuild_v1/service.rb +139 -139
- data/generated/google/apis/clouddebugger_v2.rb +3 -3
- data/generated/google/apis/clouddebugger_v2/classes.rb +131 -131
- data/generated/google/apis/clouddebugger_v2/representations.rb +25 -25
- data/generated/google/apis/clouderrorreporting_v1beta1.rb +36 -0
- data/generated/google/apis/clouderrorreporting_v1beta1/classes.rb +590 -0
- data/generated/google/apis/clouderrorreporting_v1beta1/representations.rb +252 -0
- data/generated/google/apis/clouderrorreporting_v1beta1/service.rb +350 -0
- data/generated/google/apis/cloudfunctions_v1.rb +35 -0
- data/generated/google/apis/cloudfunctions_v1/classes.rb +98 -0
- data/generated/google/apis/cloudfunctions_v1/representations.rb +57 -0
- data/generated/google/apis/cloudfunctions_v1/service.rb +89 -0
- data/generated/google/apis/cloudkms_v1/classes.rb +277 -270
- data/generated/google/apis/cloudkms_v1/representations.rb +73 -73
- data/generated/google/apis/cloudkms_v1/service.rb +194 -194
- data/generated/google/apis/cloudresourcemanager_v1.rb +1 -1
- data/generated/google/apis/cloudresourcemanager_v1/classes.rb +1147 -1144
- data/generated/google/apis/cloudresourcemanager_v1/representations.rb +188 -188
- data/generated/google/apis/cloudresourcemanager_v1/service.rb +513 -936
- data/generated/google/apis/cloudresourcemanager_v1beta1.rb +1 -1
- data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +307 -916
- data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +63 -285
- data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +333 -681
- data/generated/google/apis/cloudtrace_v1/classes.rb +38 -38
- data/generated/google/apis/cloudtrace_v1/representations.rb +13 -13
- data/generated/google/apis/cloudtrace_v1/service.rb +16 -16
- data/generated/google/apis/compute_beta.rb +1 -1
- data/generated/google/apis/compute_beta/classes.rb +32 -7
- data/generated/google/apis/compute_beta/representations.rb +2 -0
- data/generated/google/apis/compute_beta/service.rb +11 -11
- data/generated/google/apis/compute_v1.rb +1 -1
- data/generated/google/apis/compute_v1/classes.rb +95 -2
- data/generated/google/apis/compute_v1/representations.rb +33 -0
- data/generated/google/apis/dataflow_v1b3/classes.rb +3333 -3333
- data/generated/google/apis/dataflow_v1b3/representations.rb +759 -759
- data/generated/google/apis/dataflow_v1b3/service.rb +154 -154
- data/generated/google/apis/dataproc_v1.rb +1 -1
- data/generated/google/apis/dataproc_v1/classes.rb +1097 -1097
- data/generated/google/apis/dataproc_v1/representations.rb +200 -200
- data/generated/google/apis/dataproc_v1/service.rb +356 -356
- data/generated/google/apis/datastore_v1.rb +4 -4
- data/generated/google/apis/datastore_v1/classes.rb +701 -690
- data/generated/google/apis/datastore_v1/representations.rb +160 -160
- data/generated/google/apis/datastore_v1/service.rb +52 -52
- data/generated/google/apis/deploymentmanager_v2/classes.rb +4 -0
- data/generated/google/apis/doubleclicksearch_v2.rb +1 -1
- data/generated/google/apis/drive_v2.rb +1 -1
- data/generated/google/apis/drive_v2/classes.rb +158 -35
- data/generated/google/apis/drive_v2/representations.rb +39 -0
- data/generated/google/apis/drive_v2/service.rb +4 -4
- data/generated/google/apis/drive_v3.rb +1 -1
- data/generated/google/apis/drive_v3/classes.rb +162 -33
- data/generated/google/apis/drive_v3/representations.rb +39 -0
- data/generated/google/apis/drive_v3/service.rb +4 -4
- data/generated/google/apis/firebasedynamiclinks_v1.rb +35 -0
- data/generated/google/apis/firebasedynamiclinks_v1/classes.rb +466 -0
- data/generated/google/apis/firebasedynamiclinks_v1/representations.rb +222 -0
- data/generated/google/apis/firebasedynamiclinks_v1/service.rb +95 -0
- data/generated/google/apis/firebaserules_v1.rb +41 -0
- data/generated/google/apis/firebaserules_v1/classes.rb +425 -0
- data/generated/google/apis/firebaserules_v1/representations.rb +222 -0
- data/generated/google/apis/firebaserules_v1/service.rb +495 -0
- data/generated/google/apis/games_v1/classes.rb +4 -0
- data/generated/google/apis/genomics_v1.rb +7 -7
- data/generated/google/apis/genomics_v1/classes.rb +2336 -2335
- data/generated/google/apis/genomics_v1/representations.rb +387 -387
- data/generated/google/apis/genomics_v1/service.rb +1187 -1187
- data/generated/google/apis/gmail_v1/classes.rb +3 -0
- data/generated/google/apis/iam_v1.rb +1 -1
- data/generated/google/apis/iam_v1/classes.rb +123 -117
- data/generated/google/apis/iam_v1/representations.rb +33 -33
- data/generated/google/apis/iam_v1/service.rb +109 -109
- data/generated/google/apis/identitytoolkit_v3/classes.rb +5 -0
- data/generated/google/apis/kgsearch_v1/classes.rb +6 -6
- data/generated/google/apis/kgsearch_v1/representations.rb +1 -1
- data/generated/google/apis/kgsearch_v1/service.rb +4 -4
- data/generated/google/apis/language_v1.rb +36 -0
- data/generated/google/apis/language_v1/classes.rb +757 -0
- data/generated/google/apis/language_v1/representations.rb +338 -0
- data/generated/google/apis/language_v1/service.rb +185 -0
- data/generated/google/apis/language_v1beta1/classes.rb +407 -407
- data/generated/google/apis/language_v1beta1/representations.rb +103 -103
- data/generated/google/apis/language_v1beta1/service.rb +45 -45
- data/generated/google/apis/logging_v2.rb +46 -0
- data/generated/google/apis/logging_v2/classes.rb +1271 -0
- data/generated/google/apis/logging_v2/representations.rb +421 -0
- data/generated/google/apis/logging_v2/service.rb +1569 -0
- data/generated/google/apis/logging_v2beta1.rb +1 -1
- data/generated/google/apis/logging_v2beta1/classes.rb +886 -886
- data/generated/google/apis/logging_v2beta1/representations.rb +132 -132
- data/generated/google/apis/logging_v2beta1/service.rb +235 -235
- data/generated/google/apis/manufacturers_v1/classes.rb +147 -147
- data/generated/google/apis/manufacturers_v1/representations.rb +29 -29
- data/generated/google/apis/ml_v1.rb +34 -0
- data/generated/google/apis/ml_v1/classes.rb +1617 -0
- data/generated/google/apis/ml_v1/representations.rb +498 -0
- data/generated/google/apis/ml_v1/service.rb +769 -0
- data/generated/google/apis/monitoring_v3.rb +4 -4
- data/generated/google/apis/monitoring_v3/classes.rb +630 -630
- data/generated/google/apis/monitoring_v3/representations.rb +134 -134
- data/generated/google/apis/monitoring_v3/service.rb +240 -240
- data/generated/google/apis/pagespeedonline_v2/classes.rb +1 -0
- data/generated/google/apis/partners_v2.rb +1 -1
- data/generated/google/apis/partners_v2/classes.rb +639 -639
- data/generated/google/apis/partners_v2/representations.rb +168 -168
- data/generated/google/apis/partners_v2/service.rb +381 -381
- data/generated/google/apis/people_v1.rb +10 -10
- data/generated/google/apis/people_v1/classes.rb +524 -524
- data/generated/google/apis/people_v1/representations.rb +143 -143
- data/generated/google/apis/people_v1/service.rb +30 -30
- data/generated/google/apis/plus_domains_v1.rb +1 -1
- data/generated/google/apis/plus_v1.rb +1 -1
- data/generated/google/apis/proximitybeacon_v1beta1/classes.rb +454 -444
- data/generated/google/apis/proximitybeacon_v1beta1/representations.rb +90 -90
- data/generated/google/apis/proximitybeacon_v1beta1/service.rb +110 -110
- data/generated/google/apis/pubsub_v1/classes.rb +175 -173
- data/generated/google/apis/pubsub_v1/representations.rb +53 -53
- data/generated/google/apis/pubsub_v1/service.rb +210 -210
- data/generated/google/apis/replicapool_v1beta2/classes.rb +2 -0
- data/generated/google/apis/runtimeconfig_v1.rb +38 -0
- data/generated/google/apis/runtimeconfig_v1/classes.rb +252 -0
- data/generated/google/apis/runtimeconfig_v1/representations.rb +98 -0
- data/generated/google/apis/runtimeconfig_v1/service.rb +176 -0
- data/generated/google/apis/script_v1.rb +1 -1
- data/generated/google/apis/script_v1/classes.rb +6 -6
- data/generated/google/apis/script_v1/representations.rb +1 -1
- data/generated/google/apis/searchconsole_v1.rb +31 -0
- data/generated/google/apis/searchconsole_v1/classes.rb +205 -0
- data/generated/google/apis/searchconsole_v1/representations.rb +129 -0
- data/generated/google/apis/searchconsole_v1/service.rb +88 -0
- data/generated/google/apis/servicecontrol_v1.rb +38 -0
- data/generated/google/apis/servicecontrol_v1/classes.rb +1675 -0
- data/generated/google/apis/servicecontrol_v1/representations.rb +601 -0
- data/generated/google/apis/servicecontrol_v1/service.rb +337 -0
- data/generated/google/apis/servicemanagement_v1.rb +45 -0
- data/generated/google/apis/servicemanagement_v1/classes.rb +4934 -0
- data/generated/google/apis/servicemanagement_v1/representations.rb +1526 -0
- data/generated/google/apis/servicemanagement_v1/service.rb +860 -0
- data/generated/google/apis/serviceuser_v1.rb +42 -0
- data/generated/google/apis/serviceuser_v1/classes.rb +3746 -0
- data/generated/google/apis/serviceuser_v1/representations.rb +1041 -0
- data/generated/google/apis/serviceuser_v1/service.rb +214 -0
- data/generated/google/apis/sheets_v4.rb +3 -3
- data/generated/google/apis/sheets_v4/classes.rb +4390 -4390
- data/generated/google/apis/sheets_v4/representations.rb +381 -381
- data/generated/google/apis/sheets_v4/service.rb +48 -48
- data/generated/google/apis/slides_v1.rb +3 -3
- data/generated/google/apis/slides_v1/classes.rb +2860 -2860
- data/generated/google/apis/slides_v1/representations.rb +693 -693
- data/generated/google/apis/slides_v1/service.rb +30 -30
- data/generated/google/apis/sourcerepo_v1.rb +34 -0
- data/generated/google/apis/sourcerepo_v1/classes.rb +687 -0
- data/generated/google/apis/sourcerepo_v1/representations.rb +285 -0
- data/generated/google/apis/sourcerepo_v1/service.rb +291 -0
- data/generated/google/apis/spanner_v1.rb +35 -0
- data/generated/google/apis/spanner_v1/classes.rb +3294 -0
- data/generated/google/apis/spanner_v1/representations.rb +984 -0
- data/generated/google/apis/spanner_v1/service.rb +1504 -0
- data/generated/google/apis/speech_v1beta1.rb +1 -1
- data/generated/google/apis/speech_v1beta1/classes.rb +197 -196
- data/generated/google/apis/speech_v1beta1/representations.rb +53 -53
- data/generated/google/apis/speech_v1beta1/service.rb +27 -27
- data/generated/google/apis/storage_v1.rb +1 -1
- data/generated/google/apis/storage_v1/classes.rb +131 -0
- data/generated/google/apis/storage_v1/representations.rb +51 -0
- data/generated/google/apis/storage_v1/service.rb +182 -0
- data/generated/google/apis/storagetransfer_v1.rb +1 -1
- data/generated/google/apis/storagetransfer_v1/classes.rb +732 -661
- data/generated/google/apis/storagetransfer_v1/representations.rb +132 -132
- data/generated/google/apis/storagetransfer_v1/service.rb +174 -197
- data/generated/google/apis/surveys_v2.rb +40 -0
- data/generated/google/apis/surveys_v2/classes.rb +806 -0
- data/generated/google/apis/surveys_v2/representations.rb +347 -0
- data/generated/google/apis/surveys_v2/service.rb +477 -0
- data/generated/google/apis/tagmanager_v2.rb +52 -0
- data/generated/google/apis/tagmanager_v2/classes.rb +2435 -0
- data/generated/google/apis/tagmanager_v2/representations.rb +993 -0
- data/generated/google/apis/tagmanager_v2/service.rb +2865 -0
- data/generated/google/apis/toolresults_v1beta3.rb +34 -0
- data/generated/google/apis/toolresults_v1beta3/classes.rb +2160 -0
- data/generated/google/apis/toolresults_v1beta3/representations.rb +729 -0
- data/generated/google/apis/toolresults_v1beta3/service.rb +1236 -0
- data/generated/google/apis/tracing_v1.rb +40 -0
- data/generated/google/apis/tracing_v1/classes.rb +664 -0
- data/generated/google/apis/tracing_v1/representations.rb +279 -0
- data/generated/google/apis/tracing_v1/service.rb +225 -0
- data/generated/google/apis/vision_v1.rb +1 -1
- data/generated/google/apis/vision_v1/classes.rb +1223 -1222
- data/generated/google/apis/vision_v1/representations.rb +234 -234
- data/generated/google/apis/vision_v1/service.rb +10 -10
- data/generated/google/apis/webfonts_v1.rb +33 -0
- data/generated/google/apis/webfonts_v1/classes.rb +113 -0
- data/generated/google/apis/webfonts_v1/representations.rb +62 -0
- data/generated/google/apis/webfonts_v1/service.rb +102 -0
- data/generated/google/apis/youtube_analytics_v1.rb +1 -1
- data/generated/google/apis/youtube_partner_v1.rb +1 -1
- data/generated/google/apis/youtube_partner_v1/classes.rb +31 -0
- data/generated/google/apis/youtube_partner_v1/representations.rb +6 -0
- data/generated/google/apis/youtube_partner_v1/service.rb +41 -0
- data/generated/google/apis/youtube_v3/classes.rb +1 -0
- data/generated/google/apis/youtubereporting_v1.rb +4 -4
- data/generated/google/apis/youtubereporting_v1/classes.rb +76 -76
- data/generated/google/apis/youtubereporting_v1/representations.rb +25 -25
- data/generated/google/apis/youtubereporting_v1/service.rb +95 -95
- data/lib/google/apis/generator/annotator.rb +5 -4
- data/lib/google/apis/generator/templates/_class.tmpl +3 -0
- data/lib/google/apis/version.rb +1 -1
- data/samples/cli/lib/samples/adsense.rb +99 -0
- data/samples/cli/lib/samples/analytics.rb +18 -0
- data/samples/cli/lib/samples/gmail.rb +33 -0
- data/samples/cli/lib/samples/vision.rb +69 -0
- metadata +89 -4
- data/sync.rb +0 -71
@@ -0,0 +1,222 @@
|
|
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 FirebaserulesV1
|
24
|
+
|
25
|
+
class FunctionCall
|
26
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
27
|
+
|
28
|
+
include Google::Apis::Core::JsonObjectSupport
|
29
|
+
end
|
30
|
+
|
31
|
+
class File
|
32
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
33
|
+
|
34
|
+
include Google::Apis::Core::JsonObjectSupport
|
35
|
+
end
|
36
|
+
|
37
|
+
class ListReleasesResponse
|
38
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
39
|
+
|
40
|
+
include Google::Apis::Core::JsonObjectSupport
|
41
|
+
end
|
42
|
+
|
43
|
+
class Release
|
44
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
45
|
+
|
46
|
+
include Google::Apis::Core::JsonObjectSupport
|
47
|
+
end
|
48
|
+
|
49
|
+
class TestRulesetResponse
|
50
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
51
|
+
|
52
|
+
include Google::Apis::Core::JsonObjectSupport
|
53
|
+
end
|
54
|
+
|
55
|
+
class TestResult
|
56
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
57
|
+
|
58
|
+
include Google::Apis::Core::JsonObjectSupport
|
59
|
+
end
|
60
|
+
|
61
|
+
class ListRulesetsResponse
|
62
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
63
|
+
|
64
|
+
include Google::Apis::Core::JsonObjectSupport
|
65
|
+
end
|
66
|
+
|
67
|
+
class Empty
|
68
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
69
|
+
|
70
|
+
include Google::Apis::Core::JsonObjectSupport
|
71
|
+
end
|
72
|
+
|
73
|
+
class Source
|
74
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
75
|
+
|
76
|
+
include Google::Apis::Core::JsonObjectSupport
|
77
|
+
end
|
78
|
+
|
79
|
+
class SourcePosition
|
80
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
81
|
+
|
82
|
+
include Google::Apis::Core::JsonObjectSupport
|
83
|
+
end
|
84
|
+
|
85
|
+
class Issue
|
86
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
87
|
+
|
88
|
+
include Google::Apis::Core::JsonObjectSupport
|
89
|
+
end
|
90
|
+
|
91
|
+
class TestRulesetRequest
|
92
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
93
|
+
|
94
|
+
include Google::Apis::Core::JsonObjectSupport
|
95
|
+
end
|
96
|
+
|
97
|
+
class Ruleset
|
98
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
99
|
+
|
100
|
+
include Google::Apis::Core::JsonObjectSupport
|
101
|
+
end
|
102
|
+
|
103
|
+
class FunctionCall
|
104
|
+
# @private
|
105
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
106
|
+
property :function, as: 'function'
|
107
|
+
collection :args, as: 'args'
|
108
|
+
end
|
109
|
+
end
|
110
|
+
|
111
|
+
class File
|
112
|
+
# @private
|
113
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
114
|
+
property :fingerprint, :base64 => true, as: 'fingerprint'
|
115
|
+
property :name, as: 'name'
|
116
|
+
property :content, as: 'content'
|
117
|
+
end
|
118
|
+
end
|
119
|
+
|
120
|
+
class ListReleasesResponse
|
121
|
+
# @private
|
122
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
123
|
+
collection :releases, as: 'releases', class: Google::Apis::FirebaserulesV1::Release, decorator: Google::Apis::FirebaserulesV1::Release::Representation
|
124
|
+
|
125
|
+
property :next_page_token, as: 'nextPageToken'
|
126
|
+
end
|
127
|
+
end
|
128
|
+
|
129
|
+
class Release
|
130
|
+
# @private
|
131
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
132
|
+
property :update_time, as: 'updateTime'
|
133
|
+
property :name, as: 'name'
|
134
|
+
property :ruleset_name, as: 'rulesetName'
|
135
|
+
property :create_time, as: 'createTime'
|
136
|
+
end
|
137
|
+
end
|
138
|
+
|
139
|
+
class TestRulesetResponse
|
140
|
+
# @private
|
141
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
142
|
+
collection :issues, as: 'issues', class: Google::Apis::FirebaserulesV1::Issue, decorator: Google::Apis::FirebaserulesV1::Issue::Representation
|
143
|
+
|
144
|
+
collection :test_results, as: 'testResults', class: Google::Apis::FirebaserulesV1::TestResult, decorator: Google::Apis::FirebaserulesV1::TestResult::Representation
|
145
|
+
|
146
|
+
end
|
147
|
+
end
|
148
|
+
|
149
|
+
class TestResult
|
150
|
+
# @private
|
151
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
152
|
+
collection :function_calls, as: 'functionCalls', class: Google::Apis::FirebaserulesV1::FunctionCall, decorator: Google::Apis::FirebaserulesV1::FunctionCall::Representation
|
153
|
+
|
154
|
+
property :state, as: 'state'
|
155
|
+
collection :debug_messages, as: 'debugMessages'
|
156
|
+
property :error_position, as: 'errorPosition', class: Google::Apis::FirebaserulesV1::SourcePosition, decorator: Google::Apis::FirebaserulesV1::SourcePosition::Representation
|
157
|
+
|
158
|
+
end
|
159
|
+
end
|
160
|
+
|
161
|
+
class ListRulesetsResponse
|
162
|
+
# @private
|
163
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
164
|
+
collection :rulesets, as: 'rulesets', class: Google::Apis::FirebaserulesV1::Ruleset, decorator: Google::Apis::FirebaserulesV1::Ruleset::Representation
|
165
|
+
|
166
|
+
property :next_page_token, as: 'nextPageToken'
|
167
|
+
end
|
168
|
+
end
|
169
|
+
|
170
|
+
class Empty
|
171
|
+
# @private
|
172
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
173
|
+
end
|
174
|
+
end
|
175
|
+
|
176
|
+
class Source
|
177
|
+
# @private
|
178
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
179
|
+
collection :files, as: 'files', class: Google::Apis::FirebaserulesV1::File, decorator: Google::Apis::FirebaserulesV1::File::Representation
|
180
|
+
|
181
|
+
end
|
182
|
+
end
|
183
|
+
|
184
|
+
class SourcePosition
|
185
|
+
# @private
|
186
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
187
|
+
property :column, as: 'column'
|
188
|
+
property :file_name, as: 'fileName'
|
189
|
+
property :line, as: 'line'
|
190
|
+
end
|
191
|
+
end
|
192
|
+
|
193
|
+
class Issue
|
194
|
+
# @private
|
195
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
196
|
+
property :source_position, as: 'sourcePosition', class: Google::Apis::FirebaserulesV1::SourcePosition, decorator: Google::Apis::FirebaserulesV1::SourcePosition::Representation
|
197
|
+
|
198
|
+
property :severity, as: 'severity'
|
199
|
+
property :description, as: 'description'
|
200
|
+
end
|
201
|
+
end
|
202
|
+
|
203
|
+
class TestRulesetRequest
|
204
|
+
# @private
|
205
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
206
|
+
property :source, as: 'source', class: Google::Apis::FirebaserulesV1::Source, decorator: Google::Apis::FirebaserulesV1::Source::Representation
|
207
|
+
|
208
|
+
end
|
209
|
+
end
|
210
|
+
|
211
|
+
class Ruleset
|
212
|
+
# @private
|
213
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
214
|
+
property :name, as: 'name'
|
215
|
+
property :source, as: 'source', class: Google::Apis::FirebaserulesV1::Source, decorator: Google::Apis::FirebaserulesV1::Source::Representation
|
216
|
+
|
217
|
+
property :create_time, as: 'createTime'
|
218
|
+
end
|
219
|
+
end
|
220
|
+
end
|
221
|
+
end
|
222
|
+
end
|
@@ -0,0 +1,495 @@
|
|
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 FirebaserulesV1
|
23
|
+
# Firebase Rules API
|
24
|
+
#
|
25
|
+
# Creates and manages rules that determine when a Firebase Rules-enabled service
|
26
|
+
# should permit a request.
|
27
|
+
#
|
28
|
+
# @example
|
29
|
+
# require 'google/apis/firebaserules_v1'
|
30
|
+
#
|
31
|
+
# Firebaserules = Google::Apis::FirebaserulesV1 # Alias the module
|
32
|
+
# service = Firebaserules::FirebaseRulesService.new
|
33
|
+
#
|
34
|
+
# @see https://firebase.google.com/docs/storage/security
|
35
|
+
class FirebaseRulesService < Google::Apis::Core::BaseService
|
36
|
+
# @return [String]
|
37
|
+
# API key. Your API key identifies your project and provides you with API access,
|
38
|
+
# quota, and reports. Required unless you provide an OAuth 2.0 token.
|
39
|
+
attr_accessor :key
|
40
|
+
|
41
|
+
# @return [String]
|
42
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
43
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
44
|
+
attr_accessor :quota_user
|
45
|
+
|
46
|
+
def initialize
|
47
|
+
super('https://firebaserules.googleapis.com/', '')
|
48
|
+
end
|
49
|
+
|
50
|
+
# Test `Source` for syntactic and semantic correctness. Issues present, if
|
51
|
+
# any, will be returned to the caller with a description, severity, and
|
52
|
+
# source location.
|
53
|
+
# The test method may be executed with `Source` or a `Ruleset` name.
|
54
|
+
# Passing `Source` is useful for unit testing new rules. Passing a `Ruleset`
|
55
|
+
# name is useful for regression testing an existing rule.
|
56
|
+
# The following is an example of `Source` that permits users to upload images
|
57
|
+
# to a bucket bearing their user id and matching the correct metadata:
|
58
|
+
# _*Example*_
|
59
|
+
# // Users are allowed to subscribe and unsubscribe to the blog.
|
60
|
+
# service firebase.storage `
|
61
|
+
# match /users/`userId`/images/`imageName` `
|
62
|
+
# allow write: if userId == request.auth.uid
|
63
|
+
# && (imageName.matches('*.png$')
|
64
|
+
# || imageName.matches('*.jpg$'))
|
65
|
+
# && resource.mimeType.matches('^image/')
|
66
|
+
# `
|
67
|
+
# `
|
68
|
+
# @param [String] name
|
69
|
+
# Tests may either provide `source` or a `Ruleset` resource name.
|
70
|
+
# For tests against `source`, the resource name must refer to the project:
|
71
|
+
# Format: `projects/`project_id``
|
72
|
+
# For tests against a `Ruleset`, this must be the `Ruleset` resource name:
|
73
|
+
# Format: `projects/`project_id`/rulesets/`ruleset_id``
|
74
|
+
# @param [Google::Apis::FirebaserulesV1::TestRulesetRequest] test_ruleset_request_object
|
75
|
+
# @param [String] fields
|
76
|
+
# Selector specifying which fields to include in a partial response.
|
77
|
+
# @param [String] quota_user
|
78
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
79
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
80
|
+
# @param [Google::Apis::RequestOptions] options
|
81
|
+
# Request-specific options
|
82
|
+
#
|
83
|
+
# @yield [result, err] Result & error if block supplied
|
84
|
+
# @yieldparam result [Google::Apis::FirebaserulesV1::TestRulesetResponse] parsed result object
|
85
|
+
# @yieldparam err [StandardError] error object if request failed
|
86
|
+
#
|
87
|
+
# @return [Google::Apis::FirebaserulesV1::TestRulesetResponse]
|
88
|
+
#
|
89
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
90
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
91
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
92
|
+
def test_project_ruleset(name, test_ruleset_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
93
|
+
command = make_simple_command(:post, 'v1/{+name}:test', options)
|
94
|
+
command.request_representation = Google::Apis::FirebaserulesV1::TestRulesetRequest::Representation
|
95
|
+
command.request_object = test_ruleset_request_object
|
96
|
+
command.response_representation = Google::Apis::FirebaserulesV1::TestRulesetResponse::Representation
|
97
|
+
command.response_class = Google::Apis::FirebaserulesV1::TestRulesetResponse
|
98
|
+
command.params['name'] = name unless name.nil?
|
99
|
+
command.query['fields'] = fields unless fields.nil?
|
100
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
101
|
+
execute_or_queue_command(command, &block)
|
102
|
+
end
|
103
|
+
|
104
|
+
# Delete a `Ruleset` by resource name.
|
105
|
+
# If the `Ruleset` is referenced by a `Release` the operation will fail.
|
106
|
+
# @param [String] name
|
107
|
+
# Resource name for the ruleset to delete.
|
108
|
+
# Format: `projects/`project_id`/rulesets/`ruleset_id``
|
109
|
+
# @param [String] fields
|
110
|
+
# Selector specifying which fields to include in a partial response.
|
111
|
+
# @param [String] quota_user
|
112
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
113
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
114
|
+
# @param [Google::Apis::RequestOptions] options
|
115
|
+
# Request-specific options
|
116
|
+
#
|
117
|
+
# @yield [result, err] Result & error if block supplied
|
118
|
+
# @yieldparam result [Google::Apis::FirebaserulesV1::Empty] parsed result object
|
119
|
+
# @yieldparam err [StandardError] error object if request failed
|
120
|
+
#
|
121
|
+
# @return [Google::Apis::FirebaserulesV1::Empty]
|
122
|
+
#
|
123
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
124
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
125
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
126
|
+
def delete_project_ruleset(name, fields: nil, quota_user: nil, options: nil, &block)
|
127
|
+
command = make_simple_command(:delete, 'v1/{+name}', options)
|
128
|
+
command.response_representation = Google::Apis::FirebaserulesV1::Empty::Representation
|
129
|
+
command.response_class = Google::Apis::FirebaserulesV1::Empty
|
130
|
+
command.params['name'] = name unless name.nil?
|
131
|
+
command.query['fields'] = fields unless fields.nil?
|
132
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
133
|
+
execute_or_queue_command(command, &block)
|
134
|
+
end
|
135
|
+
|
136
|
+
# Get a `Ruleset` by name including the full `Source` contents.
|
137
|
+
# @param [String] name
|
138
|
+
# Resource name for the ruleset to get.
|
139
|
+
# Format: `projects/`project_id`/rulesets/`ruleset_id``
|
140
|
+
# @param [String] fields
|
141
|
+
# Selector specifying which fields to include in a partial response.
|
142
|
+
# @param [String] quota_user
|
143
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
144
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
145
|
+
# @param [Google::Apis::RequestOptions] options
|
146
|
+
# Request-specific options
|
147
|
+
#
|
148
|
+
# @yield [result, err] Result & error if block supplied
|
149
|
+
# @yieldparam result [Google::Apis::FirebaserulesV1::Ruleset] parsed result object
|
150
|
+
# @yieldparam err [StandardError] error object if request failed
|
151
|
+
#
|
152
|
+
# @return [Google::Apis::FirebaserulesV1::Ruleset]
|
153
|
+
#
|
154
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
155
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
156
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
157
|
+
def get_project_ruleset(name, fields: nil, quota_user: nil, options: nil, &block)
|
158
|
+
command = make_simple_command(:get, 'v1/{+name}', options)
|
159
|
+
command.response_representation = Google::Apis::FirebaserulesV1::Ruleset::Representation
|
160
|
+
command.response_class = Google::Apis::FirebaserulesV1::Ruleset
|
161
|
+
command.params['name'] = name unless name.nil?
|
162
|
+
command.query['fields'] = fields unless fields.nil?
|
163
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
164
|
+
execute_or_queue_command(command, &block)
|
165
|
+
end
|
166
|
+
|
167
|
+
# List `Ruleset` metadata only and optionally filter the results by `Ruleset`
|
168
|
+
# name.
|
169
|
+
# The full `Source` contents of a `Ruleset` may be retrieved with
|
170
|
+
# GetRuleset.
|
171
|
+
# @param [String] name
|
172
|
+
# Resource name for the project.
|
173
|
+
# Format: `projects/`project_id``
|
174
|
+
# @param [String] page_token
|
175
|
+
# Next page token for loading the next batch of `Ruleset` instances.
|
176
|
+
# @param [Fixnum] page_size
|
177
|
+
# Page size to load. Maximum of 100. Defaults to 10.
|
178
|
+
# Note: `page_size` is just a hint and the service may choose to load less
|
179
|
+
# than `page_size` due to the size of the output. To traverse all of the
|
180
|
+
# releases, caller should iterate until the `page_token` is empty.
|
181
|
+
# @param [String] filter
|
182
|
+
# `Ruleset` filter. The list method supports filters with restrictions on
|
183
|
+
# `Ruleset.name`.
|
184
|
+
# Filters on `Ruleset.create_time` should use the `date` function which
|
185
|
+
# parses strings that conform to the RFC 3339 date/time specifications.
|
186
|
+
# Example: `create_time > date("2017-01-01") AND name=UUID-*`
|
187
|
+
# @param [String] fields
|
188
|
+
# Selector specifying which fields to include in a partial response.
|
189
|
+
# @param [String] quota_user
|
190
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
191
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
192
|
+
# @param [Google::Apis::RequestOptions] options
|
193
|
+
# Request-specific options
|
194
|
+
#
|
195
|
+
# @yield [result, err] Result & error if block supplied
|
196
|
+
# @yieldparam result [Google::Apis::FirebaserulesV1::ListRulesetsResponse] parsed result object
|
197
|
+
# @yieldparam err [StandardError] error object if request failed
|
198
|
+
#
|
199
|
+
# @return [Google::Apis::FirebaserulesV1::ListRulesetsResponse]
|
200
|
+
#
|
201
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
202
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
203
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
204
|
+
def list_project_rulesets(name, page_token: nil, page_size: nil, filter: nil, fields: nil, quota_user: nil, options: nil, &block)
|
205
|
+
command = make_simple_command(:get, 'v1/{+name}/rulesets', options)
|
206
|
+
command.response_representation = Google::Apis::FirebaserulesV1::ListRulesetsResponse::Representation
|
207
|
+
command.response_class = Google::Apis::FirebaserulesV1::ListRulesetsResponse
|
208
|
+
command.params['name'] = name unless name.nil?
|
209
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
210
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
211
|
+
command.query['filter'] = filter unless filter.nil?
|
212
|
+
command.query['fields'] = fields unless fields.nil?
|
213
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
214
|
+
execute_or_queue_command(command, &block)
|
215
|
+
end
|
216
|
+
|
217
|
+
# Create a `Ruleset` from `Source`.
|
218
|
+
# The `Ruleset` is given a unique generated name which is returned to the
|
219
|
+
# caller. `Source` containing syntactic or semantics errors will result in an
|
220
|
+
# error response indicating the first error encountered. For a detailed view
|
221
|
+
# of `Source` issues, use TestRuleset.
|
222
|
+
# @param [String] name
|
223
|
+
# Resource name for Project which owns this `Ruleset`.
|
224
|
+
# Format: `projects/`project_id``
|
225
|
+
# @param [Google::Apis::FirebaserulesV1::Ruleset] ruleset_object
|
226
|
+
# @param [String] fields
|
227
|
+
# Selector specifying which fields to include in a partial response.
|
228
|
+
# @param [String] quota_user
|
229
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
230
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
231
|
+
# @param [Google::Apis::RequestOptions] options
|
232
|
+
# Request-specific options
|
233
|
+
#
|
234
|
+
# @yield [result, err] Result & error if block supplied
|
235
|
+
# @yieldparam result [Google::Apis::FirebaserulesV1::Ruleset] parsed result object
|
236
|
+
# @yieldparam err [StandardError] error object if request failed
|
237
|
+
#
|
238
|
+
# @return [Google::Apis::FirebaserulesV1::Ruleset]
|
239
|
+
#
|
240
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
241
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
242
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
243
|
+
def create_project_ruleset(name, ruleset_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
244
|
+
command = make_simple_command(:post, 'v1/{+name}/rulesets', options)
|
245
|
+
command.request_representation = Google::Apis::FirebaserulesV1::Ruleset::Representation
|
246
|
+
command.request_object = ruleset_object
|
247
|
+
command.response_representation = Google::Apis::FirebaserulesV1::Ruleset::Representation
|
248
|
+
command.response_class = Google::Apis::FirebaserulesV1::Ruleset
|
249
|
+
command.params['name'] = name unless name.nil?
|
250
|
+
command.query['fields'] = fields unless fields.nil?
|
251
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
252
|
+
execute_or_queue_command(command, &block)
|
253
|
+
end
|
254
|
+
|
255
|
+
# Update a `Release`.
|
256
|
+
# Only updates to the `ruleset_name` and `test_suite_name` fields will be
|
257
|
+
# honored. `Release` rename is not supported. To create a `Release` use the
|
258
|
+
# CreateRelease method.
|
259
|
+
# @param [String] name
|
260
|
+
# Resource name for the `Release`.
|
261
|
+
# `Release` names may be structured `app1/prod/v2` or flat `app1_prod_v2`
|
262
|
+
# which affords developers a great deal of flexibility in mapping the name
|
263
|
+
# to the style that best fits their existing development practices. For
|
264
|
+
# example, a name could refer to an environment, an app, a version, or some
|
265
|
+
# combination of three.
|
266
|
+
# In the table below, for the project name `projects/foo`, the following
|
267
|
+
# relative release paths show how flat and structured names might be chosen
|
268
|
+
# to match a desired development / deployment strategy.
|
269
|
+
# Use Case | Flat Name | Structured Name
|
270
|
+
# -------------|---------------------|----------------
|
271
|
+
# Environments | releases/qa | releases/qa
|
272
|
+
# Apps | releases/app1_qa | releases/app1/qa
|
273
|
+
# Versions | releases/app1_v2_qa | releases/app1/v2/qa
|
274
|
+
# The delimiter between the release name path elements can be almost anything
|
275
|
+
# and it should work equally well with the release name list filter, but in
|
276
|
+
# many ways the structured paths provide a clearer picture of the
|
277
|
+
# relationship between `Release` instances.
|
278
|
+
# Format: `projects/`project_id`/releases/`release_id``
|
279
|
+
# @param [Google::Apis::FirebaserulesV1::Release] release_object
|
280
|
+
# @param [String] fields
|
281
|
+
# Selector specifying which fields to include in a partial response.
|
282
|
+
# @param [String] quota_user
|
283
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
284
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
285
|
+
# @param [Google::Apis::RequestOptions] options
|
286
|
+
# Request-specific options
|
287
|
+
#
|
288
|
+
# @yield [result, err] Result & error if block supplied
|
289
|
+
# @yieldparam result [Google::Apis::FirebaserulesV1::Release] parsed result object
|
290
|
+
# @yieldparam err [StandardError] error object if request failed
|
291
|
+
#
|
292
|
+
# @return [Google::Apis::FirebaserulesV1::Release]
|
293
|
+
#
|
294
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
295
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
296
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
297
|
+
def update_project_release(name, release_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
298
|
+
command = make_simple_command(:put, 'v1/{+name}', options)
|
299
|
+
command.request_representation = Google::Apis::FirebaserulesV1::Release::Representation
|
300
|
+
command.request_object = release_object
|
301
|
+
command.response_representation = Google::Apis::FirebaserulesV1::Release::Representation
|
302
|
+
command.response_class = Google::Apis::FirebaserulesV1::Release
|
303
|
+
command.params['name'] = name unless name.nil?
|
304
|
+
command.query['fields'] = fields unless fields.nil?
|
305
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
306
|
+
execute_or_queue_command(command, &block)
|
307
|
+
end
|
308
|
+
|
309
|
+
# Create a `Release`.
|
310
|
+
# Release names should reflect the developer's deployment practices. For
|
311
|
+
# example, the release name may include the environment name, application
|
312
|
+
# name, application version, or any other name meaningful to the developer.
|
313
|
+
# Once a `Release` refers to a `Ruleset`, the rules can be enforced by
|
314
|
+
# Firebase Rules-enabled services.
|
315
|
+
# More than one `Release` may be 'live' concurrently. Consider the following
|
316
|
+
# three `Release` names for `projects/foo` and the `Ruleset` to which they
|
317
|
+
# refer.
|
318
|
+
# Release Name | Ruleset Name
|
319
|
+
# --------------------------------|-------------
|
320
|
+
# projects/foo/releases/prod | projects/foo/rulesets/uuid123
|
321
|
+
# projects/foo/releases/prod/beta | projects/foo/rulesets/uuid123
|
322
|
+
# projects/foo/releases/prod/v23 | projects/foo/rulesets/uuid456
|
323
|
+
# The table reflects the `Ruleset` rollout in progress. The `prod` and
|
324
|
+
# `prod/beta` releases refer to the same `Ruleset`. However, `prod/v23`
|
325
|
+
# refers to a new `Ruleset`. The `Ruleset` reference for a `Release` may be
|
326
|
+
# updated using the UpdateRelease method.
|
327
|
+
# @param [String] name
|
328
|
+
# Resource name for the project which owns this `Release`.
|
329
|
+
# Format: `projects/`project_id``
|
330
|
+
# @param [Google::Apis::FirebaserulesV1::Release] release_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::FirebaserulesV1::Release] parsed result object
|
341
|
+
# @yieldparam err [StandardError] error object if request failed
|
342
|
+
#
|
343
|
+
# @return [Google::Apis::FirebaserulesV1::Release]
|
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 create_project_release(name, release_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
349
|
+
command = make_simple_command(:post, 'v1/{+name}/releases', options)
|
350
|
+
command.request_representation = Google::Apis::FirebaserulesV1::Release::Representation
|
351
|
+
command.request_object = release_object
|
352
|
+
command.response_representation = Google::Apis::FirebaserulesV1::Release::Representation
|
353
|
+
command.response_class = Google::Apis::FirebaserulesV1::Release
|
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
|
+
# Delete a `Release` by resource name.
|
361
|
+
# @param [String] name
|
362
|
+
# Resource name for the `Release` to delete.
|
363
|
+
# Format: `projects/`project_id`/releases/`release_id``
|
364
|
+
# @param [String] fields
|
365
|
+
# Selector specifying which fields to include in a partial response.
|
366
|
+
# @param [String] quota_user
|
367
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
368
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
369
|
+
# @param [Google::Apis::RequestOptions] options
|
370
|
+
# Request-specific options
|
371
|
+
#
|
372
|
+
# @yield [result, err] Result & error if block supplied
|
373
|
+
# @yieldparam result [Google::Apis::FirebaserulesV1::Empty] parsed result object
|
374
|
+
# @yieldparam err [StandardError] error object if request failed
|
375
|
+
#
|
376
|
+
# @return [Google::Apis::FirebaserulesV1::Empty]
|
377
|
+
#
|
378
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
379
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
380
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
381
|
+
def delete_project_release(name, fields: nil, quota_user: nil, options: nil, &block)
|
382
|
+
command = make_simple_command(:delete, 'v1/{+name}', options)
|
383
|
+
command.response_representation = Google::Apis::FirebaserulesV1::Empty::Representation
|
384
|
+
command.response_class = Google::Apis::FirebaserulesV1::Empty
|
385
|
+
command.params['name'] = name unless name.nil?
|
386
|
+
command.query['fields'] = fields unless fields.nil?
|
387
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
388
|
+
execute_or_queue_command(command, &block)
|
389
|
+
end
|
390
|
+
|
391
|
+
# Get a `Release` by name.
|
392
|
+
# @param [String] name
|
393
|
+
# Resource name of the `Release`.
|
394
|
+
# Format: `projects/`project_id`/releases/`release_id``
|
395
|
+
# @param [String] fields
|
396
|
+
# Selector specifying which fields to include in a partial response.
|
397
|
+
# @param [String] quota_user
|
398
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
399
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
400
|
+
# @param [Google::Apis::RequestOptions] options
|
401
|
+
# Request-specific options
|
402
|
+
#
|
403
|
+
# @yield [result, err] Result & error if block supplied
|
404
|
+
# @yieldparam result [Google::Apis::FirebaserulesV1::Release] parsed result object
|
405
|
+
# @yieldparam err [StandardError] error object if request failed
|
406
|
+
#
|
407
|
+
# @return [Google::Apis::FirebaserulesV1::Release]
|
408
|
+
#
|
409
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
410
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
411
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
412
|
+
def get_project_release(name, fields: nil, quota_user: nil, options: nil, &block)
|
413
|
+
command = make_simple_command(:get, 'v1/{+name}', options)
|
414
|
+
command.response_representation = Google::Apis::FirebaserulesV1::Release::Representation
|
415
|
+
command.response_class = Google::Apis::FirebaserulesV1::Release
|
416
|
+
command.params['name'] = name unless name.nil?
|
417
|
+
command.query['fields'] = fields unless fields.nil?
|
418
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
419
|
+
execute_or_queue_command(command, &block)
|
420
|
+
end
|
421
|
+
|
422
|
+
# List the `Release` values for a project. This list may optionally be
|
423
|
+
# filtered by `Release` name, `Ruleset` name, `TestSuite` name, or any
|
424
|
+
# combination thereof.
|
425
|
+
# @param [String] name
|
426
|
+
# Resource name for the project.
|
427
|
+
# Format: `projects/`project_id``
|
428
|
+
# @param [String] page_token
|
429
|
+
# Next page token for the next batch of `Release` instances.
|
430
|
+
# @param [Fixnum] page_size
|
431
|
+
# Page size to load. Maximum of 100. Defaults to 10.
|
432
|
+
# Note: `page_size` is just a hint and the service may choose to load fewer
|
433
|
+
# than `page_size` results due to the size of the output. To traverse all of
|
434
|
+
# the releases, the caller should iterate until the `page_token` on the
|
435
|
+
# response is empty.
|
436
|
+
# @param [String] filter
|
437
|
+
# `Release` filter. The list method supports filters with restrictions on the
|
438
|
+
# `Release.name`, `Release.ruleset_name`, and `Release.test_suite_name`.
|
439
|
+
# Example 1: A filter of 'name=prod*' might return `Release`s with names
|
440
|
+
# within 'projects/foo' prefixed with 'prod':
|
441
|
+
# Name | Ruleset Name
|
442
|
+
# ------------------------------|-------------
|
443
|
+
# projects/foo/releases/prod | projects/foo/rulesets/uuid1234
|
444
|
+
# projects/foo/releases/prod/v1 | projects/foo/rulesets/uuid1234
|
445
|
+
# projects/foo/releases/prod/v2 | projects/foo/rulesets/uuid8888
|
446
|
+
# Example 2: A filter of `name=prod* ruleset_name=uuid1234` would return only
|
447
|
+
# `Release` instances for 'projects/foo' with names prefixed with 'prod'
|
448
|
+
# referring to the same `Ruleset` name of 'uuid1234':
|
449
|
+
# Name | Ruleset Name
|
450
|
+
# ------------------------------|-------------
|
451
|
+
# projects/foo/releases/prod | projects/foo/rulesets/1234
|
452
|
+
# projects/foo/releases/prod/v1 | projects/foo/rulesets/1234
|
453
|
+
# In the examples, the filter parameters refer to the search filters are
|
454
|
+
# relative to the project. Fully qualified prefixed may also be used. e.g.
|
455
|
+
# `test_suite_name=projects/foo/testsuites/uuid1`
|
456
|
+
# @param [String] fields
|
457
|
+
# Selector specifying which fields to include in a partial response.
|
458
|
+
# @param [String] quota_user
|
459
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
460
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
461
|
+
# @param [Google::Apis::RequestOptions] options
|
462
|
+
# Request-specific options
|
463
|
+
#
|
464
|
+
# @yield [result, err] Result & error if block supplied
|
465
|
+
# @yieldparam result [Google::Apis::FirebaserulesV1::ListReleasesResponse] parsed result object
|
466
|
+
# @yieldparam err [StandardError] error object if request failed
|
467
|
+
#
|
468
|
+
# @return [Google::Apis::FirebaserulesV1::ListReleasesResponse]
|
469
|
+
#
|
470
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
471
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
472
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
473
|
+
def list_project_releases(name, page_token: nil, page_size: nil, filter: nil, fields: nil, quota_user: nil, options: nil, &block)
|
474
|
+
command = make_simple_command(:get, 'v1/{+name}/releases', options)
|
475
|
+
command.response_representation = Google::Apis::FirebaserulesV1::ListReleasesResponse::Representation
|
476
|
+
command.response_class = Google::Apis::FirebaserulesV1::ListReleasesResponse
|
477
|
+
command.params['name'] = name unless name.nil?
|
478
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
479
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
480
|
+
command.query['filter'] = filter unless filter.nil?
|
481
|
+
command.query['fields'] = fields unless fields.nil?
|
482
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
483
|
+
execute_or_queue_command(command, &block)
|
484
|
+
end
|
485
|
+
|
486
|
+
protected
|
487
|
+
|
488
|
+
def apply_command_defaults(command)
|
489
|
+
command.query['key'] = key unless key.nil?
|
490
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
491
|
+
end
|
492
|
+
end
|
493
|
+
end
|
494
|
+
end
|
495
|
+
end
|