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\Dfareporting\Resource; 19 20use Google\Service\Dfareporting\RemarketingList; 21use Google\Service\Dfareporting\RemarketingListsListResponse; 22 23/** 24 * The "remarketingLists" collection of methods. 25 * Typical usage is: 26 * <code> 27 * $dfareportingService = new Google\Service\Dfareporting(...); 28 * $remarketingLists = $dfareportingService->remarketingLists; 29 * </code> 30 */ 31class RemarketingLists extends \Google\Service\Resource 32{ 33 /** 34 * Gets one remarketing list by ID. (remarketingLists.get) 35 * 36 * @param string $profileId User profile ID associated with this request. 37 * @param string $id Remarketing list ID. 38 * @param array $optParams Optional parameters. 39 * @return RemarketingList 40 */ 41 public function get($profileId, $id, $optParams = []) 42 { 43 $params = ['profileId' => $profileId, 'id' => $id]; 44 $params = array_merge($params, $optParams); 45 return $this->call('get', [$params], RemarketingList::class); 46 } 47 /** 48 * Inserts a new remarketing list. (remarketingLists.insert) 49 * 50 * @param string $profileId User profile ID associated with this request. 51 * @param RemarketingList $postBody 52 * @param array $optParams Optional parameters. 53 * @return RemarketingList 54 */ 55 public function insert($profileId, RemarketingList $postBody, $optParams = []) 56 { 57 $params = ['profileId' => $profileId, 'postBody' => $postBody]; 58 $params = array_merge($params, $optParams); 59 return $this->call('insert', [$params], RemarketingList::class); 60 } 61 /** 62 * Retrieves a list of remarketing lists, possibly filtered. This method 63 * supports paging. (remarketingLists.listRemarketingLists) 64 * 65 * @param string $profileId User profile ID associated with this request. 66 * @param string $advertiserId Select only remarketing lists owned by this 67 * advertiser. 68 * @param array $optParams Optional parameters. 69 * 70 * @opt_param bool active Select only active or only inactive remarketing lists. 71 * @opt_param string floodlightActivityId Select only remarketing lists that 72 * have this floodlight activity ID. 73 * @opt_param int maxResults Maximum number of results to return. 74 * @opt_param string name Allows searching for objects by name or ID. Wildcards 75 * (*) are allowed. For example, "remarketing list*2015" will return objects 76 * with names like "remarketing list June 2015", "remarketing list April 2015", 77 * or simply "remarketing list 2015". Most of the searches also add wildcards 78 * implicitly at the start and the end of the search string. For example, a 79 * search string of "remarketing list" will match objects with name "my 80 * remarketing list", "remarketing list 2015", or simply "remarketing list". 81 * @opt_param string pageToken Value of the nextPageToken from the previous 82 * result page. 83 * @opt_param string sortField Field by which to sort the list. 84 * @opt_param string sortOrder Order of sorted results. 85 * @return RemarketingListsListResponse 86 */ 87 public function listRemarketingLists($profileId, $advertiserId, $optParams = []) 88 { 89 $params = ['profileId' => $profileId, 'advertiserId' => $advertiserId]; 90 $params = array_merge($params, $optParams); 91 return $this->call('list', [$params], RemarketingListsListResponse::class); 92 } 93 /** 94 * Updates an existing remarketing list. This method supports patch semantics. 95 * (remarketingLists.patch) 96 * 97 * @param string $profileId User profile ID associated with this request. 98 * @param string $id RemarketingList ID. 99 * @param RemarketingList $postBody 100 * @param array $optParams Optional parameters. 101 * @return RemarketingList 102 */ 103 public function patch($profileId, $id, RemarketingList $postBody, $optParams = []) 104 { 105 $params = ['profileId' => $profileId, 'id' => $id, 'postBody' => $postBody]; 106 $params = array_merge($params, $optParams); 107 return $this->call('patch', [$params], RemarketingList::class); 108 } 109 /** 110 * Updates an existing remarketing list. (remarketingLists.update) 111 * 112 * @param string $profileId User profile ID associated with this request. 113 * @param RemarketingList $postBody 114 * @param array $optParams Optional parameters. 115 * @return RemarketingList 116 */ 117 public function update($profileId, RemarketingList $postBody, $optParams = []) 118 { 119 $params = ['profileId' => $profileId, 'postBody' => $postBody]; 120 $params = array_merge($params, $optParams); 121 return $this->call('update', [$params], RemarketingList::class); 122 } 123} 124 125// Adding a class alias for backwards compatibility with the previous class name. 126class_alias(RemarketingLists::class, 'Google_Service_Dfareporting_Resource_RemarketingLists'); 127