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\EditCustomerMatchMembersRequest; 21use Google\Service\DisplayVideo\EditCustomerMatchMembersResponse; 22use Google\Service\DisplayVideo\FirstAndThirdPartyAudience; 23use Google\Service\DisplayVideo\ListFirstAndThirdPartyAudiencesResponse; 24 25/** 26 * The "firstAndThirdPartyAudiences" collection of methods. 27 * Typical usage is: 28 * <code> 29 * $displayvideoService = new Google\Service\DisplayVideo(...); 30 * $firstAndThirdPartyAudiences = $displayvideoService->firstAndThirdPartyAudiences; 31 * </code> 32 */ 33class FirstAndThirdPartyAudiences extends \Google\Service\Resource 34{ 35 /** 36 * Creates a FirstAndThirdPartyAudience. Only supported for the following 37 * audience_type: * `CUSTOMER_MATCH_CONTACT_INFO` * `CUSTOMER_MATCH_DEVICE_ID` 38 * (firstAndThirdPartyAudiences.create) 39 * 40 * @param FirstAndThirdPartyAudience $postBody 41 * @param array $optParams Optional parameters. 42 * 43 * @opt_param string advertiserId Required. The ID of the advertiser under whom 44 * the FirstAndThirdPartyAudience will be created. 45 * @return FirstAndThirdPartyAudience 46 */ 47 public function create(FirstAndThirdPartyAudience $postBody, $optParams = []) 48 { 49 $params = ['postBody' => $postBody]; 50 $params = array_merge($params, $optParams); 51 return $this->call('create', [$params], FirstAndThirdPartyAudience::class); 52 } 53 /** 54 * Updates the member list of a Customer Match audience. Only supported for the 55 * following audience_type: * `CUSTOMER_MATCH_CONTACT_INFO` * 56 * `CUSTOMER_MATCH_DEVICE_ID` 57 * (firstAndThirdPartyAudiences.editCustomerMatchMembers) 58 * 59 * @param string $firstAndThirdPartyAudienceId Required. The ID of the Customer 60 * Match FirstAndThirdPartyAudience whose members will be edited. 61 * @param EditCustomerMatchMembersRequest $postBody 62 * @param array $optParams Optional parameters. 63 * @return EditCustomerMatchMembersResponse 64 */ 65 public function editCustomerMatchMembers($firstAndThirdPartyAudienceId, EditCustomerMatchMembersRequest $postBody, $optParams = []) 66 { 67 $params = ['firstAndThirdPartyAudienceId' => $firstAndThirdPartyAudienceId, 'postBody' => $postBody]; 68 $params = array_merge($params, $optParams); 69 return $this->call('editCustomerMatchMembers', [$params], EditCustomerMatchMembersResponse::class); 70 } 71 /** 72 * Gets a first and third party audience. (firstAndThirdPartyAudiences.get) 73 * 74 * @param string $firstAndThirdPartyAudienceId Required. The ID of the first and 75 * third party audience to fetch. 76 * @param array $optParams Optional parameters. 77 * 78 * @opt_param string advertiserId The ID of the advertiser that has access to 79 * the fetched first and third party audience. 80 * @opt_param string partnerId The ID of the partner that has access to the 81 * fetched first and third party audience. 82 * @return FirstAndThirdPartyAudience 83 */ 84 public function get($firstAndThirdPartyAudienceId, $optParams = []) 85 { 86 $params = ['firstAndThirdPartyAudienceId' => $firstAndThirdPartyAudienceId]; 87 $params = array_merge($params, $optParams); 88 return $this->call('get', [$params], FirstAndThirdPartyAudience::class); 89 } 90 /** 91 * Lists first and third party audiences. The order is defined by the order_by 92 * parameter. (firstAndThirdPartyAudiences.listFirstAndThirdPartyAudiences) 93 * 94 * @param array $optParams Optional parameters. 95 * 96 * @opt_param string advertiserId The ID of the advertiser that has access to 97 * the fetched first and third party audiences. 98 * @opt_param string filter Allows filtering by first and third party audience 99 * fields. Supported syntax: * Filter expressions for first and third party 100 * audiences currently can only contain at most one restriction. * A restriction 101 * has the form of `{field} {operator} {value}`. * The operator must be 102 * `CONTAINS (:)`. * Supported fields: - `displayName` Examples: * All first and 103 * third party audiences for which the display name contains "Google": 104 * `displayName : "Google"`. The length of this field should be no more than 500 105 * characters. 106 * @opt_param string orderBy Field by which to sort the list. Acceptable values 107 * are: * `firstAndThirdPartyAudienceId` (default) * `displayName` The default 108 * sorting order is ascending. To specify descending order for a field, a suffix 109 * "desc" should be added to the field name. Example: `displayName desc`. 110 * @opt_param int pageSize Requested page size. Must be between `1` and `100`. 111 * If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` 112 * if an invalid value is specified. 113 * @opt_param string pageToken A token identifying a page of results the server 114 * should return. Typically, this is the value of next_page_token returned from 115 * the previous call to `ListFirstAndThirdPartyAudiences` method. If not 116 * specified, the first page of results will be returned. 117 * @opt_param string partnerId The ID of the partner that has access to the 118 * fetched first and third party audiences. 119 * @return ListFirstAndThirdPartyAudiencesResponse 120 */ 121 public function listFirstAndThirdPartyAudiences($optParams = []) 122 { 123 $params = []; 124 $params = array_merge($params, $optParams); 125 return $this->call('list', [$params], ListFirstAndThirdPartyAudiencesResponse::class); 126 } 127 /** 128 * Updates an existing FirstAndThirdPartyAudience. Only supported for the 129 * following audience_type: * `CUSTOMER_MATCH_CONTACT_INFO` * 130 * `CUSTOMER_MATCH_DEVICE_ID` (firstAndThirdPartyAudiences.patch) 131 * 132 * @param string $firstAndThirdPartyAudienceId Output only. The unique ID of the 133 * first and third party audience. Assigned by the system. 134 * @param FirstAndThirdPartyAudience $postBody 135 * @param array $optParams Optional parameters. 136 * 137 * @opt_param string advertiserId Required. The ID of the owner advertiser of 138 * the updated FirstAndThirdPartyAudience. 139 * @opt_param string updateMask Required. The mask to control which fields to 140 * update. Updates are only supported for the following fields: * `displayName` 141 * * `description` * `membershipDurationDays` 142 * @return FirstAndThirdPartyAudience 143 */ 144 public function patch($firstAndThirdPartyAudienceId, FirstAndThirdPartyAudience $postBody, $optParams = []) 145 { 146 $params = ['firstAndThirdPartyAudienceId' => $firstAndThirdPartyAudienceId, 'postBody' => $postBody]; 147 $params = array_merge($params, $optParams); 148 return $this->call('patch', [$params], FirstAndThirdPartyAudience::class); 149 } 150} 151 152// Adding a class alias for backwards compatibility with the previous class name. 153class_alias(FirstAndThirdPartyAudiences::class, 'Google_Service_DisplayVideo_Resource_FirstAndThirdPartyAudiences'); 154