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