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\DisplayVideo\Resource; 19 20use Google\Service\DisplayVideo\CustomList; 21use Google\Service\DisplayVideo\ListCustomListsResponse; 22 23/** 24 * The "customLists" collection of methods. 25 * Typical usage is: 26 * <code> 27 * $displayvideoService = new Google\Service\DisplayVideo(...); 28 * $customLists = $displayvideoService->customLists; 29 * </code> 30 */ 31class CustomLists extends \Google\Service\Resource 32{ 33 /** 34 * Gets a custom list. (customLists.get) 35 * 36 * @param string $customListId Required. The ID of the custom list to fetch. 37 * @param array $optParams Optional parameters. 38 * 39 * @opt_param string advertiserId The ID of the DV360 advertiser that has access 40 * to the fetched custom lists. 41 * @return CustomList 42 */ 43 public function get($customListId, $optParams = []) 44 { 45 $params = ['customListId' => $customListId]; 46 $params = array_merge($params, $optParams); 47 return $this->call('get', [$params], CustomList::class); 48 } 49 /** 50 * Lists custom lists. The order is defined by the order_by parameter. 51 * (customLists.listCustomLists) 52 * 53 * @param array $optParams Optional parameters. 54 * 55 * @opt_param string advertiserId The ID of the DV360 advertiser that has access 56 * to the fetched custom lists. 57 * @opt_param string filter Allows filtering by custom list fields. Supported 58 * syntax: * Filter expressions for custom lists currently can only contain at 59 * most one restriction. * A restriction has the form of `{field} {operator} 60 * {value}`. * The operator must be `CONTAINS (:)`. * Supported fields: - 61 * `displayName` Examples: * All custom lists for which the display name 62 * contains "Google": `displayName : "Google"`. The length of this field should 63 * be no more than 500 characters. 64 * @opt_param string orderBy Field by which to sort the list. Acceptable values 65 * are: * `customListId` (default) * `displayName` The default sorting order is 66 * ascending. To specify descending order for a field, a suffix "desc" should be 67 * added to the field name. Example: `displayName desc`. 68 * @opt_param int pageSize Requested page size. Must be between `1` and `100`. 69 * If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` 70 * if an invalid value is specified. 71 * @opt_param string pageToken A token identifying a page of results the server 72 * should return. Typically, this is the value of next_page_token returned from 73 * the previous call to `ListCustomLists` method. If not specified, the first 74 * page of results will be returned. 75 * @return ListCustomListsResponse 76 */ 77 public function listCustomLists($optParams = []) 78 { 79 $params = []; 80 $params = array_merge($params, $optParams); 81 return $this->call('list', [$params], ListCustomListsResponse::class); 82 } 83} 84 85// Adding a class alias for backwards compatibility with the previous class name. 86class_alias(CustomLists::class, 'Google_Service_DisplayVideo_Resource_CustomLists'); 87