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\ListCampaignAssignedTargetingOptionsResponse; 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 AdvertisersCampaignsTargetingTypesAssignedTargetingOptions extends \Google\Service\Resource 32{ 33 /** 34 * Gets a single targeting option assigned to a campaign. 35 * (assignedTargetingOptions.get) 36 * 37 * @param string $advertiserId Required. The ID of the advertiser the campaign 38 * belongs to. 39 * @param string $campaignId Required. The ID of the campaign the assigned 40 * targeting option belongs to. 41 * @param string $targetingType Required. Identifies the type of this assigned 42 * targeting option. Supported targeting types: * `TARGETING_TYPE_AGE_RANGE` * 43 * `TARGETING_TYPE_AUTHORIZED_SELLER_STATUS` * 44 * `TARGETING_TYPE_CONTENT_INSTREAM_POSITION` * 45 * `TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION` * 46 * `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * 47 * `TARGETING_TYPE_ENVIRONMENT` * `TARGETING_TYPE_EXCHANGE` * 48 * `TARGETING_TYPE_GENDER` * `TARGETING_TYPE_GEO_REGION` * 49 * `TARGETING_TYPE_HOUSEHOLD_INCOME` * `TARGETING_TYPE_INVENTORY_SOURCE` * 50 * `TARGETING_TYPE_INVENTORY_SOURCE_GROUP` * `TARGETING_TYPE_LANGUAGE` * 51 * `TARGETING_TYPE_ON_SCREEN_POSITION` * `TARGETING_TYPE_PARENTAL_STATUS` * 52 * `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * `TARGETING_TYPE_SUB_EXCHANGE` 53 * * `TARGETING_TYPE_THIRD_PARTY_VERIFIER` * `TARGETING_TYPE_VIEWABILITY` 54 * @param string $assignedTargetingOptionId Required. An identifier unique to 55 * the targeting type in this campaign that identifies the assigned targeting 56 * option being requested. 57 * @param array $optParams Optional parameters. 58 * @return AssignedTargetingOption 59 */ 60 public function get($advertiserId, $campaignId, $targetingType, $assignedTargetingOptionId, $optParams = []) 61 { 62 $params = ['advertiserId' => $advertiserId, 'campaignId' => $campaignId, 'targetingType' => $targetingType, 'assignedTargetingOptionId' => $assignedTargetingOptionId]; 63 $params = array_merge($params, $optParams); 64 return $this->call('get', [$params], AssignedTargetingOption::class); 65 } 66 /** 67 * Lists the targeting options assigned to a campaign for a specified targeting 68 * type. (assignedTargetingOptions.listAdvertisersCampaignsTargetingTypesAssigne 69 * dTargetingOptions) 70 * 71 * @param string $advertiserId Required. The ID of the advertiser the campaign 72 * belongs to. 73 * @param string $campaignId Required. The ID of the campaign to list assigned 74 * targeting options for. 75 * @param string $targetingType Required. Identifies the type of assigned 76 * targeting options to list. Supported targeting types: * 77 * `TARGETING_TYPE_AGE_RANGE` * `TARGETING_TYPE_AUTHORIZED_SELLER_STATUS` * 78 * `TARGETING_TYPE_CONTENT_INSTREAM_POSITION` * 79 * `TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION` * 80 * `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * 81 * `TARGETING_TYPE_ENVIRONMENT` * `TARGETING_TYPE_EXCHANGE` * 82 * `TARGETING_TYPE_GENDER` * `TARGETING_TYPE_GEO_REGION` * 83 * `TARGETING_TYPE_HOUSEHOLD_INCOME` * `TARGETING_TYPE_INVENTORY_SOURCE` * 84 * `TARGETING_TYPE_INVENTORY_SOURCE_GROUP` * `TARGETING_TYPE_LANGUAGE` * 85 * `TARGETING_TYPE_ON_SCREEN_POSITION` * `TARGETING_TYPE_PARENTAL_STATUS` * 86 * `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * `TARGETING_TYPE_SUB_EXCHANGE` 87 * * `TARGETING_TYPE_THIRD_PARTY_VERIFIER` * `TARGETING_TYPE_VIEWABILITY` 88 * @param array $optParams Optional parameters. 89 * 90 * @opt_param string filter Allows filtering by assigned targeting option 91 * properties. Supported syntax: * Filter expressions are made up of one or more 92 * restrictions. * Restrictions can be combined by the logical operator `OR`. * 93 * A restriction has the form of `{field} {operator} {value}`. * The operator 94 * must be `EQUALS (=)`. * Supported fields: - `assignedTargetingOptionId` - 95 * `inheritance` Examples: * AssignedTargetingOptions with ID 1 or 2 96 * `assignedTargetingOptionId="1" OR assignedTargetingOptionId="2"` * 97 * AssignedTargetingOptions with inheritance status of NOT_INHERITED or 98 * INHERITED_FROM_PARTNER `inheritance="NOT_INHERITED" OR 99 * inheritance="INHERITED_FROM_PARTNER"` The length of this field should be no 100 * more than 500 characters. 101 * @opt_param string orderBy Field by which to sort the list. Acceptable values 102 * are: * `assignedTargetingOptionId` (default) The default sorting order is 103 * ascending. To specify descending order for a field, a suffix "desc" should be 104 * added to the field name. Example: `assignedTargetingOptionId desc`. 105 * @opt_param int pageSize Requested page size. Must be between `1` and `5000`. 106 * If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` 107 * if an invalid value is specified. 108 * @opt_param string pageToken A token identifying a page of results the server 109 * should return. Typically, this is the value of next_page_token returned from 110 * the previous call to `ListCampaignAssignedTargetingOptions` method. If not 111 * specified, the first page of results will be returned. 112 * @return ListCampaignAssignedTargetingOptionsResponse 113 */ 114 public function listAdvertisersCampaignsTargetingTypesAssignedTargetingOptions($advertiserId, $campaignId, $targetingType, $optParams = []) 115 { 116 $params = ['advertiserId' => $advertiserId, 'campaignId' => $campaignId, 'targetingType' => $targetingType]; 117 $params = array_merge($params, $optParams); 118 return $this->call('list', [$params], ListCampaignAssignedTargetingOptionsResponse::class); 119 } 120} 121 122// Adding a class alias for backwards compatibility with the previous class name. 123class_alias(AdvertisersCampaignsTargetingTypesAssignedTargetingOptions::class, 'Google_Service_DisplayVideo_Resource_AdvertisersCampaignsTargetingTypesAssignedTargetingOptions'); 124