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 Doubleclicksearch (v2). 24 * 25 * <p> 26 * The Search Ads 360 API allows developers to automate uploading conversions 27 * and downloading reports from Search Ads 360.</p> 28 * 29 * <p> 30 * For more information about this service, see the API 31 * <a href="https://developers.google.com/search-ads" target="_blank">Documentation</a> 32 * </p> 33 * 34 * @author Google, Inc. 35 */ 36class Doubleclicksearch extends \Google\Service 37{ 38 /** View and manage your advertising data in DoubleClick Search. */ 39 const DOUBLECLICKSEARCH = 40 "https://www.googleapis.com/auth/doubleclicksearch"; 41 42 public $conversion; 43 public $reports; 44 public $savedColumns; 45 46 /** 47 * Constructs the internal representation of the Doubleclicksearch 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://doubleclicksearch.googleapis.com/'; 57 $this->servicePath = ''; 58 $this->batchPath = 'batch'; 59 $this->version = 'v2'; 60 $this->serviceName = 'doubleclicksearch'; 61 62 $this->conversion = new Doubleclicksearch\Resource\Conversion( 63 $this, 64 $this->serviceName, 65 'conversion', 66 [ 67 'methods' => [ 68 'get' => [ 69 'path' => 'doubleclicksearch/v2/agency/{agencyId}/advertiser/{advertiserId}/engine/{engineAccountId}/conversion', 70 'httpMethod' => 'GET', 71 'parameters' => [ 72 'agencyId' => [ 73 'location' => 'path', 74 'type' => 'string', 75 'required' => true, 76 ], 77 'advertiserId' => [ 78 'location' => 'path', 79 'type' => 'string', 80 'required' => true, 81 ], 82 'engineAccountId' => [ 83 'location' => 'path', 84 'type' => 'string', 85 'required' => true, 86 ], 87 'endDate' => [ 88 'location' => 'query', 89 'type' => 'integer', 90 'required' => true, 91 ], 92 'rowCount' => [ 93 'location' => 'query', 94 'type' => 'integer', 95 'required' => true, 96 ], 97 'startDate' => [ 98 'location' => 'query', 99 'type' => 'integer', 100 'required' => true, 101 ], 102 'startRow' => [ 103 'location' => 'query', 104 'type' => 'integer', 105 'required' => true, 106 ], 107 'adGroupId' => [ 108 'location' => 'query', 109 'type' => 'string', 110 ], 111 'adId' => [ 112 'location' => 'query', 113 'type' => 'string', 114 ], 115 'campaignId' => [ 116 'location' => 'query', 117 'type' => 'string', 118 ], 119 'criterionId' => [ 120 'location' => 'query', 121 'type' => 'string', 122 ], 123 ], 124 ],'insert' => [ 125 'path' => 'doubleclicksearch/v2/conversion', 126 'httpMethod' => 'POST', 127 'parameters' => [], 128 ],'update' => [ 129 'path' => 'doubleclicksearch/v2/conversion', 130 'httpMethod' => 'PUT', 131 'parameters' => [], 132 ],'updateAvailability' => [ 133 'path' => 'doubleclicksearch/v2/conversion/updateAvailability', 134 'httpMethod' => 'POST', 135 'parameters' => [], 136 ], 137 ] 138 ] 139 ); 140 $this->reports = new Doubleclicksearch\Resource\Reports( 141 $this, 142 $this->serviceName, 143 'reports', 144 [ 145 'methods' => [ 146 'generate' => [ 147 'path' => 'doubleclicksearch/v2/reports/generate', 148 'httpMethod' => 'POST', 149 'parameters' => [], 150 ],'get' => [ 151 'path' => 'doubleclicksearch/v2/reports/{reportId}', 152 'httpMethod' => 'GET', 153 'parameters' => [ 154 'reportId' => [ 155 'location' => 'path', 156 'type' => 'string', 157 'required' => true, 158 ], 159 ], 160 ],'getFile' => [ 161 'path' => 'doubleclicksearch/v2/reports/{reportId}/files/{reportFragment}', 162 'httpMethod' => 'GET', 163 'parameters' => [ 164 'reportId' => [ 165 'location' => 'path', 166 'type' => 'string', 167 'required' => true, 168 ], 169 'reportFragment' => [ 170 'location' => 'path', 171 'type' => 'integer', 172 'required' => true, 173 ], 174 ], 175 ],'request' => [ 176 'path' => 'doubleclicksearch/v2/reports', 177 'httpMethod' => 'POST', 178 'parameters' => [], 179 ], 180 ] 181 ] 182 ); 183 $this->savedColumns = new Doubleclicksearch\Resource\SavedColumns( 184 $this, 185 $this->serviceName, 186 'savedColumns', 187 [ 188 'methods' => [ 189 'list' => [ 190 'path' => 'doubleclicksearch/v2/agency/{agencyId}/advertiser/{advertiserId}/savedcolumns', 191 'httpMethod' => 'GET', 192 'parameters' => [ 193 'agencyId' => [ 194 'location' => 'path', 195 'type' => 'string', 196 'required' => true, 197 ], 198 'advertiserId' => [ 199 'location' => 'path', 200 'type' => 'string', 201 'required' => true, 202 ], 203 ], 204 ], 205 ] 206 ] 207 ); 208 } 209} 210 211// Adding a class alias for backwards compatibility with the previous class name. 212class_alias(Doubleclicksearch::class, 'Google_Service_Doubleclicksearch'); 213