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
18namespace Google\Service;
19
20use Google\Client;
21
22/**
23 * Service definition for DoubleClickBidManager (v1.1).
24 *
25 * <p>
26 * DoubleClick Bid Manager API allows users to manage and create campaigns and
27 * reports.</p>
28 *
29 * <p>
30 * For more information about this service, see the API
31 * <a href="https://developers.google.com/bid-manager/" target="_blank">Documentation</a>
32 * </p>
33 *
34 * @author Google, Inc.
35 */
36class DoubleClickBidManager extends \Google\Service
37{
38  /** View and manage your reports in DoubleClick Bid Manager. */
39  const DOUBLECLICKBIDMANAGER =
40      "https://www.googleapis.com/auth/doubleclickbidmanager";
41
42  public $queries;
43  public $reports;
44
45  /**
46   * Constructs the internal representation of the DoubleClickBidManager
47   * service.
48   *
49   * @param Client|array $clientOrConfig The client used to deliver requests, or a
50   *                                     config array to pass to a new Client instance.
51   * @param string $rootUrl The root URL used for requests to the service.
52   */
53  public function __construct($clientOrConfig = [], $rootUrl = null)
54  {
55    parent::__construct($clientOrConfig);
56    $this->rootUrl = $rootUrl ?: 'https://doubleclickbidmanager.googleapis.com/';
57    $this->servicePath = 'doubleclickbidmanager/v1.1/';
58    $this->batchPath = 'batch';
59    $this->version = 'v1.1';
60    $this->serviceName = 'doubleclickbidmanager';
61
62    $this->queries = new DoubleClickBidManager\Resource\Queries(
63        $this,
64        $this->serviceName,
65        'queries',
66        [
67          'methods' => [
68            'createquery' => [
69              'path' => 'query',
70              'httpMethod' => 'POST',
71              'parameters' => [
72                'asynchronous' => [
73                  'location' => 'query',
74                  'type' => 'boolean',
75                ],
76              ],
77            ],'deletequery' => [
78              'path' => 'query/{queryId}',
79              'httpMethod' => 'DELETE',
80              'parameters' => [
81                'queryId' => [
82                  'location' => 'path',
83                  'type' => 'string',
84                  'required' => true,
85                ],
86              ],
87            ],'getquery' => [
88              'path' => 'query/{queryId}',
89              'httpMethod' => 'GET',
90              'parameters' => [
91                'queryId' => [
92                  'location' => 'path',
93                  'type' => 'string',
94                  'required' => true,
95                ],
96              ],
97            ],'listqueries' => [
98              'path' => 'queries',
99              'httpMethod' => 'GET',
100              'parameters' => [
101                'pageSize' => [
102                  'location' => 'query',
103                  'type' => 'integer',
104                ],
105                'pageToken' => [
106                  'location' => 'query',
107                  'type' => 'string',
108                ],
109              ],
110            ],'runquery' => [
111              'path' => 'query/{queryId}',
112              'httpMethod' => 'POST',
113              'parameters' => [
114                'queryId' => [
115                  'location' => 'path',
116                  'type' => 'string',
117                  'required' => true,
118                ],
119                'asynchronous' => [
120                  'location' => 'query',
121                  'type' => 'boolean',
122                ],
123              ],
124            ],
125          ]
126        ]
127    );
128    $this->reports = new DoubleClickBidManager\Resource\Reports(
129        $this,
130        $this->serviceName,
131        'reports',
132        [
133          'methods' => [
134            'listreports' => [
135              'path' => 'queries/{queryId}/reports',
136              'httpMethod' => 'GET',
137              'parameters' => [
138                'queryId' => [
139                  'location' => 'path',
140                  'type' => 'string',
141                  'required' => true,
142                ],
143                'pageSize' => [
144                  'location' => 'query',
145                  'type' => 'integer',
146                ],
147                'pageToken' => [
148                  'location' => 'query',
149                  'type' => 'string',
150                ],
151              ],
152            ],
153          ]
154        ]
155    );
156  }
157}
158
159// Adding a class alias for backwards compatibility with the previous class name.
160class_alias(DoubleClickBidManager::class, 'Google_Service_DoubleClickBidManager');
161