[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\BulkEditPartnerAssignedTargetingOptionsRequest;
|
---|
| 21 | use Google\Service\DisplayVideo\BulkEditPartnerAssignedTargetingOptionsResponse;
|
---|
| 22 | use Google\Service\DisplayVideo\ListPartnersResponse;
|
---|
| 23 | use Google\Service\DisplayVideo\Partner;
|
---|
| 24 |
|
---|
| 25 | /**
|
---|
| 26 | * The "partners" collection of methods.
|
---|
| 27 | * Typical usage is:
|
---|
| 28 | * <code>
|
---|
| 29 | * $displayvideoService = new Google\Service\DisplayVideo(...);
|
---|
| 30 | * $partners = $displayvideoService->partners;
|
---|
| 31 | * </code>
|
---|
| 32 | */
|
---|
| 33 | class Partners extends \Google\Service\Resource
|
---|
| 34 | {
|
---|
| 35 | /**
|
---|
| 36 | * Edits targeting options under a single partner. The operation will delete the
|
---|
| 37 | * assigned targeting options provided in
|
---|
| 38 | * BulkEditPartnerAssignedTargetingOptionsRequest.deleteRequests and then create
|
---|
| 39 | * the assigned targeting options provided in
|
---|
| 40 | * BulkEditPartnerAssignedTargetingOptionsRequest.createRequests .
|
---|
| 41 | * (partners.editAssignedTargetingOptions)
|
---|
| 42 | *
|
---|
| 43 | * @param string $partnerId Required. The ID of the partner.
|
---|
| 44 | * @param BulkEditPartnerAssignedTargetingOptionsRequest $postBody
|
---|
| 45 | * @param array $optParams Optional parameters.
|
---|
| 46 | * @return BulkEditPartnerAssignedTargetingOptionsResponse
|
---|
| 47 | * @throws \Google\Service\Exception
|
---|
| 48 | */
|
---|
| 49 | public function editAssignedTargetingOptions($partnerId, BulkEditPartnerAssignedTargetingOptionsRequest $postBody, $optParams = [])
|
---|
| 50 | {
|
---|
| 51 | $params = ['partnerId' => $partnerId, 'postBody' => $postBody];
|
---|
| 52 | $params = array_merge($params, $optParams);
|
---|
| 53 | return $this->call('editAssignedTargetingOptions', [$params], BulkEditPartnerAssignedTargetingOptionsResponse::class);
|
---|
| 54 | }
|
---|
| 55 | /**
|
---|
| 56 | * Gets a partner. (partners.get)
|
---|
| 57 | *
|
---|
| 58 | * @param string $partnerId Required. The ID of the partner to fetch.
|
---|
| 59 | * @param array $optParams Optional parameters.
|
---|
| 60 | * @return Partner
|
---|
| 61 | * @throws \Google\Service\Exception
|
---|
| 62 | */
|
---|
| 63 | public function get($partnerId, $optParams = [])
|
---|
| 64 | {
|
---|
| 65 | $params = ['partnerId' => $partnerId];
|
---|
| 66 | $params = array_merge($params, $optParams);
|
---|
| 67 | return $this->call('get', [$params], Partner::class);
|
---|
| 68 | }
|
---|
| 69 | /**
|
---|
| 70 | * Lists partners that are accessible to the current user. The order is defined
|
---|
| 71 | * by the order_by parameter. (partners.listPartners)
|
---|
| 72 | *
|
---|
| 73 | * @param array $optParams Optional parameters.
|
---|
| 74 | *
|
---|
| 75 | * @opt_param string filter Allows filtering by partner fields. Supported
|
---|
| 76 | * syntax: * Filter expressions are made up of one or more restrictions. *
|
---|
| 77 | * Restrictions can be combined by `AND` or `OR` logical operators. A sequence
|
---|
| 78 | * of restrictions implicitly uses `AND`. * A restriction has the form of
|
---|
| 79 | * `{field} {operator} {value}`. * All fields must use the `EQUALS (=)`
|
---|
| 80 | * operator. Supported fields: * `entityStatus` Examples: * All active partners:
|
---|
| 81 | * `entityStatus="ENTITY_STATUS_ACTIVE"` The length of this field should be no
|
---|
| 82 | * more than 500 characters. Reference our [filter `LIST` requests](/display-
|
---|
| 83 | * video/api/guides/how-tos/filters) guide for more information.
|
---|
| 84 | * @opt_param string orderBy Field by which to sort the list. Acceptable values
|
---|
| 85 | * are: * `displayName` The default sorting order is ascending. To specify
|
---|
| 86 | * descending order for a field, a suffix "desc" should be added to the field
|
---|
| 87 | * name. For example, `displayName desc`.
|
---|
| 88 | * @opt_param int pageSize Requested page size. Must be between `1` and `200`.
|
---|
| 89 | * If unspecified will default to `100`.
|
---|
| 90 | * @opt_param string pageToken A token identifying a page of results the server
|
---|
| 91 | * should return. Typically, this is the value of next_page_token returned from
|
---|
| 92 | * the previous call to `ListPartners` method. If not specified, the first page
|
---|
| 93 | * of results will be returned.
|
---|
| 94 | * @return ListPartnersResponse
|
---|
| 95 | * @throws \Google\Service\Exception
|
---|
| 96 | */
|
---|
| 97 | public function listPartners($optParams = [])
|
---|
| 98 | {
|
---|
| 99 | $params = [];
|
---|
| 100 | $params = array_merge($params, $optParams);
|
---|
| 101 | return $this->call('list', [$params], ListPartnersResponse::class);
|
---|
| 102 | }
|
---|
| 103 | }
|
---|
| 104 |
|
---|
| 105 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 106 | class_alias(Partners::class, 'Google_Service_DisplayVideo_Resource_Partners');
|
---|