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