1<?php
2/*
3 * Copyright 2014 Google Inc.
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6 * use this file except in compliance with the License. You may obtain a copy of
7 * the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14 * License for the specific language governing permissions and limitations under
15 * the License.
16 */
17
18/**
19 * Service definition for Doubleclicksearch (v2).
20 *
21 * <p>
22 * Reports and modifies your advertising data in DoubleClick Search (for
23 * example, campaigns, ad groups, keywords, and conversions).</p>
24 *
25 * <p>
26 * For more information about this service, see the API
27 * <a href="https://developers.google.com/doubleclick-search/" target="_blank">Documentation</a>
28 * </p>
29 *
30 * @author Google, Inc.
31 */
32class Google_Service_Doubleclicksearch extends Google_Service
33{
34  /** View and manage your advertising data in DoubleClick Search. */
35  const DOUBLECLICKSEARCH =
36      "https://www.googleapis.com/auth/doubleclicksearch";
37
38  public $conversion;
39  public $reports;
40  public $savedColumns;
41
42  /**
43   * Constructs the internal representation of the Doubleclicksearch service.
44   *
45   * @param Google_Client $client
46   */
47  public function __construct(Google_Client $client)
48  {
49    parent::__construct($client);
50    $this->rootUrl = 'https://www.googleapis.com/';
51    $this->servicePath = 'doubleclicksearch/v2/';
52    $this->batchPath = 'batch/doubleclicksearch/v2';
53    $this->version = 'v2';
54    $this->serviceName = 'doubleclicksearch';
55
56    $this->conversion = new Google_Service_Doubleclicksearch_Resource_Conversion(
57        $this,
58        $this->serviceName,
59        'conversion',
60        array(
61          'methods' => array(
62            'get' => array(
63              'path' => 'agency/{agencyId}/advertiser/{advertiserId}/engine/{engineAccountId}/conversion',
64              'httpMethod' => 'GET',
65              'parameters' => array(
66                'agencyId' => array(
67                  'location' => 'path',
68                  'type' => 'string',
69                  'required' => true,
70                ),
71                'advertiserId' => array(
72                  'location' => 'path',
73                  'type' => 'string',
74                  'required' => true,
75                ),
76                'engineAccountId' => array(
77                  'location' => 'path',
78                  'type' => 'string',
79                  'required' => true,
80                ),
81                'endDate' => array(
82                  'location' => 'query',
83                  'type' => 'integer',
84                  'required' => true,
85                ),
86                'rowCount' => array(
87                  'location' => 'query',
88                  'type' => 'integer',
89                  'required' => true,
90                ),
91                'startDate' => array(
92                  'location' => 'query',
93                  'type' => 'integer',
94                  'required' => true,
95                ),
96                'startRow' => array(
97                  'location' => 'query',
98                  'type' => 'integer',
99                  'required' => true,
100                ),
101                'adGroupId' => array(
102                  'location' => 'query',
103                  'type' => 'string',
104                ),
105                'adId' => array(
106                  'location' => 'query',
107                  'type' => 'string',
108                ),
109                'campaignId' => array(
110                  'location' => 'query',
111                  'type' => 'string',
112                ),
113                'criterionId' => array(
114                  'location' => 'query',
115                  'type' => 'string',
116                ),
117              ),
118            ),'insert' => array(
119              'path' => 'conversion',
120              'httpMethod' => 'POST',
121              'parameters' => array(),
122            ),'patch' => array(
123              'path' => 'conversion',
124              'httpMethod' => 'PATCH',
125              'parameters' => array(
126                'advertiserId' => array(
127                  'location' => 'query',
128                  'type' => 'string',
129                  'required' => true,
130                ),
131                'agencyId' => array(
132                  'location' => 'query',
133                  'type' => 'string',
134                  'required' => true,
135                ),
136                'endDate' => array(
137                  'location' => 'query',
138                  'type' => 'integer',
139                  'required' => true,
140                ),
141                'engineAccountId' => array(
142                  'location' => 'query',
143                  'type' => 'string',
144                  'required' => true,
145                ),
146                'rowCount' => array(
147                  'location' => 'query',
148                  'type' => 'integer',
149                  'required' => true,
150                ),
151                'startDate' => array(
152                  'location' => 'query',
153                  'type' => 'integer',
154                  'required' => true,
155                ),
156                'startRow' => array(
157                  'location' => 'query',
158                  'type' => 'integer',
159                  'required' => true,
160                ),
161              ),
162            ),'update' => array(
163              'path' => 'conversion',
164              'httpMethod' => 'PUT',
165              'parameters' => array(),
166            ),'updateAvailability' => array(
167              'path' => 'conversion/updateAvailability',
168              'httpMethod' => 'POST',
169              'parameters' => array(),
170            ),
171          )
172        )
173    );
174    $this->reports = new Google_Service_Doubleclicksearch_Resource_Reports(
175        $this,
176        $this->serviceName,
177        'reports',
178        array(
179          'methods' => array(
180            'generate' => array(
181              'path' => 'reports/generate',
182              'httpMethod' => 'POST',
183              'parameters' => array(),
184            ),'get' => array(
185              'path' => 'reports/{reportId}',
186              'httpMethod' => 'GET',
187              'parameters' => array(
188                'reportId' => array(
189                  'location' => 'path',
190                  'type' => 'string',
191                  'required' => true,
192                ),
193              ),
194            ),'getFile' => array(
195              'path' => 'reports/{reportId}/files/{reportFragment}',
196              'httpMethod' => 'GET',
197              'parameters' => array(
198                'reportId' => array(
199                  'location' => 'path',
200                  'type' => 'string',
201                  'required' => true,
202                ),
203                'reportFragment' => array(
204                  'location' => 'path',
205                  'type' => 'integer',
206                  'required' => true,
207                ),
208              ),
209            ),'request' => array(
210              'path' => 'reports',
211              'httpMethod' => 'POST',
212              'parameters' => array(),
213            ),
214          )
215        )
216    );
217    $this->savedColumns = new Google_Service_Doubleclicksearch_Resource_SavedColumns(
218        $this,
219        $this->serviceName,
220        'savedColumns',
221        array(
222          'methods' => array(
223            'list' => array(
224              'path' => 'agency/{agencyId}/advertiser/{advertiserId}/savedcolumns',
225              'httpMethod' => 'GET',
226              'parameters' => array(
227                'agencyId' => array(
228                  'location' => 'path',
229                  'type' => 'string',
230                  'required' => true,
231                ),
232                'advertiserId' => array(
233                  'location' => 'path',
234                  'type' => 'string',
235                  'required' => true,
236                ),
237              ),
238            ),
239          )
240        )
241    );
242  }
243}
244