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\AssignedTargetingOption; 21use Google\Service\DisplayVideo\ListInsertionOrderAssignedTargetingOptionsResponse; 22 23/** 24 * The "assignedTargetingOptions" collection of methods. 25 * Typical usage is: 26 * <code> 27 * $displayvideoService = new Google\Service\DisplayVideo(...); 28 * $assignedTargetingOptions = $displayvideoService->assignedTargetingOptions; 29 * </code> 30 */ 31class AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptions extends \Google\Service\Resource 32{ 33 /** 34 * Gets a single targeting option assigned to an insertion order. 35 * (assignedTargetingOptions.get) 36 * 37 * @param string $advertiserId Required. The ID of the advertiser the insertion 38 * order belongs to. 39 * @param string $insertionOrderId Required. The ID of the insertion order the 40 * assigned targeting option belongs to. 41 * @param string $targetingType Required. Identifies the type of this assigned 42 * targeting option. 43 * @param string $assignedTargetingOptionId Required. An identifier unique to 44 * the targeting type in this insertion order that identifies the assigned 45 * targeting option being requested. 46 * @param array $optParams Optional parameters. 47 * @return AssignedTargetingOption 48 */ 49 public function get($advertiserId, $insertionOrderId, $targetingType, $assignedTargetingOptionId, $optParams = []) 50 { 51 $params = ['advertiserId' => $advertiserId, 'insertionOrderId' => $insertionOrderId, 'targetingType' => $targetingType, 'assignedTargetingOptionId' => $assignedTargetingOptionId]; 52 $params = array_merge($params, $optParams); 53 return $this->call('get', [$params], AssignedTargetingOption::class); 54 } 55 /** 56 * Lists the targeting options assigned to an insertion order. (assignedTargetin 57 * gOptions.listAdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptions 58 * ) 59 * 60 * @param string $advertiserId Required. The ID of the advertiser the insertion 61 * order belongs to. 62 * @param string $insertionOrderId Required. The ID of the insertion order to 63 * list assigned targeting options for. 64 * @param string $targetingType Required. Identifies the type of assigned 65 * targeting options to list. 66 * @param array $optParams Optional parameters. 67 * 68 * @opt_param string filter Allows filtering by assigned targeting option 69 * properties. Supported syntax: * Filter expressions are made up of one or more 70 * restrictions. * Restrictions can be combined by the logical operator `OR`. * 71 * A restriction has the form of `{field} {operator} {value}`. * The operator 72 * must be `EQUALS (=)`. * Supported fields: - `assignedTargetingOptionId` - 73 * `inheritance` Examples: * AssignedTargetingOptions with ID 1 or 2 74 * `assignedTargetingOptionId="1" OR assignedTargetingOptionId="2"` * 75 * AssignedTargetingOptions with inheritance status of NOT_INHERITED or 76 * INHERITED_FROM_PARTNER `inheritance="NOT_INHERITED" OR 77 * inheritance="INHERITED_FROM_PARTNER"` The length of this field should be no 78 * more than 500 characters. 79 * @opt_param string orderBy Field by which to sort the list. Acceptable values 80 * are: * `assignedTargetingOptionId` (default) The default sorting order is 81 * ascending. To specify descending order for a field, a suffix "desc" should be 82 * added to the field name. Example: `assignedTargetingOptionId desc`. 83 * @opt_param int pageSize Requested page size. Must be between `1` and `5000`. 84 * If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` 85 * if an invalid value is specified. 86 * @opt_param string pageToken A token identifying a page of results the server 87 * should return. Typically, this is the value of next_page_token returned from 88 * the previous call to `ListInsertionOrderAssignedTargetingOptions` method. If 89 * not specified, the first page of results will be returned. 90 * @return ListInsertionOrderAssignedTargetingOptionsResponse 91 */ 92 public function listAdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptions($advertiserId, $insertionOrderId, $targetingType, $optParams = []) 93 { 94 $params = ['advertiserId' => $advertiserId, 'insertionOrderId' => $insertionOrderId, 'targetingType' => $targetingType]; 95 $params = array_merge($params, $optParams); 96 return $this->call('list', [$params], ListInsertionOrderAssignedTargetingOptionsResponse::class); 97 } 98} 99 100// Adding a class alias for backwards compatibility with the previous class name. 101class_alias(AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptions::class, 'Google_Service_DisplayVideo_Resource_AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptions'); 102