google-apis-gmailpostmastertools_v2 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.yardopts +13 -0
- data/CHANGELOG.md +7 -0
- data/LICENSE.md +202 -0
- data/OVERVIEW.md +96 -0
- data/lib/google/apis/gmailpostmastertools_v2/classes.rb +769 -0
- data/lib/google/apis/gmailpostmastertools_v2/gem_version.rb +28 -0
- data/lib/google/apis/gmailpostmastertools_v2/representations.rb +399 -0
- data/lib/google/apis/gmailpostmastertools_v2/service.rb +240 -0
- data/lib/google/apis/gmailpostmastertools_v2.rb +44 -0
- data/lib/google-apis-gmailpostmastertools_v2.rb +15 -0
- metadata +79 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Copyright 2020 Google LLC
|
|
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
|
+
module Google
|
|
16
|
+
module Apis
|
|
17
|
+
module GmailpostmastertoolsV2
|
|
18
|
+
# Version of the google-apis-gmailpostmastertools_v2 gem
|
|
19
|
+
GEM_VERSION = "0.1.0"
|
|
20
|
+
|
|
21
|
+
# Version of the code generator used to generate this client
|
|
22
|
+
GENERATOR_VERSION = "0.18.0"
|
|
23
|
+
|
|
24
|
+
# Revision of the discovery document this client was generated from
|
|
25
|
+
REVISION = "20260209"
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
@@ -0,0 +1,399 @@
|
|
|
1
|
+
# Copyright 2020 Google LLC
|
|
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 GmailpostmastertoolsV2
|
|
24
|
+
|
|
25
|
+
class BaseMetric
|
|
26
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
27
|
+
|
|
28
|
+
include Google::Apis::Core::JsonObjectSupport
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
class BatchQueryDomainStatsRequest
|
|
32
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
33
|
+
|
|
34
|
+
include Google::Apis::Core::JsonObjectSupport
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
class BatchQueryDomainStatsResponse
|
|
38
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
39
|
+
|
|
40
|
+
include Google::Apis::Core::JsonObjectSupport
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
class BatchQueryDomainStatsResult
|
|
44
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
45
|
+
|
|
46
|
+
include Google::Apis::Core::JsonObjectSupport
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
class ComplianceRowData
|
|
50
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
51
|
+
|
|
52
|
+
include Google::Apis::Core::JsonObjectSupport
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
class ComplianceStatus
|
|
56
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
57
|
+
|
|
58
|
+
include Google::Apis::Core::JsonObjectSupport
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
class Date
|
|
62
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
63
|
+
|
|
64
|
+
include Google::Apis::Core::JsonObjectSupport
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
class DateList
|
|
68
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
69
|
+
|
|
70
|
+
include Google::Apis::Core::JsonObjectSupport
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
class DateRange
|
|
74
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
75
|
+
|
|
76
|
+
include Google::Apis::Core::JsonObjectSupport
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
class DateRanges
|
|
80
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
81
|
+
|
|
82
|
+
include Google::Apis::Core::JsonObjectSupport
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
class Domain
|
|
86
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
87
|
+
|
|
88
|
+
include Google::Apis::Core::JsonObjectSupport
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
class DomainComplianceData
|
|
92
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
93
|
+
|
|
94
|
+
include Google::Apis::Core::JsonObjectSupport
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
class DomainComplianceStatus
|
|
98
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
99
|
+
|
|
100
|
+
include Google::Apis::Core::JsonObjectSupport
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
class DomainStat
|
|
104
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
105
|
+
|
|
106
|
+
include Google::Apis::Core::JsonObjectSupport
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
class HonorUnsubscribeVerdict
|
|
110
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
111
|
+
|
|
112
|
+
include Google::Apis::Core::JsonObjectSupport
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
class ListDomainsResponse
|
|
116
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
117
|
+
|
|
118
|
+
include Google::Apis::Core::JsonObjectSupport
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
class MetricDefinition
|
|
122
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
123
|
+
|
|
124
|
+
include Google::Apis::Core::JsonObjectSupport
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
class OneClickUnsubscribeVerdict
|
|
128
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
129
|
+
|
|
130
|
+
include Google::Apis::Core::JsonObjectSupport
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
class QueryDomainStatsRequest
|
|
134
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
135
|
+
|
|
136
|
+
include Google::Apis::Core::JsonObjectSupport
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
class QueryDomainStatsResponse
|
|
140
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
141
|
+
|
|
142
|
+
include Google::Apis::Core::JsonObjectSupport
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
class StatisticValue
|
|
146
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
147
|
+
|
|
148
|
+
include Google::Apis::Core::JsonObjectSupport
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
class Status
|
|
152
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
153
|
+
|
|
154
|
+
include Google::Apis::Core::JsonObjectSupport
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
class StringList
|
|
158
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
159
|
+
|
|
160
|
+
include Google::Apis::Core::JsonObjectSupport
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
class TimeQuery
|
|
164
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
165
|
+
|
|
166
|
+
include Google::Apis::Core::JsonObjectSupport
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
class BaseMetric
|
|
170
|
+
# @private
|
|
171
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
|
172
|
+
property :standard_metric, as: 'standardMetric'
|
|
173
|
+
end
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
class BatchQueryDomainStatsRequest
|
|
177
|
+
# @private
|
|
178
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
|
179
|
+
collection :requests, as: 'requests', class: Google::Apis::GmailpostmastertoolsV2::QueryDomainStatsRequest, decorator: Google::Apis::GmailpostmastertoolsV2::QueryDomainStatsRequest::Representation
|
|
180
|
+
|
|
181
|
+
end
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
class BatchQueryDomainStatsResponse
|
|
185
|
+
# @private
|
|
186
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
|
187
|
+
collection :results, as: 'results', class: Google::Apis::GmailpostmastertoolsV2::BatchQueryDomainStatsResult, decorator: Google::Apis::GmailpostmastertoolsV2::BatchQueryDomainStatsResult::Representation
|
|
188
|
+
|
|
189
|
+
end
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
class BatchQueryDomainStatsResult
|
|
193
|
+
# @private
|
|
194
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
|
195
|
+
property :error, as: 'error', class: Google::Apis::GmailpostmastertoolsV2::Status, decorator: Google::Apis::GmailpostmastertoolsV2::Status::Representation
|
|
196
|
+
|
|
197
|
+
property :response, as: 'response', class: Google::Apis::GmailpostmastertoolsV2::QueryDomainStatsResponse, decorator: Google::Apis::GmailpostmastertoolsV2::QueryDomainStatsResponse::Representation
|
|
198
|
+
|
|
199
|
+
end
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
class ComplianceRowData
|
|
203
|
+
# @private
|
|
204
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
|
205
|
+
property :requirement, as: 'requirement'
|
|
206
|
+
property :status, as: 'status', class: Google::Apis::GmailpostmastertoolsV2::ComplianceStatus, decorator: Google::Apis::GmailpostmastertoolsV2::ComplianceStatus::Representation
|
|
207
|
+
|
|
208
|
+
end
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
class ComplianceStatus
|
|
212
|
+
# @private
|
|
213
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
|
214
|
+
property :status, as: 'status'
|
|
215
|
+
end
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
class Date
|
|
219
|
+
# @private
|
|
220
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
|
221
|
+
property :day, as: 'day'
|
|
222
|
+
property :month, as: 'month'
|
|
223
|
+
property :year, as: 'year'
|
|
224
|
+
end
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
class DateList
|
|
228
|
+
# @private
|
|
229
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
|
230
|
+
collection :dates, as: 'dates', class: Google::Apis::GmailpostmastertoolsV2::Date, decorator: Google::Apis::GmailpostmastertoolsV2::Date::Representation
|
|
231
|
+
|
|
232
|
+
end
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
class DateRange
|
|
236
|
+
# @private
|
|
237
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
|
238
|
+
property :end, as: 'end', class: Google::Apis::GmailpostmastertoolsV2::Date, decorator: Google::Apis::GmailpostmastertoolsV2::Date::Representation
|
|
239
|
+
|
|
240
|
+
property :start, as: 'start', class: Google::Apis::GmailpostmastertoolsV2::Date, decorator: Google::Apis::GmailpostmastertoolsV2::Date::Representation
|
|
241
|
+
|
|
242
|
+
end
|
|
243
|
+
end
|
|
244
|
+
|
|
245
|
+
class DateRanges
|
|
246
|
+
# @private
|
|
247
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
|
248
|
+
collection :date_ranges, as: 'dateRanges', class: Google::Apis::GmailpostmastertoolsV2::DateRange, decorator: Google::Apis::GmailpostmastertoolsV2::DateRange::Representation
|
|
249
|
+
|
|
250
|
+
end
|
|
251
|
+
end
|
|
252
|
+
|
|
253
|
+
class Domain
|
|
254
|
+
# @private
|
|
255
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
|
256
|
+
property :create_time, as: 'createTime'
|
|
257
|
+
property :last_verify_time, as: 'lastVerifyTime'
|
|
258
|
+
property :name, as: 'name'
|
|
259
|
+
property :permission, as: 'permission'
|
|
260
|
+
property :verification_state, as: 'verificationState'
|
|
261
|
+
end
|
|
262
|
+
end
|
|
263
|
+
|
|
264
|
+
class DomainComplianceData
|
|
265
|
+
# @private
|
|
266
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
|
267
|
+
property :domain_id, as: 'domainId'
|
|
268
|
+
property :honor_unsubscribe_verdict, as: 'honorUnsubscribeVerdict', class: Google::Apis::GmailpostmastertoolsV2::HonorUnsubscribeVerdict, decorator: Google::Apis::GmailpostmastertoolsV2::HonorUnsubscribeVerdict::Representation
|
|
269
|
+
|
|
270
|
+
property :one_click_unsubscribe_verdict, as: 'oneClickUnsubscribeVerdict', class: Google::Apis::GmailpostmastertoolsV2::OneClickUnsubscribeVerdict, decorator: Google::Apis::GmailpostmastertoolsV2::OneClickUnsubscribeVerdict::Representation
|
|
271
|
+
|
|
272
|
+
collection :row_data, as: 'rowData', class: Google::Apis::GmailpostmastertoolsV2::ComplianceRowData, decorator: Google::Apis::GmailpostmastertoolsV2::ComplianceRowData::Representation
|
|
273
|
+
|
|
274
|
+
end
|
|
275
|
+
end
|
|
276
|
+
|
|
277
|
+
class DomainComplianceStatus
|
|
278
|
+
# @private
|
|
279
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
|
280
|
+
property :compliance_data, as: 'complianceData', class: Google::Apis::GmailpostmastertoolsV2::DomainComplianceData, decorator: Google::Apis::GmailpostmastertoolsV2::DomainComplianceData::Representation
|
|
281
|
+
|
|
282
|
+
property :name, as: 'name'
|
|
283
|
+
property :subdomain_compliance_data, as: 'subdomainComplianceData', class: Google::Apis::GmailpostmastertoolsV2::DomainComplianceData, decorator: Google::Apis::GmailpostmastertoolsV2::DomainComplianceData::Representation
|
|
284
|
+
|
|
285
|
+
end
|
|
286
|
+
end
|
|
287
|
+
|
|
288
|
+
class DomainStat
|
|
289
|
+
# @private
|
|
290
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
|
291
|
+
property :date, as: 'date', class: Google::Apis::GmailpostmastertoolsV2::Date, decorator: Google::Apis::GmailpostmastertoolsV2::Date::Representation
|
|
292
|
+
|
|
293
|
+
property :metric, as: 'metric'
|
|
294
|
+
property :name, as: 'name'
|
|
295
|
+
property :value, as: 'value', class: Google::Apis::GmailpostmastertoolsV2::StatisticValue, decorator: Google::Apis::GmailpostmastertoolsV2::StatisticValue::Representation
|
|
296
|
+
|
|
297
|
+
end
|
|
298
|
+
end
|
|
299
|
+
|
|
300
|
+
class HonorUnsubscribeVerdict
|
|
301
|
+
# @private
|
|
302
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
|
303
|
+
property :reason, as: 'reason'
|
|
304
|
+
property :status, as: 'status', class: Google::Apis::GmailpostmastertoolsV2::ComplianceStatus, decorator: Google::Apis::GmailpostmastertoolsV2::ComplianceStatus::Representation
|
|
305
|
+
|
|
306
|
+
end
|
|
307
|
+
end
|
|
308
|
+
|
|
309
|
+
class ListDomainsResponse
|
|
310
|
+
# @private
|
|
311
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
|
312
|
+
collection :domains, as: 'domains', class: Google::Apis::GmailpostmastertoolsV2::Domain, decorator: Google::Apis::GmailpostmastertoolsV2::Domain::Representation
|
|
313
|
+
|
|
314
|
+
property :next_page_token, as: 'nextPageToken'
|
|
315
|
+
end
|
|
316
|
+
end
|
|
317
|
+
|
|
318
|
+
class MetricDefinition
|
|
319
|
+
# @private
|
|
320
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
|
321
|
+
property :base_metric, as: 'baseMetric', class: Google::Apis::GmailpostmastertoolsV2::BaseMetric, decorator: Google::Apis::GmailpostmastertoolsV2::BaseMetric::Representation
|
|
322
|
+
|
|
323
|
+
property :filter, as: 'filter'
|
|
324
|
+
property :name, as: 'name'
|
|
325
|
+
end
|
|
326
|
+
end
|
|
327
|
+
|
|
328
|
+
class OneClickUnsubscribeVerdict
|
|
329
|
+
# @private
|
|
330
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
|
331
|
+
property :reason, as: 'reason'
|
|
332
|
+
property :status, as: 'status', class: Google::Apis::GmailpostmastertoolsV2::ComplianceStatus, decorator: Google::Apis::GmailpostmastertoolsV2::ComplianceStatus::Representation
|
|
333
|
+
|
|
334
|
+
end
|
|
335
|
+
end
|
|
336
|
+
|
|
337
|
+
class QueryDomainStatsRequest
|
|
338
|
+
# @private
|
|
339
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
|
340
|
+
property :aggregation_granularity, as: 'aggregationGranularity'
|
|
341
|
+
collection :metric_definitions, as: 'metricDefinitions', class: Google::Apis::GmailpostmastertoolsV2::MetricDefinition, decorator: Google::Apis::GmailpostmastertoolsV2::MetricDefinition::Representation
|
|
342
|
+
|
|
343
|
+
property :page_size, as: 'pageSize'
|
|
344
|
+
property :page_token, as: 'pageToken'
|
|
345
|
+
property :parent, as: 'parent'
|
|
346
|
+
property :time_query, as: 'timeQuery', class: Google::Apis::GmailpostmastertoolsV2::TimeQuery, decorator: Google::Apis::GmailpostmastertoolsV2::TimeQuery::Representation
|
|
347
|
+
|
|
348
|
+
end
|
|
349
|
+
end
|
|
350
|
+
|
|
351
|
+
class QueryDomainStatsResponse
|
|
352
|
+
# @private
|
|
353
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
|
354
|
+
collection :domain_stats, as: 'domainStats', class: Google::Apis::GmailpostmastertoolsV2::DomainStat, decorator: Google::Apis::GmailpostmastertoolsV2::DomainStat::Representation
|
|
355
|
+
|
|
356
|
+
property :next_page_token, as: 'nextPageToken'
|
|
357
|
+
end
|
|
358
|
+
end
|
|
359
|
+
|
|
360
|
+
class StatisticValue
|
|
361
|
+
# @private
|
|
362
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
|
363
|
+
property :double_value, as: 'doubleValue'
|
|
364
|
+
property :float_value, as: 'floatValue'
|
|
365
|
+
property :int_value, :numeric_string => true, as: 'intValue'
|
|
366
|
+
property :string_list, as: 'stringList', class: Google::Apis::GmailpostmastertoolsV2::StringList, decorator: Google::Apis::GmailpostmastertoolsV2::StringList::Representation
|
|
367
|
+
|
|
368
|
+
property :string_value, as: 'stringValue'
|
|
369
|
+
end
|
|
370
|
+
end
|
|
371
|
+
|
|
372
|
+
class Status
|
|
373
|
+
# @private
|
|
374
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
|
375
|
+
property :code, as: 'code'
|
|
376
|
+
collection :details, as: 'details'
|
|
377
|
+
property :message, as: 'message'
|
|
378
|
+
end
|
|
379
|
+
end
|
|
380
|
+
|
|
381
|
+
class StringList
|
|
382
|
+
# @private
|
|
383
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
|
384
|
+
collection :values, as: 'values'
|
|
385
|
+
end
|
|
386
|
+
end
|
|
387
|
+
|
|
388
|
+
class TimeQuery
|
|
389
|
+
# @private
|
|
390
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
|
391
|
+
property :date_list, as: 'dateList', class: Google::Apis::GmailpostmastertoolsV2::DateList, decorator: Google::Apis::GmailpostmastertoolsV2::DateList::Representation
|
|
392
|
+
|
|
393
|
+
property :date_ranges, as: 'dateRanges', class: Google::Apis::GmailpostmastertoolsV2::DateRanges, decorator: Google::Apis::GmailpostmastertoolsV2::DateRanges::Representation
|
|
394
|
+
|
|
395
|
+
end
|
|
396
|
+
end
|
|
397
|
+
end
|
|
398
|
+
end
|
|
399
|
+
end
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
# Copyright 2020 Google LLC
|
|
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 GmailpostmastertoolsV2
|
|
23
|
+
# Gmail Postmaster Tools API
|
|
24
|
+
#
|
|
25
|
+
# The Postmaster Tools API is a RESTful API that provides programmatic access to
|
|
26
|
+
# email traffic metrics (like spam reports, delivery errors etc) otherwise
|
|
27
|
+
# available through the Gmail Postmaster Tools UI currently.
|
|
28
|
+
#
|
|
29
|
+
# @example
|
|
30
|
+
# require 'google/apis/gmailpostmastertools_v2'
|
|
31
|
+
#
|
|
32
|
+
# Gmailpostmastertools = Google::Apis::GmailpostmastertoolsV2 # Alias the module
|
|
33
|
+
# service = Gmailpostmastertools::PostmasterToolsService.new
|
|
34
|
+
#
|
|
35
|
+
# @see https://developers.google.com/workspace/gmail/postmaster
|
|
36
|
+
class PostmasterToolsService < Google::Apis::Core::BaseService
|
|
37
|
+
DEFAULT_ENDPOINT_TEMPLATE = "https://gmailpostmastertools.$UNIVERSE_DOMAIN$/"
|
|
38
|
+
|
|
39
|
+
# @return [String]
|
|
40
|
+
# API key. Your API key identifies your project and provides you with API access,
|
|
41
|
+
# quota, and reports. Required unless you provide an OAuth 2.0 token.
|
|
42
|
+
attr_accessor :key
|
|
43
|
+
|
|
44
|
+
# @return [String]
|
|
45
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
46
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
47
|
+
attr_accessor :quota_user
|
|
48
|
+
|
|
49
|
+
def initialize
|
|
50
|
+
super(DEFAULT_ENDPOINT_TEMPLATE, '',
|
|
51
|
+
client_name: 'google-apis-gmailpostmastertools_v2',
|
|
52
|
+
client_version: Google::Apis::GmailpostmastertoolsV2::GEM_VERSION)
|
|
53
|
+
@batch_path = 'batch'
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Executes a batch of QueryDomainStats requests for multiple domains. Returns
|
|
57
|
+
# PERMISSION_DENIED if you don't have permission to access DomainStats for any
|
|
58
|
+
# of the requested domains.
|
|
59
|
+
# @param [Google::Apis::GmailpostmastertoolsV2::BatchQueryDomainStatsRequest] batch_query_domain_stats_request_object
|
|
60
|
+
# @param [String] fields
|
|
61
|
+
# Selector specifying which fields to include in a partial response.
|
|
62
|
+
# @param [String] quota_user
|
|
63
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
64
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
65
|
+
# @param [Google::Apis::RequestOptions] options
|
|
66
|
+
# Request-specific options
|
|
67
|
+
#
|
|
68
|
+
# @yield [result, err] Result & error if block supplied
|
|
69
|
+
# @yieldparam result [Google::Apis::GmailpostmastertoolsV2::BatchQueryDomainStatsResponse] parsed result object
|
|
70
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
71
|
+
#
|
|
72
|
+
# @return [Google::Apis::GmailpostmastertoolsV2::BatchQueryDomainStatsResponse]
|
|
73
|
+
#
|
|
74
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
75
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
76
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
77
|
+
def batch_query_domain_stats(batch_query_domain_stats_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
78
|
+
command = make_simple_command(:post, 'v2/domainStats:batchQuery', options)
|
|
79
|
+
command.request_representation = Google::Apis::GmailpostmastertoolsV2::BatchQueryDomainStatsRequest::Representation
|
|
80
|
+
command.request_object = batch_query_domain_stats_request_object
|
|
81
|
+
command.response_representation = Google::Apis::GmailpostmastertoolsV2::BatchQueryDomainStatsResponse::Representation
|
|
82
|
+
command.response_class = Google::Apis::GmailpostmastertoolsV2::BatchQueryDomainStatsResponse
|
|
83
|
+
command.query['fields'] = fields unless fields.nil?
|
|
84
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
85
|
+
execute_or_queue_command(command, &block)
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Retrieves detailed information about a domain registered by you. Returns
|
|
89
|
+
# NOT_FOUND if the domain is not registered by you. Domain represents the
|
|
90
|
+
# metadata of a domain that has been registered within the system and linked to
|
|
91
|
+
# a user.
|
|
92
|
+
# @param [String] name
|
|
93
|
+
# Required. The resource name of the domain. Format: `domains/`domain_name``,
|
|
94
|
+
# where domain_name is the fully qualified domain name (i.e., mymail.mydomain.
|
|
95
|
+
# com).
|
|
96
|
+
# @param [String] fields
|
|
97
|
+
# Selector specifying which fields to include in a partial response.
|
|
98
|
+
# @param [String] quota_user
|
|
99
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
100
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
101
|
+
# @param [Google::Apis::RequestOptions] options
|
|
102
|
+
# Request-specific options
|
|
103
|
+
#
|
|
104
|
+
# @yield [result, err] Result & error if block supplied
|
|
105
|
+
# @yieldparam result [Google::Apis::GmailpostmastertoolsV2::Domain] parsed result object
|
|
106
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
107
|
+
#
|
|
108
|
+
# @return [Google::Apis::GmailpostmastertoolsV2::Domain]
|
|
109
|
+
#
|
|
110
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
111
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
112
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
113
|
+
def get_domain(name, fields: nil, quota_user: nil, options: nil, &block)
|
|
114
|
+
command = make_simple_command(:get, 'v2/{+name}', options)
|
|
115
|
+
command.response_representation = Google::Apis::GmailpostmastertoolsV2::Domain::Representation
|
|
116
|
+
command.response_class = Google::Apis::GmailpostmastertoolsV2::Domain
|
|
117
|
+
command.params['name'] = name unless name.nil?
|
|
118
|
+
command.query['fields'] = fields unless fields.nil?
|
|
119
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
120
|
+
execute_or_queue_command(command, &block)
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
# Retrieves the compliance status for a given domain. Returns PERMISSION_DENIED
|
|
124
|
+
# if you don't have permission to access compliance status for the domain.
|
|
125
|
+
# @param [String] name
|
|
126
|
+
# Required. The resource name of the domain's compliance status to retrieve.
|
|
127
|
+
# Format: `domains/`domain_id`/complianceStatus`.
|
|
128
|
+
# @param [String] fields
|
|
129
|
+
# Selector specifying which fields to include in a partial response.
|
|
130
|
+
# @param [String] quota_user
|
|
131
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
132
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
133
|
+
# @param [Google::Apis::RequestOptions] options
|
|
134
|
+
# Request-specific options
|
|
135
|
+
#
|
|
136
|
+
# @yield [result, err] Result & error if block supplied
|
|
137
|
+
# @yieldparam result [Google::Apis::GmailpostmastertoolsV2::DomainComplianceStatus] parsed result object
|
|
138
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
139
|
+
#
|
|
140
|
+
# @return [Google::Apis::GmailpostmastertoolsV2::DomainComplianceStatus]
|
|
141
|
+
#
|
|
142
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
143
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
144
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
145
|
+
def get_domain_compliance_status(name, fields: nil, quota_user: nil, options: nil, &block)
|
|
146
|
+
command = make_simple_command(:get, 'v2/{+name}', options)
|
|
147
|
+
command.response_representation = Google::Apis::GmailpostmastertoolsV2::DomainComplianceStatus::Representation
|
|
148
|
+
command.response_class = Google::Apis::GmailpostmastertoolsV2::DomainComplianceStatus
|
|
149
|
+
command.params['name'] = name unless name.nil?
|
|
150
|
+
command.query['fields'] = fields unless fields.nil?
|
|
151
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
152
|
+
execute_or_queue_command(command, &block)
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
# Retrieves a list of all domains registered by you, along with their
|
|
156
|
+
# corresponding metadata. The order of domains in the response is unspecified
|
|
157
|
+
# and non-deterministic. Newly registered domains will not necessarily be added
|
|
158
|
+
# to the end of this list.
|
|
159
|
+
# @param [Fixnum] page_size
|
|
160
|
+
# Optional. Requested page size. Server may return fewer domains than requested.
|
|
161
|
+
# If unspecified, the default value for this field is 10. The maximum value for
|
|
162
|
+
# this field is 200.
|
|
163
|
+
# @param [String] page_token
|
|
164
|
+
# Optional. The next_page_token value returned from a previous List request, if
|
|
165
|
+
# any.
|
|
166
|
+
# @param [String] fields
|
|
167
|
+
# Selector specifying which fields to include in a partial response.
|
|
168
|
+
# @param [String] quota_user
|
|
169
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
170
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
171
|
+
# @param [Google::Apis::RequestOptions] options
|
|
172
|
+
# Request-specific options
|
|
173
|
+
#
|
|
174
|
+
# @yield [result, err] Result & error if block supplied
|
|
175
|
+
# @yieldparam result [Google::Apis::GmailpostmastertoolsV2::ListDomainsResponse] parsed result object
|
|
176
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
177
|
+
#
|
|
178
|
+
# @return [Google::Apis::GmailpostmastertoolsV2::ListDomainsResponse]
|
|
179
|
+
#
|
|
180
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
181
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
182
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
183
|
+
def list_domains(page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
184
|
+
command = make_simple_command(:get, 'v2/domains', options)
|
|
185
|
+
command.response_representation = Google::Apis::GmailpostmastertoolsV2::ListDomainsResponse::Representation
|
|
186
|
+
command.response_class = Google::Apis::GmailpostmastertoolsV2::ListDomainsResponse
|
|
187
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
|
188
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
|
189
|
+
command.query['fields'] = fields unless fields.nil?
|
|
190
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
191
|
+
execute_or_queue_command(command, &block)
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
# Retrieves a list of domain statistics for a given domain and time period.
|
|
195
|
+
# Returns statistics only for dates where data is available. Returns
|
|
196
|
+
# PERMISSION_DENIED if you don't have permission to access DomainStats for the
|
|
197
|
+
# domain.
|
|
198
|
+
# @param [String] parent
|
|
199
|
+
# Required. The parent resource name where the stats are queried. Format:
|
|
200
|
+
# domains/`domain`
|
|
201
|
+
# @param [Google::Apis::GmailpostmastertoolsV2::QueryDomainStatsRequest] query_domain_stats_request_object
|
|
202
|
+
# @param [String] fields
|
|
203
|
+
# Selector specifying which fields to include in a partial response.
|
|
204
|
+
# @param [String] quota_user
|
|
205
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
206
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
207
|
+
# @param [Google::Apis::RequestOptions] options
|
|
208
|
+
# Request-specific options
|
|
209
|
+
#
|
|
210
|
+
# @yield [result, err] Result & error if block supplied
|
|
211
|
+
# @yieldparam result [Google::Apis::GmailpostmastertoolsV2::QueryDomainStatsResponse] parsed result object
|
|
212
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
213
|
+
#
|
|
214
|
+
# @return [Google::Apis::GmailpostmastertoolsV2::QueryDomainStatsResponse]
|
|
215
|
+
#
|
|
216
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
217
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
218
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
219
|
+
def query_domain_stats(parent, query_domain_stats_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
220
|
+
command = make_simple_command(:post, 'v2/{+parent}/domainStats:query', options)
|
|
221
|
+
command.request_representation = Google::Apis::GmailpostmastertoolsV2::QueryDomainStatsRequest::Representation
|
|
222
|
+
command.request_object = query_domain_stats_request_object
|
|
223
|
+
command.response_representation = Google::Apis::GmailpostmastertoolsV2::QueryDomainStatsResponse::Representation
|
|
224
|
+
command.response_class = Google::Apis::GmailpostmastertoolsV2::QueryDomainStatsResponse
|
|
225
|
+
command.params['parent'] = parent unless parent.nil?
|
|
226
|
+
command.query['fields'] = fields unless fields.nil?
|
|
227
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
228
|
+
execute_or_queue_command(command, &block)
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
protected
|
|
232
|
+
|
|
233
|
+
def apply_command_defaults(command)
|
|
234
|
+
command.query['key'] = key unless key.nil?
|
|
235
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
236
|
+
end
|
|
237
|
+
end
|
|
238
|
+
end
|
|
239
|
+
end
|
|
240
|
+
end
|