google-apis-adsense_v2 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- 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-adsense_v2.rb +15 -0
- data/lib/google/apis/adsense_v2.rb +40 -0
- data/lib/google/apis/adsense_v2/classes.rb +1021 -0
- data/lib/google/apis/adsense_v2/gem_version.rb +28 -0
- data/lib/google/apis/adsense_v2/representations.rb +503 -0
- data/lib/google/apis/adsense_v2/service.rb +1064 -0
- metadata +76 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 2d54c1a2fe652f4ca8815d5fba2a601ed7712bece7ad263034a573b1210c1f3f
|
4
|
+
data.tar.gz: cf26e5c6de677c9cdcf9248be11bb7ad0e3c547c2181806bc29882221d4d87b3
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 46e723802a67769030d6fd56ea6a05ab2b88db036759076f3bc9f14598abe2113eeccc5f0eecead8090af5c49e784b0b2db296773291fb4158897304a354966f
|
7
|
+
data.tar.gz: 48b65fb9d8bc71c1c27c1cc0d4179156b072dc699b4f1f546867ff542d54debff6a7e3f44e73862d7dee433bedfe768fa3d073c111b235eee29c89e7676d35bf
|
data/.yardopts
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
--hide-void-return
|
2
|
+
--no-private
|
3
|
+
--verbose
|
4
|
+
--title=google-apis-adsense_v2
|
5
|
+
--markup-provider=redcarpet
|
6
|
+
--markup=markdown
|
7
|
+
--main OVERVIEW.md
|
8
|
+
lib/google/apis/adsense_v2/*.rb
|
9
|
+
lib/google/apis/adsense_v2.rb
|
10
|
+
-
|
11
|
+
OVERVIEW.md
|
12
|
+
CHANGELOG.md
|
13
|
+
LICENSE.md
|
data/CHANGELOG.md
ADDED
data/LICENSE.md
ADDED
@@ -0,0 +1,202 @@
|
|
1
|
+
|
2
|
+
Apache License
|
3
|
+
Version 2.0, January 2004
|
4
|
+
http://www.apache.org/licenses/
|
5
|
+
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
7
|
+
|
8
|
+
1. Definitions.
|
9
|
+
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
12
|
+
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
14
|
+
the copyright owner that is granting the License.
|
15
|
+
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
17
|
+
other entities that control, are controlled by, or are under common
|
18
|
+
control with that entity. For the purposes of this definition,
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
20
|
+
direction or management of such entity, whether by contract or
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
23
|
+
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
25
|
+
exercising permissions granted by this License.
|
26
|
+
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
28
|
+
including but not limited to software source code, documentation
|
29
|
+
source, and configuration files.
|
30
|
+
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
32
|
+
transformation or translation of a Source form, including but
|
33
|
+
not limited to compiled object code, generated documentation,
|
34
|
+
and conversions to other media types.
|
35
|
+
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
37
|
+
Object form, made available under the License, as indicated by a
|
38
|
+
copyright notice that is included in or attached to the work
|
39
|
+
(an example is provided in the Appendix below).
|
40
|
+
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
47
|
+
the Work and Derivative Works thereof.
|
48
|
+
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
50
|
+
the original version of the Work and any modifications or additions
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
62
|
+
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
65
|
+
subsequently incorporated within the Work.
|
66
|
+
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
73
|
+
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
79
|
+
where such license applies only to those patent claims licensable
|
80
|
+
by such Contributor that are necessarily infringed by their
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
83
|
+
institute patent litigation against any entity (including a
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
86
|
+
or contributory patent infringement, then any patent licenses
|
87
|
+
granted to You under this License for that Work shall terminate
|
88
|
+
as of the date such litigation is filed.
|
89
|
+
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
92
|
+
modifications, and in Source or Object form, provided that You
|
93
|
+
meet the following conditions:
|
94
|
+
|
95
|
+
(a) You must give any other recipients of the Work or
|
96
|
+
Derivative Works a copy of this License; and
|
97
|
+
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
99
|
+
stating that You changed the files; and
|
100
|
+
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
103
|
+
attribution notices from the Source form of the Work,
|
104
|
+
excluding those notices that do not pertain to any part of
|
105
|
+
the Derivative Works; and
|
106
|
+
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
109
|
+
include a readable copy of the attribution notices contained
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
112
|
+
of the following places: within a NOTICE text file distributed
|
113
|
+
as part of the Derivative Works; within the Source form or
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
115
|
+
within a display generated by the Derivative Works, if and
|
116
|
+
wherever such third-party notices normally appear. The contents
|
117
|
+
of the NOTICE file are for informational purposes only and
|
118
|
+
do not modify the License. You may add Your own attribution
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
121
|
+
that such additional attribution notices cannot be construed
|
122
|
+
as modifying the License.
|
123
|
+
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
125
|
+
may provide additional or different license terms and conditions
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
129
|
+
the conditions stated in this License.
|
130
|
+
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
134
|
+
this License, without any additional terms or conditions.
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
136
|
+
the terms of any separate license agreement you may have executed
|
137
|
+
with Licensor regarding such Contributions.
|
138
|
+
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
141
|
+
except as required for reasonable and customary use in describing the
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
143
|
+
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
153
|
+
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
159
|
+
incidental, or consequential damages of any character arising as a
|
160
|
+
result of this License or out of the use or inability to use the
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
163
|
+
other commercial damages or losses), even if such Contributor
|
164
|
+
has been advised of the possibility of such damages.
|
165
|
+
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
169
|
+
or other liability obligations and/or rights consistent with this
|
170
|
+
License. However, in accepting such obligations, You may act only
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
175
|
+
of your accepting any such warranty or additional liability.
|
176
|
+
|
177
|
+
END OF TERMS AND CONDITIONS
|
178
|
+
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
180
|
+
|
181
|
+
To apply the Apache License to your work, attach the following
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
183
|
+
replaced with your own identifying information. (Don't include
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
185
|
+
comment syntax for the file format. We also recommend that a
|
186
|
+
file or class name and description of purpose be included on the
|
187
|
+
same "printed page" as the copyright notice for easier
|
188
|
+
identification within third-party archives.
|
189
|
+
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
191
|
+
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
193
|
+
you may not use this file except in compliance with the License.
|
194
|
+
You may obtain a copy of the License at
|
195
|
+
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
197
|
+
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
201
|
+
See the License for the specific language governing permissions and
|
202
|
+
limitations under the License.
|
data/OVERVIEW.md
ADDED
@@ -0,0 +1,96 @@
|
|
1
|
+
# Simple REST client for version V2 of the AdSense Management API
|
2
|
+
|
3
|
+
This is a simple client library for version V2 of the AdSense Management API. It provides:
|
4
|
+
|
5
|
+
* A client object that connects to the HTTP/JSON REST endpoint for the service.
|
6
|
+
* Ruby objects for data structures related to the service.
|
7
|
+
* Integration with the googleauth gem for authentication using OAuth, API keys, and service accounts.
|
8
|
+
* Control of retry, pagination, and timeouts.
|
9
|
+
|
10
|
+
Note that although this client library is supported and will continue to be updated to track changes to the service, it is otherwise considered complete and not under active development. Many Google services, especially Google Cloud Platform services, may provide a more modern client that is under more active development and improvement. See the section below titled *Which client should I use?* for more information.
|
11
|
+
|
12
|
+
## Getting started
|
13
|
+
|
14
|
+
### Before you begin
|
15
|
+
|
16
|
+
There are a few setup steps you need to complete before you can use this library:
|
17
|
+
|
18
|
+
1. If you don't already have a Google account, [sign up](https://www.google.com/accounts).
|
19
|
+
2. If you have never created a Google APIs Console project, read about [Managing Projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects) and create a project in the [Google API Console](https://console.cloud.google.com/).
|
20
|
+
3. Most APIs need to be enabled for your project. [Enable it](https://console.cloud.google.com/apis/library/adsense.googleapis.com) in the console.
|
21
|
+
|
22
|
+
### Installation
|
23
|
+
|
24
|
+
Add this line to your application's Gemfile:
|
25
|
+
|
26
|
+
```ruby
|
27
|
+
gem 'google-apis-adsense_v2', '~> 0.1'
|
28
|
+
```
|
29
|
+
|
30
|
+
And then execute:
|
31
|
+
|
32
|
+
```
|
33
|
+
$ bundle
|
34
|
+
```
|
35
|
+
|
36
|
+
Or install it yourself as:
|
37
|
+
|
38
|
+
```
|
39
|
+
$ gem install google-apis-adsense_v2
|
40
|
+
```
|
41
|
+
|
42
|
+
### Creating a client object
|
43
|
+
|
44
|
+
Once the gem is installed, you can load the client code and instantiate a client.
|
45
|
+
|
46
|
+
```ruby
|
47
|
+
# Load the client
|
48
|
+
require "google/apis/adsense_v2"
|
49
|
+
|
50
|
+
# Create a client object
|
51
|
+
client = Google::Apis::AdsenseV2::AdsenseService.new
|
52
|
+
|
53
|
+
# Authenticate calls
|
54
|
+
client.authentication = # ... use the googleauth gem to create credentials
|
55
|
+
```
|
56
|
+
|
57
|
+
See the class reference docs for information on the methods you can call from a client.
|
58
|
+
|
59
|
+
## Documentation
|
60
|
+
|
61
|
+
More detailed descriptions of the Google simple REST clients are available in two documents.
|
62
|
+
|
63
|
+
* The [Usage Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/usage-guide.md) discusses how to make API calls, how to use the provided data structures, and how to work the various features of the client library, including media upload and download, error handling, retries, pagination, and logging.
|
64
|
+
* The [Auth Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/auth-guide.md) discusses authentication in the client libraries, including API keys, OAuth 2.0, service accounts, and environment variables.
|
65
|
+
|
66
|
+
(Note: the above documents are written for the simple REST clients in general, and their examples may not reflect the Adsense service in particular.)
|
67
|
+
|
68
|
+
For reference information on specific calls in the AdSense Management API, see the {Google::Apis::AdsenseV2::AdsenseService class reference docs}.
|
69
|
+
|
70
|
+
## Which client should I use?
|
71
|
+
|
72
|
+
Google provides two types of Ruby API client libraries: **simple REST clients** and **modern clients**.
|
73
|
+
|
74
|
+
This library, `google-apis-adsense_v2`, is a simple REST client. You can identify these clients by their gem names, which are always in the form `google-apis-<servicename>_<serviceversion>`. The simple REST clients connect to HTTP/JSON REST endpoints and are automatically generated from service discovery documents. They support most API functionality, but their class interfaces are sometimes awkward.
|
75
|
+
|
76
|
+
Modern clients are produced by a modern code generator, sometimes combined with hand-crafted functionality. Most modern clients connect to high-performance gRPC endpoints, although a few are backed by REST services. Modern clients are available for many Google services, especially Google Cloud Platform services, but do not yet support all the services covered by the simple clients.
|
77
|
+
|
78
|
+
Gem names for modern clients are often of the form `google-cloud-<service_name>`. (For example, [google-cloud-pubsub](https://rubygems.org/gems/google-cloud-pubsub).) Note that most modern clients also have corresponding "versioned" gems with names like `google-cloud-<service_name>-<version>`. (For example, [google-cloud-pubsub-v1](https://rubygems.org/gems/google-cloud-pubsub-v1).) The "versioned" gems can be used directly, but often provide lower-level interfaces. In most cases, the main gem is recommended.
|
79
|
+
|
80
|
+
**For most users, we recommend the modern client, if one is available.** Compared with simple clients, modern clients are generally much easier to use and more Ruby-like, support more advanced features such as streaming and long-running operations, and often provide much better performance. You may consider using a simple client instead, if a modern client is not yet available for the service you want to use, or if you are not able to use gRPC on your infrastructure.
|
81
|
+
|
82
|
+
The [product documentation](http://code.google.com/apis/adsense/management/) may provide guidance regarding the preferred client library to use.
|
83
|
+
|
84
|
+
## Supported Ruby versions
|
85
|
+
|
86
|
+
This library is supported on Ruby 2.5+.
|
87
|
+
|
88
|
+
Google provides official support for Ruby versions that are actively supported by Ruby Core -- that is, Ruby versions that are either in normal maintenance or in security maintenance, and not end of life. Currently, this means Ruby 2.5 and later. Older versions of Ruby _may_ still work, but are unsupported and not recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby support schedule.
|
89
|
+
|
90
|
+
## License
|
91
|
+
|
92
|
+
This library is licensed under Apache 2.0. Full license text is available in the {file:LICENSE.md LICENSE}.
|
93
|
+
|
94
|
+
## Support
|
95
|
+
|
96
|
+
Please [report bugs at the project on Github](https://github.com/google/google-api-ruby-client/issues). Don't hesitate to [ask questions](http://stackoverflow.com/questions/tagged/google-api-ruby-client) about the client or APIs on [StackOverflow](http://stackoverflow.com).
|
@@ -0,0 +1,15 @@
|
|
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/adsense_v2"
|
@@ -0,0 +1,40 @@
|
|
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/adsense_v2/service.rb'
|
16
|
+
require 'google/apis/adsense_v2/classes.rb'
|
17
|
+
require 'google/apis/adsense_v2/representations.rb'
|
18
|
+
require 'google/apis/adsense_v2/gem_version.rb'
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Apis
|
22
|
+
# AdSense Management API
|
23
|
+
#
|
24
|
+
# The AdSense Management API allows publishers to access their inventory and run
|
25
|
+
# earnings and performance reports.
|
26
|
+
#
|
27
|
+
# @see http://code.google.com/apis/adsense/management/
|
28
|
+
module AdsenseV2
|
29
|
+
# Version of the AdSense Management API this client connects to.
|
30
|
+
# This is NOT the gem version.
|
31
|
+
VERSION = 'V2'
|
32
|
+
|
33
|
+
# View and manage your AdSense data
|
34
|
+
AUTH_ADSENSE = 'https://www.googleapis.com/auth/adsense'
|
35
|
+
|
36
|
+
# View your AdSense data
|
37
|
+
AUTH_ADSENSE_READONLY = 'https://www.googleapis.com/auth/adsense.readonly'
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,1021 @@
|
|
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 AdsenseV2
|
24
|
+
|
25
|
+
# Representation of an account.
|
26
|
+
class Account
|
27
|
+
include Google::Apis::Core::Hashable
|
28
|
+
|
29
|
+
# Output only. Creation time of the account.
|
30
|
+
# Corresponds to the JSON property `createTime`
|
31
|
+
# @return [String]
|
32
|
+
attr_accessor :create_time
|
33
|
+
|
34
|
+
# Output only. Display name of this account.
|
35
|
+
# Corresponds to the JSON property `displayName`
|
36
|
+
# @return [String]
|
37
|
+
attr_accessor :display_name
|
38
|
+
|
39
|
+
# Resource name of the account. Format: accounts/pub-[0-9]+
|
40
|
+
# Corresponds to the JSON property `name`
|
41
|
+
# @return [String]
|
42
|
+
attr_accessor :name
|
43
|
+
|
44
|
+
# Output only. Outstanding tasks that need to be completed as part of the sign-
|
45
|
+
# up process for a new account. e.g. "billing-profile-creation", "phone-pin-
|
46
|
+
# verification".
|
47
|
+
# Corresponds to the JSON property `pendingTasks`
|
48
|
+
# @return [Array<String>]
|
49
|
+
attr_accessor :pending_tasks
|
50
|
+
|
51
|
+
# Output only. Whether this account is premium.
|
52
|
+
# Corresponds to the JSON property `premium`
|
53
|
+
# @return [Boolean]
|
54
|
+
attr_accessor :premium
|
55
|
+
alias_method :premium?, :premium
|
56
|
+
|
57
|
+
# Represents a time zone from the [IANA Time Zone Database](https://www.iana.org/
|
58
|
+
# time-zones).
|
59
|
+
# Corresponds to the JSON property `timeZone`
|
60
|
+
# @return [Google::Apis::AdsenseV2::TimeZone]
|
61
|
+
attr_accessor :time_zone
|
62
|
+
|
63
|
+
def initialize(**args)
|
64
|
+
update!(**args)
|
65
|
+
end
|
66
|
+
|
67
|
+
# Update properties of this object
|
68
|
+
def update!(**args)
|
69
|
+
@create_time = args[:create_time] if args.key?(:create_time)
|
70
|
+
@display_name = args[:display_name] if args.key?(:display_name)
|
71
|
+
@name = args[:name] if args.key?(:name)
|
72
|
+
@pending_tasks = args[:pending_tasks] if args.key?(:pending_tasks)
|
73
|
+
@premium = args[:premium] if args.key?(:premium)
|
74
|
+
@time_zone = args[:time_zone] if args.key?(:time_zone)
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
# Representation of an ad client. An ad client represents a user's subscription
|
79
|
+
# with a specific AdSense product.
|
80
|
+
class AdClient
|
81
|
+
include Google::Apis::Core::Hashable
|
82
|
+
|
83
|
+
# Resource name of the ad client. Format: accounts/`account`/adclient/`adclient`
|
84
|
+
# Corresponds to the JSON property `name`
|
85
|
+
# @return [String]
|
86
|
+
attr_accessor :name
|
87
|
+
|
88
|
+
# Output only. Product code of the ad client. For example, "AFC" for AdSense for
|
89
|
+
# Content.
|
90
|
+
# Corresponds to the JSON property `productCode`
|
91
|
+
# @return [String]
|
92
|
+
attr_accessor :product_code
|
93
|
+
|
94
|
+
# Output only. Unique ID of the ad client as used in the `AD_CLIENT_ID`
|
95
|
+
# reporting dimension. Present only if the ad client supports reporting.
|
96
|
+
# Corresponds to the JSON property `reportingDimensionId`
|
97
|
+
# @return [String]
|
98
|
+
attr_accessor :reporting_dimension_id
|
99
|
+
|
100
|
+
def initialize(**args)
|
101
|
+
update!(**args)
|
102
|
+
end
|
103
|
+
|
104
|
+
# Update properties of this object
|
105
|
+
def update!(**args)
|
106
|
+
@name = args[:name] if args.key?(:name)
|
107
|
+
@product_code = args[:product_code] if args.key?(:product_code)
|
108
|
+
@reporting_dimension_id = args[:reporting_dimension_id] if args.key?(:reporting_dimension_id)
|
109
|
+
end
|
110
|
+
end
|
111
|
+
|
112
|
+
# Representation of the AdSense code for a given ad client. For more information,
|
113
|
+
# see [About the AdSense code](https://support.google.com/adsense/answer/
|
114
|
+
# 9274634).
|
115
|
+
class AdClientAdCode
|
116
|
+
include Google::Apis::Core::Hashable
|
117
|
+
|
118
|
+
# Output only. The AdSense code snippet to add to the head of an HTML page.
|
119
|
+
# Corresponds to the JSON property `adCode`
|
120
|
+
# @return [String]
|
121
|
+
attr_accessor :ad_code
|
122
|
+
|
123
|
+
# Output only. The AdSense code snippet to add to the body of an AMP page.
|
124
|
+
# Corresponds to the JSON property `ampBody`
|
125
|
+
# @return [String]
|
126
|
+
attr_accessor :amp_body
|
127
|
+
|
128
|
+
# Output only. The AdSense code snippet to add to the head of an AMP page.
|
129
|
+
# Corresponds to the JSON property `ampHead`
|
130
|
+
# @return [String]
|
131
|
+
attr_accessor :amp_head
|
132
|
+
|
133
|
+
def initialize(**args)
|
134
|
+
update!(**args)
|
135
|
+
end
|
136
|
+
|
137
|
+
# Update properties of this object
|
138
|
+
def update!(**args)
|
139
|
+
@ad_code = args[:ad_code] if args.key?(:ad_code)
|
140
|
+
@amp_body = args[:amp_body] if args.key?(:amp_body)
|
141
|
+
@amp_head = args[:amp_head] if args.key?(:amp_head)
|
142
|
+
end
|
143
|
+
end
|
144
|
+
|
145
|
+
# Representation of an ad unit. An ad unit represents a saved ad unit with a
|
146
|
+
# specific set of ad settings that have been customized within an account.
|
147
|
+
class AdUnit
|
148
|
+
include Google::Apis::Core::Hashable
|
149
|
+
|
150
|
+
# Settings specific to content ads (AFC).
|
151
|
+
# Corresponds to the JSON property `contentAdsSettings`
|
152
|
+
# @return [Google::Apis::AdsenseV2::ContentAdsSettings]
|
153
|
+
attr_accessor :content_ads_settings
|
154
|
+
|
155
|
+
# Display name of the ad unit, as provided when the ad unit was created.
|
156
|
+
# Corresponds to the JSON property `displayName`
|
157
|
+
# @return [String]
|
158
|
+
attr_accessor :display_name
|
159
|
+
|
160
|
+
# Resource name of the ad unit. Format: accounts/`account`/adclient/`adclient`/
|
161
|
+
# adunits/`adunit`
|
162
|
+
# Corresponds to the JSON property `name`
|
163
|
+
# @return [String]
|
164
|
+
attr_accessor :name
|
165
|
+
|
166
|
+
# Output only. Unique ID of the ad unit as used in the `AD_UNIT_ID` reporting
|
167
|
+
# dimension.
|
168
|
+
# Corresponds to the JSON property `reportingDimensionId`
|
169
|
+
# @return [String]
|
170
|
+
attr_accessor :reporting_dimension_id
|
171
|
+
|
172
|
+
# State of the ad unit.
|
173
|
+
# Corresponds to the JSON property `state`
|
174
|
+
# @return [String]
|
175
|
+
attr_accessor :state
|
176
|
+
|
177
|
+
def initialize(**args)
|
178
|
+
update!(**args)
|
179
|
+
end
|
180
|
+
|
181
|
+
# Update properties of this object
|
182
|
+
def update!(**args)
|
183
|
+
@content_ads_settings = args[:content_ads_settings] if args.key?(:content_ads_settings)
|
184
|
+
@display_name = args[:display_name] if args.key?(:display_name)
|
185
|
+
@name = args[:name] if args.key?(:name)
|
186
|
+
@reporting_dimension_id = args[:reporting_dimension_id] if args.key?(:reporting_dimension_id)
|
187
|
+
@state = args[:state] if args.key?(:state)
|
188
|
+
end
|
189
|
+
end
|
190
|
+
|
191
|
+
# Representation of the AdSense code for a given ad unit.
|
192
|
+
class AdUnitAdCode
|
193
|
+
include Google::Apis::Core::Hashable
|
194
|
+
|
195
|
+
# Output only. The AdSense code snippet to add to the body of an HTML page.
|
196
|
+
# Corresponds to the JSON property `adCode`
|
197
|
+
# @return [String]
|
198
|
+
attr_accessor :ad_code
|
199
|
+
|
200
|
+
def initialize(**args)
|
201
|
+
update!(**args)
|
202
|
+
end
|
203
|
+
|
204
|
+
# Update properties of this object
|
205
|
+
def update!(**args)
|
206
|
+
@ad_code = args[:ad_code] if args.key?(:ad_code)
|
207
|
+
end
|
208
|
+
end
|
209
|
+
|
210
|
+
# Representation of an alert.
|
211
|
+
class Alert
|
212
|
+
include Google::Apis::Core::Hashable
|
213
|
+
|
214
|
+
# Output only. The localized alert message. This may contain HTML markup, such
|
215
|
+
# as phrase elements or links.
|
216
|
+
# Corresponds to the JSON property `message`
|
217
|
+
# @return [String]
|
218
|
+
attr_accessor :message
|
219
|
+
|
220
|
+
# Resource name of the alert. Format: accounts/`account`/alerts/`alert`
|
221
|
+
# Corresponds to the JSON property `name`
|
222
|
+
# @return [String]
|
223
|
+
attr_accessor :name
|
224
|
+
|
225
|
+
# Output only. Severity of this alert.
|
226
|
+
# Corresponds to the JSON property `severity`
|
227
|
+
# @return [String]
|
228
|
+
attr_accessor :severity
|
229
|
+
|
230
|
+
# Output only. Type of alert. This identifies the broad type of this alert, and
|
231
|
+
# provides a stable machine-readable identifier that will not be translated. For
|
232
|
+
# example, "payment-hold".
|
233
|
+
# Corresponds to the JSON property `type`
|
234
|
+
# @return [String]
|
235
|
+
attr_accessor :type
|
236
|
+
|
237
|
+
def initialize(**args)
|
238
|
+
update!(**args)
|
239
|
+
end
|
240
|
+
|
241
|
+
# Update properties of this object
|
242
|
+
def update!(**args)
|
243
|
+
@message = args[:message] if args.key?(:message)
|
244
|
+
@name = args[:name] if args.key?(:name)
|
245
|
+
@severity = args[:severity] if args.key?(:severity)
|
246
|
+
@type = args[:type] if args.key?(:type)
|
247
|
+
end
|
248
|
+
end
|
249
|
+
|
250
|
+
# Cell representation.
|
251
|
+
class Cell
|
252
|
+
include Google::Apis::Core::Hashable
|
253
|
+
|
254
|
+
# Value in the cell. The dimension cells contain strings, and the metric cells
|
255
|
+
# contain numbers.
|
256
|
+
# Corresponds to the JSON property `value`
|
257
|
+
# @return [String]
|
258
|
+
attr_accessor :value
|
259
|
+
|
260
|
+
def initialize(**args)
|
261
|
+
update!(**args)
|
262
|
+
end
|
263
|
+
|
264
|
+
# Update properties of this object
|
265
|
+
def update!(**args)
|
266
|
+
@value = args[:value] if args.key?(:value)
|
267
|
+
end
|
268
|
+
end
|
269
|
+
|
270
|
+
# Settings specific to content ads (AFC).
|
271
|
+
class ContentAdsSettings
|
272
|
+
include Google::Apis::Core::Hashable
|
273
|
+
|
274
|
+
# Size of the ad unit. e.g. "728x90", "1x3" (for responsive ad units).
|
275
|
+
# Corresponds to the JSON property `size`
|
276
|
+
# @return [String]
|
277
|
+
attr_accessor :size
|
278
|
+
|
279
|
+
# Type of the ad unit.
|
280
|
+
# Corresponds to the JSON property `type`
|
281
|
+
# @return [String]
|
282
|
+
attr_accessor :type
|
283
|
+
|
284
|
+
def initialize(**args)
|
285
|
+
update!(**args)
|
286
|
+
end
|
287
|
+
|
288
|
+
# Update properties of this object
|
289
|
+
def update!(**args)
|
290
|
+
@size = args[:size] if args.key?(:size)
|
291
|
+
@type = args[:type] if args.key?(:type)
|
292
|
+
end
|
293
|
+
end
|
294
|
+
|
295
|
+
# Representation of a custom channel.
|
296
|
+
class CustomChannel
|
297
|
+
include Google::Apis::Core::Hashable
|
298
|
+
|
299
|
+
# Display name of the custom channel.
|
300
|
+
# Corresponds to the JSON property `displayName`
|
301
|
+
# @return [String]
|
302
|
+
attr_accessor :display_name
|
303
|
+
|
304
|
+
# Resource name of the custom channel. Format: accounts/`account`/adclients/`
|
305
|
+
# adclient`/customchannels/`customchannel`
|
306
|
+
# Corresponds to the JSON property `name`
|
307
|
+
# @return [String]
|
308
|
+
attr_accessor :name
|
309
|
+
|
310
|
+
# Output only. Unique ID of the custom channel as used in the `CUSTOM_CHANNEL_ID`
|
311
|
+
# reporting dimension.
|
312
|
+
# Corresponds to the JSON property `reportingDimensionId`
|
313
|
+
# @return [String]
|
314
|
+
attr_accessor :reporting_dimension_id
|
315
|
+
|
316
|
+
def initialize(**args)
|
317
|
+
update!(**args)
|
318
|
+
end
|
319
|
+
|
320
|
+
# Update properties of this object
|
321
|
+
def update!(**args)
|
322
|
+
@display_name = args[:display_name] if args.key?(:display_name)
|
323
|
+
@name = args[:name] if args.key?(:name)
|
324
|
+
@reporting_dimension_id = args[:reporting_dimension_id] if args.key?(:reporting_dimension_id)
|
325
|
+
end
|
326
|
+
end
|
327
|
+
|
328
|
+
# Represents a whole or partial calendar date, such as a birthday. The time of
|
329
|
+
# day and time zone are either specified elsewhere or are insignificant. The
|
330
|
+
# date is relative to the Gregorian Calendar. This can represent one of the
|
331
|
+
# following: * A full date, with non-zero year, month, and day values * A month
|
332
|
+
# and day value, with a zero year, such as an anniversary * A year on its own,
|
333
|
+
# with zero month and day values * A year and month value, with a zero day, such
|
334
|
+
# as a credit card expiration date Related types are google.type.TimeOfDay and `
|
335
|
+
# google.protobuf.Timestamp`.
|
336
|
+
class Date
|
337
|
+
include Google::Apis::Core::Hashable
|
338
|
+
|
339
|
+
# Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to
|
340
|
+
# specify a year by itself or a year and month where the day isn't significant.
|
341
|
+
# Corresponds to the JSON property `day`
|
342
|
+
# @return [Fixnum]
|
343
|
+
attr_accessor :day
|
344
|
+
|
345
|
+
# Month of a year. Must be from 1 to 12, or 0 to specify a year without a month
|
346
|
+
# and day.
|
347
|
+
# Corresponds to the JSON property `month`
|
348
|
+
# @return [Fixnum]
|
349
|
+
attr_accessor :month
|
350
|
+
|
351
|
+
# Year of the date. Must be from 1 to 9999, or 0 to specify a date without a
|
352
|
+
# year.
|
353
|
+
# Corresponds to the JSON property `year`
|
354
|
+
# @return [Fixnum]
|
355
|
+
attr_accessor :year
|
356
|
+
|
357
|
+
def initialize(**args)
|
358
|
+
update!(**args)
|
359
|
+
end
|
360
|
+
|
361
|
+
# Update properties of this object
|
362
|
+
def update!(**args)
|
363
|
+
@day = args[:day] if args.key?(:day)
|
364
|
+
@month = args[:month] if args.key?(:month)
|
365
|
+
@year = args[:year] if args.key?(:year)
|
366
|
+
end
|
367
|
+
end
|
368
|
+
|
369
|
+
# The header information of the columns requested in the report.
|
370
|
+
class Header
|
371
|
+
include Google::Apis::Core::Hashable
|
372
|
+
|
373
|
+
# The [ISO-4217 currency code](https://en.wikipedia.org/wiki/ISO_4217) of this
|
374
|
+
# column. Only present if the header type is METRIC_CURRENCY.
|
375
|
+
# Corresponds to the JSON property `currencyCode`
|
376
|
+
# @return [String]
|
377
|
+
attr_accessor :currency_code
|
378
|
+
|
379
|
+
# Required. Name of the header.
|
380
|
+
# Corresponds to the JSON property `name`
|
381
|
+
# @return [String]
|
382
|
+
attr_accessor :name
|
383
|
+
|
384
|
+
# Required. Type of the header.
|
385
|
+
# Corresponds to the JSON property `type`
|
386
|
+
# @return [String]
|
387
|
+
attr_accessor :type
|
388
|
+
|
389
|
+
def initialize(**args)
|
390
|
+
update!(**args)
|
391
|
+
end
|
392
|
+
|
393
|
+
# Update properties of this object
|
394
|
+
def update!(**args)
|
395
|
+
@currency_code = args[:currency_code] if args.key?(:currency_code)
|
396
|
+
@name = args[:name] if args.key?(:name)
|
397
|
+
@type = args[:type] if args.key?(:type)
|
398
|
+
end
|
399
|
+
end
|
400
|
+
|
401
|
+
# Message that represents an arbitrary HTTP body. It should only be used for
|
402
|
+
# payload formats that can't be represented as JSON, such as raw binary or an
|
403
|
+
# HTML page. This message can be used both in streaming and non-streaming API
|
404
|
+
# methods in the request as well as the response. It can be used as a top-level
|
405
|
+
# request field, which is convenient if one wants to extract parameters from
|
406
|
+
# either the URL or HTTP template into the request fields and also want access
|
407
|
+
# to the raw HTTP body. Example: message GetResourceRequest ` // A unique
|
408
|
+
# request id. string request_id = 1; // The raw HTTP body is bound to this field.
|
409
|
+
# google.api.HttpBody http_body = 2; ` service ResourceService ` rpc
|
410
|
+
# GetResource(GetResourceRequest) returns (google.api.HttpBody); rpc
|
411
|
+
# UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty); ` Example
|
412
|
+
# with streaming methods: service CaldavService ` rpc GetCalendar(stream google.
|
413
|
+
# api.HttpBody) returns (stream google.api.HttpBody); rpc UpdateCalendar(stream
|
414
|
+
# google.api.HttpBody) returns (stream google.api.HttpBody); ` Use of this type
|
415
|
+
# only changes how the request and response bodies are handled, all other
|
416
|
+
# features will continue to work unchanged.
|
417
|
+
class HttpBody
|
418
|
+
include Google::Apis::Core::Hashable
|
419
|
+
|
420
|
+
# The HTTP Content-Type header value specifying the content type of the body.
|
421
|
+
# Corresponds to the JSON property `contentType`
|
422
|
+
# @return [String]
|
423
|
+
attr_accessor :content_type
|
424
|
+
|
425
|
+
# The HTTP request/response body as raw binary.
|
426
|
+
# Corresponds to the JSON property `data`
|
427
|
+
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
428
|
+
# @return [String]
|
429
|
+
attr_accessor :data
|
430
|
+
|
431
|
+
# Application specific response metadata. Must be set in the first response for
|
432
|
+
# streaming APIs.
|
433
|
+
# Corresponds to the JSON property `extensions`
|
434
|
+
# @return [Array<Hash<String,Object>>]
|
435
|
+
attr_accessor :extensions
|
436
|
+
|
437
|
+
def initialize(**args)
|
438
|
+
update!(**args)
|
439
|
+
end
|
440
|
+
|
441
|
+
# Update properties of this object
|
442
|
+
def update!(**args)
|
443
|
+
@content_type = args[:content_type] if args.key?(:content_type)
|
444
|
+
@data = args[:data] if args.key?(:data)
|
445
|
+
@extensions = args[:extensions] if args.key?(:extensions)
|
446
|
+
end
|
447
|
+
end
|
448
|
+
|
449
|
+
# Response definition for the account list rpc.
|
450
|
+
class ListAccountsResponse
|
451
|
+
include Google::Apis::Core::Hashable
|
452
|
+
|
453
|
+
# The accounts returned in this list response.
|
454
|
+
# Corresponds to the JSON property `accounts`
|
455
|
+
# @return [Array<Google::Apis::AdsenseV2::Account>]
|
456
|
+
attr_accessor :accounts
|
457
|
+
|
458
|
+
# Continuation token used to page through accounts. To retrieve the next page of
|
459
|
+
# the results, set the next request's "page_token" value to this.
|
460
|
+
# Corresponds to the JSON property `nextPageToken`
|
461
|
+
# @return [String]
|
462
|
+
attr_accessor :next_page_token
|
463
|
+
|
464
|
+
def initialize(**args)
|
465
|
+
update!(**args)
|
466
|
+
end
|
467
|
+
|
468
|
+
# Update properties of this object
|
469
|
+
def update!(**args)
|
470
|
+
@accounts = args[:accounts] if args.key?(:accounts)
|
471
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
472
|
+
end
|
473
|
+
end
|
474
|
+
|
475
|
+
# Response definition for the ad client list rpc.
|
476
|
+
class ListAdClientsResponse
|
477
|
+
include Google::Apis::Core::Hashable
|
478
|
+
|
479
|
+
# The ad clients returned in this list response.
|
480
|
+
# Corresponds to the JSON property `adClients`
|
481
|
+
# @return [Array<Google::Apis::AdsenseV2::AdClient>]
|
482
|
+
attr_accessor :ad_clients
|
483
|
+
|
484
|
+
# Continuation token used to page through ad clients. To retrieve the next page
|
485
|
+
# of the results, set the next request's "page_token" value to this.
|
486
|
+
# Corresponds to the JSON property `nextPageToken`
|
487
|
+
# @return [String]
|
488
|
+
attr_accessor :next_page_token
|
489
|
+
|
490
|
+
def initialize(**args)
|
491
|
+
update!(**args)
|
492
|
+
end
|
493
|
+
|
494
|
+
# Update properties of this object
|
495
|
+
def update!(**args)
|
496
|
+
@ad_clients = args[:ad_clients] if args.key?(:ad_clients)
|
497
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
498
|
+
end
|
499
|
+
end
|
500
|
+
|
501
|
+
# Response definition for the adunit list rpc.
|
502
|
+
class ListAdUnitsResponse
|
503
|
+
include Google::Apis::Core::Hashable
|
504
|
+
|
505
|
+
# The ad units returned in the list response.
|
506
|
+
# Corresponds to the JSON property `adUnits`
|
507
|
+
# @return [Array<Google::Apis::AdsenseV2::AdUnit>]
|
508
|
+
attr_accessor :ad_units
|
509
|
+
|
510
|
+
# Continuation token used to page through ad units. To retrieve the next page of
|
511
|
+
# the results, set the next request's "page_token" value to this.
|
512
|
+
# Corresponds to the JSON property `nextPageToken`
|
513
|
+
# @return [String]
|
514
|
+
attr_accessor :next_page_token
|
515
|
+
|
516
|
+
def initialize(**args)
|
517
|
+
update!(**args)
|
518
|
+
end
|
519
|
+
|
520
|
+
# Update properties of this object
|
521
|
+
def update!(**args)
|
522
|
+
@ad_units = args[:ad_units] if args.key?(:ad_units)
|
523
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
524
|
+
end
|
525
|
+
end
|
526
|
+
|
527
|
+
# Response definition for the alerts list rpc.
|
528
|
+
class ListAlertsResponse
|
529
|
+
include Google::Apis::Core::Hashable
|
530
|
+
|
531
|
+
# The alerts returned in this list response.
|
532
|
+
# Corresponds to the JSON property `alerts`
|
533
|
+
# @return [Array<Google::Apis::AdsenseV2::Alert>]
|
534
|
+
attr_accessor :alerts
|
535
|
+
|
536
|
+
def initialize(**args)
|
537
|
+
update!(**args)
|
538
|
+
end
|
539
|
+
|
540
|
+
# Update properties of this object
|
541
|
+
def update!(**args)
|
542
|
+
@alerts = args[:alerts] if args.key?(:alerts)
|
543
|
+
end
|
544
|
+
end
|
545
|
+
|
546
|
+
# Response definition for the child account list rpc.
|
547
|
+
class ListChildAccountsResponse
|
548
|
+
include Google::Apis::Core::Hashable
|
549
|
+
|
550
|
+
# The accounts returned in this list response.
|
551
|
+
# Corresponds to the JSON property `accounts`
|
552
|
+
# @return [Array<Google::Apis::AdsenseV2::Account>]
|
553
|
+
attr_accessor :accounts
|
554
|
+
|
555
|
+
# Continuation token used to page through accounts. To retrieve the next page of
|
556
|
+
# the results, set the next request's "page_token" value to this.
|
557
|
+
# Corresponds to the JSON property `nextPageToken`
|
558
|
+
# @return [String]
|
559
|
+
attr_accessor :next_page_token
|
560
|
+
|
561
|
+
def initialize(**args)
|
562
|
+
update!(**args)
|
563
|
+
end
|
564
|
+
|
565
|
+
# Update properties of this object
|
566
|
+
def update!(**args)
|
567
|
+
@accounts = args[:accounts] if args.key?(:accounts)
|
568
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
569
|
+
end
|
570
|
+
end
|
571
|
+
|
572
|
+
# Response definition for the custom channel list rpc.
|
573
|
+
class ListCustomChannelsResponse
|
574
|
+
include Google::Apis::Core::Hashable
|
575
|
+
|
576
|
+
# The custom channels returned in this list response.
|
577
|
+
# Corresponds to the JSON property `customChannels`
|
578
|
+
# @return [Array<Google::Apis::AdsenseV2::CustomChannel>]
|
579
|
+
attr_accessor :custom_channels
|
580
|
+
|
581
|
+
# Continuation token used to page through alerts. To retrieve the next page of
|
582
|
+
# the results, set the next request's "page_token" value to this.
|
583
|
+
# Corresponds to the JSON property `nextPageToken`
|
584
|
+
# @return [String]
|
585
|
+
attr_accessor :next_page_token
|
586
|
+
|
587
|
+
def initialize(**args)
|
588
|
+
update!(**args)
|
589
|
+
end
|
590
|
+
|
591
|
+
# Update properties of this object
|
592
|
+
def update!(**args)
|
593
|
+
@custom_channels = args[:custom_channels] if args.key?(:custom_channels)
|
594
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
595
|
+
end
|
596
|
+
end
|
597
|
+
|
598
|
+
# Response definition for the ad units linked to a custom channel list rpc.
|
599
|
+
class ListLinkedAdUnitsResponse
|
600
|
+
include Google::Apis::Core::Hashable
|
601
|
+
|
602
|
+
# The ad units returned in the list response.
|
603
|
+
# Corresponds to the JSON property `adUnits`
|
604
|
+
# @return [Array<Google::Apis::AdsenseV2::AdUnit>]
|
605
|
+
attr_accessor :ad_units
|
606
|
+
|
607
|
+
# Continuation token used to page through ad units. To retrieve the next page of
|
608
|
+
# the results, set the next request's "page_token" value to this.
|
609
|
+
# Corresponds to the JSON property `nextPageToken`
|
610
|
+
# @return [String]
|
611
|
+
attr_accessor :next_page_token
|
612
|
+
|
613
|
+
def initialize(**args)
|
614
|
+
update!(**args)
|
615
|
+
end
|
616
|
+
|
617
|
+
# Update properties of this object
|
618
|
+
def update!(**args)
|
619
|
+
@ad_units = args[:ad_units] if args.key?(:ad_units)
|
620
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
621
|
+
end
|
622
|
+
end
|
623
|
+
|
624
|
+
# Response definition for the custom channels linked to an adunit list rpc.
|
625
|
+
class ListLinkedCustomChannelsResponse
|
626
|
+
include Google::Apis::Core::Hashable
|
627
|
+
|
628
|
+
# The custom channels returned in this list response.
|
629
|
+
# Corresponds to the JSON property `customChannels`
|
630
|
+
# @return [Array<Google::Apis::AdsenseV2::CustomChannel>]
|
631
|
+
attr_accessor :custom_channels
|
632
|
+
|
633
|
+
# Continuation token used to page through alerts. To retrieve the next page of
|
634
|
+
# the results, set the next request's "page_token" value to this.
|
635
|
+
# Corresponds to the JSON property `nextPageToken`
|
636
|
+
# @return [String]
|
637
|
+
attr_accessor :next_page_token
|
638
|
+
|
639
|
+
def initialize(**args)
|
640
|
+
update!(**args)
|
641
|
+
end
|
642
|
+
|
643
|
+
# Update properties of this object
|
644
|
+
def update!(**args)
|
645
|
+
@custom_channels = args[:custom_channels] if args.key?(:custom_channels)
|
646
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
647
|
+
end
|
648
|
+
end
|
649
|
+
|
650
|
+
# Response definition for the payments list rpc.
|
651
|
+
class ListPaymentsResponse
|
652
|
+
include Google::Apis::Core::Hashable
|
653
|
+
|
654
|
+
# The payments returned in this list response.
|
655
|
+
# Corresponds to the JSON property `payments`
|
656
|
+
# @return [Array<Google::Apis::AdsenseV2::Payment>]
|
657
|
+
attr_accessor :payments
|
658
|
+
|
659
|
+
def initialize(**args)
|
660
|
+
update!(**args)
|
661
|
+
end
|
662
|
+
|
663
|
+
# Update properties of this object
|
664
|
+
def update!(**args)
|
665
|
+
@payments = args[:payments] if args.key?(:payments)
|
666
|
+
end
|
667
|
+
end
|
668
|
+
|
669
|
+
# Response definition for the saved reports list rpc.
|
670
|
+
class ListSavedReportsResponse
|
671
|
+
include Google::Apis::Core::Hashable
|
672
|
+
|
673
|
+
# Continuation token used to page through reports. To retrieve the next page of
|
674
|
+
# the results, set the next request's "page_token" value to this.
|
675
|
+
# Corresponds to the JSON property `nextPageToken`
|
676
|
+
# @return [String]
|
677
|
+
attr_accessor :next_page_token
|
678
|
+
|
679
|
+
# The reports returned in this list response.
|
680
|
+
# Corresponds to the JSON property `savedReports`
|
681
|
+
# @return [Array<Google::Apis::AdsenseV2::SavedReport>]
|
682
|
+
attr_accessor :saved_reports
|
683
|
+
|
684
|
+
def initialize(**args)
|
685
|
+
update!(**args)
|
686
|
+
end
|
687
|
+
|
688
|
+
# Update properties of this object
|
689
|
+
def update!(**args)
|
690
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
691
|
+
@saved_reports = args[:saved_reports] if args.key?(:saved_reports)
|
692
|
+
end
|
693
|
+
end
|
694
|
+
|
695
|
+
# Response definition for the sites list rpc.
|
696
|
+
class ListSitesResponse
|
697
|
+
include Google::Apis::Core::Hashable
|
698
|
+
|
699
|
+
# Continuation token used to page through sites. To retrieve the next page of
|
700
|
+
# the results, set the next request's "page_token" value to this.
|
701
|
+
# Corresponds to the JSON property `nextPageToken`
|
702
|
+
# @return [String]
|
703
|
+
attr_accessor :next_page_token
|
704
|
+
|
705
|
+
# The sites returned in this list response.
|
706
|
+
# Corresponds to the JSON property `sites`
|
707
|
+
# @return [Array<Google::Apis::AdsenseV2::Site>]
|
708
|
+
attr_accessor :sites
|
709
|
+
|
710
|
+
def initialize(**args)
|
711
|
+
update!(**args)
|
712
|
+
end
|
713
|
+
|
714
|
+
# Update properties of this object
|
715
|
+
def update!(**args)
|
716
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
717
|
+
@sites = args[:sites] if args.key?(:sites)
|
718
|
+
end
|
719
|
+
end
|
720
|
+
|
721
|
+
# Response definition for the url channels list rpc.
|
722
|
+
class ListUrlChannelsResponse
|
723
|
+
include Google::Apis::Core::Hashable
|
724
|
+
|
725
|
+
# Continuation token used to page through url channels. To retrieve the next
|
726
|
+
# page of the results, set the next request's "page_token" value to this.
|
727
|
+
# Corresponds to the JSON property `nextPageToken`
|
728
|
+
# @return [String]
|
729
|
+
attr_accessor :next_page_token
|
730
|
+
|
731
|
+
# The url channels returned in this list response.
|
732
|
+
# Corresponds to the JSON property `urlChannels`
|
733
|
+
# @return [Array<Google::Apis::AdsenseV2::UrlChannel>]
|
734
|
+
attr_accessor :url_channels
|
735
|
+
|
736
|
+
def initialize(**args)
|
737
|
+
update!(**args)
|
738
|
+
end
|
739
|
+
|
740
|
+
# Update properties of this object
|
741
|
+
def update!(**args)
|
742
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
743
|
+
@url_channels = args[:url_channels] if args.key?(:url_channels)
|
744
|
+
end
|
745
|
+
end
|
746
|
+
|
747
|
+
# Representation of an unpaid or paid payment. See [Payment timelines for
|
748
|
+
# AdSense](https://support.google.com/adsense/answer/7164703) for more
|
749
|
+
# information about payments.
|
750
|
+
class Payment
|
751
|
+
include Google::Apis::Core::Hashable
|
752
|
+
|
753
|
+
# Output only. The amount of unpaid or paid earnings, as a formatted string,
|
754
|
+
# including the currency. E.g. "¥1,235 JPY", "$1,234.57", "£87.65".
|
755
|
+
# Corresponds to the JSON property `amount`
|
756
|
+
# @return [String]
|
757
|
+
attr_accessor :amount
|
758
|
+
|
759
|
+
# Represents a whole or partial calendar date, such as a birthday. The time of
|
760
|
+
# day and time zone are either specified elsewhere or are insignificant. The
|
761
|
+
# date is relative to the Gregorian Calendar. This can represent one of the
|
762
|
+
# following: * A full date, with non-zero year, month, and day values * A month
|
763
|
+
# and day value, with a zero year, such as an anniversary * A year on its own,
|
764
|
+
# with zero month and day values * A year and month value, with a zero day, such
|
765
|
+
# as a credit card expiration date Related types are google.type.TimeOfDay and `
|
766
|
+
# google.protobuf.Timestamp`.
|
767
|
+
# Corresponds to the JSON property `date`
|
768
|
+
# @return [Google::Apis::AdsenseV2::Date]
|
769
|
+
attr_accessor :date
|
770
|
+
|
771
|
+
# Resource name of the payment. Format: accounts/`account`/payments/unpaid for
|
772
|
+
# unpaid (current) earnings. accounts/`account`/payments/yyyy-MM-dd for paid
|
773
|
+
# earnings.
|
774
|
+
# Corresponds to the JSON property `name`
|
775
|
+
# @return [String]
|
776
|
+
attr_accessor :name
|
777
|
+
|
778
|
+
def initialize(**args)
|
779
|
+
update!(**args)
|
780
|
+
end
|
781
|
+
|
782
|
+
# Update properties of this object
|
783
|
+
def update!(**args)
|
784
|
+
@amount = args[:amount] if args.key?(:amount)
|
785
|
+
@date = args[:date] if args.key?(:date)
|
786
|
+
@name = args[:name] if args.key?(:name)
|
787
|
+
end
|
788
|
+
end
|
789
|
+
|
790
|
+
# Result of a generated report.
|
791
|
+
class ReportResult
|
792
|
+
include Google::Apis::Core::Hashable
|
793
|
+
|
794
|
+
# Row representation.
|
795
|
+
# Corresponds to the JSON property `averages`
|
796
|
+
# @return [Google::Apis::AdsenseV2::Row]
|
797
|
+
attr_accessor :averages
|
798
|
+
|
799
|
+
# Represents a whole or partial calendar date, such as a birthday. The time of
|
800
|
+
# day and time zone are either specified elsewhere or are insignificant. The
|
801
|
+
# date is relative to the Gregorian Calendar. This can represent one of the
|
802
|
+
# following: * A full date, with non-zero year, month, and day values * A month
|
803
|
+
# and day value, with a zero year, such as an anniversary * A year on its own,
|
804
|
+
# with zero month and day values * A year and month value, with a zero day, such
|
805
|
+
# as a credit card expiration date Related types are google.type.TimeOfDay and `
|
806
|
+
# google.protobuf.Timestamp`.
|
807
|
+
# Corresponds to the JSON property `endDate`
|
808
|
+
# @return [Google::Apis::AdsenseV2::Date]
|
809
|
+
attr_accessor :end_date
|
810
|
+
|
811
|
+
# The header information; one for each dimension in the request, followed by one
|
812
|
+
# for each metric in the request.
|
813
|
+
# Corresponds to the JSON property `headers`
|
814
|
+
# @return [Array<Google::Apis::AdsenseV2::Header>]
|
815
|
+
attr_accessor :headers
|
816
|
+
|
817
|
+
# The output rows of the report. Each row is a list of cells; one for each
|
818
|
+
# dimension in the request, followed by one for each metric in the request.
|
819
|
+
# Corresponds to the JSON property `rows`
|
820
|
+
# @return [Array<Google::Apis::AdsenseV2::Row>]
|
821
|
+
attr_accessor :rows
|
822
|
+
|
823
|
+
# Represents a whole or partial calendar date, such as a birthday. The time of
|
824
|
+
# day and time zone are either specified elsewhere or are insignificant. The
|
825
|
+
# date is relative to the Gregorian Calendar. This can represent one of the
|
826
|
+
# following: * A full date, with non-zero year, month, and day values * A month
|
827
|
+
# and day value, with a zero year, such as an anniversary * A year on its own,
|
828
|
+
# with zero month and day values * A year and month value, with a zero day, such
|
829
|
+
# as a credit card expiration date Related types are google.type.TimeOfDay and `
|
830
|
+
# google.protobuf.Timestamp`.
|
831
|
+
# Corresponds to the JSON property `startDate`
|
832
|
+
# @return [Google::Apis::AdsenseV2::Date]
|
833
|
+
attr_accessor :start_date
|
834
|
+
|
835
|
+
# The total number of rows matched by the report request.
|
836
|
+
# Corresponds to the JSON property `totalMatchedRows`
|
837
|
+
# @return [Fixnum]
|
838
|
+
attr_accessor :total_matched_rows
|
839
|
+
|
840
|
+
# Row representation.
|
841
|
+
# Corresponds to the JSON property `totals`
|
842
|
+
# @return [Google::Apis::AdsenseV2::Row]
|
843
|
+
attr_accessor :totals
|
844
|
+
|
845
|
+
# Any warnings associated with generation of the report. These warnings are
|
846
|
+
# always returned in English.
|
847
|
+
# Corresponds to the JSON property `warnings`
|
848
|
+
# @return [Array<String>]
|
849
|
+
attr_accessor :warnings
|
850
|
+
|
851
|
+
def initialize(**args)
|
852
|
+
update!(**args)
|
853
|
+
end
|
854
|
+
|
855
|
+
# Update properties of this object
|
856
|
+
def update!(**args)
|
857
|
+
@averages = args[:averages] if args.key?(:averages)
|
858
|
+
@end_date = args[:end_date] if args.key?(:end_date)
|
859
|
+
@headers = args[:headers] if args.key?(:headers)
|
860
|
+
@rows = args[:rows] if args.key?(:rows)
|
861
|
+
@start_date = args[:start_date] if args.key?(:start_date)
|
862
|
+
@total_matched_rows = args[:total_matched_rows] if args.key?(:total_matched_rows)
|
863
|
+
@totals = args[:totals] if args.key?(:totals)
|
864
|
+
@warnings = args[:warnings] if args.key?(:warnings)
|
865
|
+
end
|
866
|
+
end
|
867
|
+
|
868
|
+
# Row representation.
|
869
|
+
class Row
|
870
|
+
include Google::Apis::Core::Hashable
|
871
|
+
|
872
|
+
# Cells in the row.
|
873
|
+
# Corresponds to the JSON property `cells`
|
874
|
+
# @return [Array<Google::Apis::AdsenseV2::Cell>]
|
875
|
+
attr_accessor :cells
|
876
|
+
|
877
|
+
def initialize(**args)
|
878
|
+
update!(**args)
|
879
|
+
end
|
880
|
+
|
881
|
+
# Update properties of this object
|
882
|
+
def update!(**args)
|
883
|
+
@cells = args[:cells] if args.key?(:cells)
|
884
|
+
end
|
885
|
+
end
|
886
|
+
|
887
|
+
# Representation of a saved report.
|
888
|
+
class SavedReport
|
889
|
+
include Google::Apis::Core::Hashable
|
890
|
+
|
891
|
+
# Resource name of the report. Format: accounts/`account`/reports/`report`
|
892
|
+
# Corresponds to the JSON property `name`
|
893
|
+
# @return [String]
|
894
|
+
attr_accessor :name
|
895
|
+
|
896
|
+
# Report title as specified by publisher.
|
897
|
+
# Corresponds to the JSON property `title`
|
898
|
+
# @return [String]
|
899
|
+
attr_accessor :title
|
900
|
+
|
901
|
+
def initialize(**args)
|
902
|
+
update!(**args)
|
903
|
+
end
|
904
|
+
|
905
|
+
# Update properties of this object
|
906
|
+
def update!(**args)
|
907
|
+
@name = args[:name] if args.key?(:name)
|
908
|
+
@title = args[:title] if args.key?(:title)
|
909
|
+
end
|
910
|
+
end
|
911
|
+
|
912
|
+
# Representation of a Site.
|
913
|
+
class Site
|
914
|
+
include Google::Apis::Core::Hashable
|
915
|
+
|
916
|
+
# Whether auto ads is turned on for the site.
|
917
|
+
# Corresponds to the JSON property `autoAdsEnabled`
|
918
|
+
# @return [Boolean]
|
919
|
+
attr_accessor :auto_ads_enabled
|
920
|
+
alias_method :auto_ads_enabled?, :auto_ads_enabled
|
921
|
+
|
922
|
+
# Domain (or subdomain) of the site, e.g. "example.com" or "www.example.com".
|
923
|
+
# This is used in the `OWNED_SITE_DOMAIN_NAME` reporting dimension.
|
924
|
+
# Corresponds to the JSON property `domain`
|
925
|
+
# @return [String]
|
926
|
+
attr_accessor :domain
|
927
|
+
|
928
|
+
# Resource name of a site. Format: accounts/`account`/sites/`site`
|
929
|
+
# Corresponds to the JSON property `name`
|
930
|
+
# @return [String]
|
931
|
+
attr_accessor :name
|
932
|
+
|
933
|
+
# Output only. Unique ID of the site as used in the `OWNED_SITE_ID` reporting
|
934
|
+
# dimension.
|
935
|
+
# Corresponds to the JSON property `reportingDimensionId`
|
936
|
+
# @return [String]
|
937
|
+
attr_accessor :reporting_dimension_id
|
938
|
+
|
939
|
+
# Output only. State of a site.
|
940
|
+
# Corresponds to the JSON property `state`
|
941
|
+
# @return [String]
|
942
|
+
attr_accessor :state
|
943
|
+
|
944
|
+
def initialize(**args)
|
945
|
+
update!(**args)
|
946
|
+
end
|
947
|
+
|
948
|
+
# Update properties of this object
|
949
|
+
def update!(**args)
|
950
|
+
@auto_ads_enabled = args[:auto_ads_enabled] if args.key?(:auto_ads_enabled)
|
951
|
+
@domain = args[:domain] if args.key?(:domain)
|
952
|
+
@name = args[:name] if args.key?(:name)
|
953
|
+
@reporting_dimension_id = args[:reporting_dimension_id] if args.key?(:reporting_dimension_id)
|
954
|
+
@state = args[:state] if args.key?(:state)
|
955
|
+
end
|
956
|
+
end
|
957
|
+
|
958
|
+
# Represents a time zone from the [IANA Time Zone Database](https://www.iana.org/
|
959
|
+
# time-zones).
|
960
|
+
class TimeZone
|
961
|
+
include Google::Apis::Core::Hashable
|
962
|
+
|
963
|
+
# IANA Time Zone Database time zone, e.g. "America/New_York".
|
964
|
+
# Corresponds to the JSON property `id`
|
965
|
+
# @return [String]
|
966
|
+
attr_accessor :id
|
967
|
+
|
968
|
+
# Optional. IANA Time Zone Database version number, e.g. "2019a".
|
969
|
+
# Corresponds to the JSON property `version`
|
970
|
+
# @return [String]
|
971
|
+
attr_accessor :version
|
972
|
+
|
973
|
+
def initialize(**args)
|
974
|
+
update!(**args)
|
975
|
+
end
|
976
|
+
|
977
|
+
# Update properties of this object
|
978
|
+
def update!(**args)
|
979
|
+
@id = args[:id] if args.key?(:id)
|
980
|
+
@version = args[:version] if args.key?(:version)
|
981
|
+
end
|
982
|
+
end
|
983
|
+
|
984
|
+
# Representation of a URL channel. URL channels allow you to track the
|
985
|
+
# performance of particular pages in your site; see [URL channels](https://
|
986
|
+
# support.google.com/adsense/answer/2923836) for more information.
|
987
|
+
class UrlChannel
|
988
|
+
include Google::Apis::Core::Hashable
|
989
|
+
|
990
|
+
# Resource name of the URL channel. Format: accounts/`account`/adclient/`
|
991
|
+
# adclient`/urlchannels/`urlchannel`
|
992
|
+
# Corresponds to the JSON property `name`
|
993
|
+
# @return [String]
|
994
|
+
attr_accessor :name
|
995
|
+
|
996
|
+
# Output only. Unique ID of the custom channel as used in the `URL_CHANNEL_ID`
|
997
|
+
# reporting dimension.
|
998
|
+
# Corresponds to the JSON property `reportingDimensionId`
|
999
|
+
# @return [String]
|
1000
|
+
attr_accessor :reporting_dimension_id
|
1001
|
+
|
1002
|
+
# URI pattern of the channel. Does not include "http://" or "https://". Example:
|
1003
|
+
# www.example.com/home
|
1004
|
+
# Corresponds to the JSON property `uriPattern`
|
1005
|
+
# @return [String]
|
1006
|
+
attr_accessor :uri_pattern
|
1007
|
+
|
1008
|
+
def initialize(**args)
|
1009
|
+
update!(**args)
|
1010
|
+
end
|
1011
|
+
|
1012
|
+
# Update properties of this object
|
1013
|
+
def update!(**args)
|
1014
|
+
@name = args[:name] if args.key?(:name)
|
1015
|
+
@reporting_dimension_id = args[:reporting_dimension_id] if args.key?(:reporting_dimension_id)
|
1016
|
+
@uri_pattern = args[:uri_pattern] if args.key?(:uri_pattern)
|
1017
|
+
end
|
1018
|
+
end
|
1019
|
+
end
|
1020
|
+
end
|
1021
|
+
end
|