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/**
19 * The "filterSets" collection of methods.
20 * Typical usage is:
21 *  <code>
22 *   $adexchangebuyer2Service = new Google_Service_AdExchangeBuyerII(...);
23 *   $filterSets = $adexchangebuyer2Service->filterSets;
24 *  </code>
25 */
26class Google_Service_AdExchangeBuyerII_Resource_BiddersAccountsFilterSets extends Google_Service_Resource
27{
28  /**
29   * Creates the specified filter set for the account with the given account ID.
30   * (filterSets.create)
31   *
32   * @param string $ownerName Name of the owner (bidder or account) of the filter
33   * set to be created. For example: - For a bidder-level filter set for bidder
34   * 123: `bidders/123` - For an account-level filter set for the buyer account
35   * representing bidder 123: `bidders/123/accounts/123` - For an account-level
36   * filter set for the child seat buyer account 456 whose bidder is 123:
37   * `bidders/123/accounts/456`
38   * @param Google_Service_AdExchangeBuyerII_FilterSet $postBody
39   * @param array $optParams Optional parameters.
40   *
41   * @opt_param bool isTransient Whether the filter set is transient, or should be
42   * persisted indefinitely. By default, filter sets are not transient. If
43   * transient, it will be available for at least 1 hour after creation.
44   * @return Google_Service_AdExchangeBuyerII_FilterSet
45   */
46  public function create($ownerName, Google_Service_AdExchangeBuyerII_FilterSet $postBody, $optParams = array())
47  {
48    $params = array('ownerName' => $ownerName, 'postBody' => $postBody);
49    $params = array_merge($params, $optParams);
50    return $this->call('create', array($params), "Google_Service_AdExchangeBuyerII_FilterSet");
51  }
52  /**
53   * Deletes the requested filter set from the account with the given account ID.
54   * (filterSets.delete)
55   *
56   * @param string $name Full name of the resource to delete. For example: - For a
57   * bidder-level filter set for bidder 123: `bidders/123/filterSets/abc` - For an
58   * account-level filter set for the buyer account representing bidder 123:
59   * `bidders/123/accounts/123/filterSets/abc` - For an account-level filter set
60   * for the child seat buyer account 456 whose bidder is 123:
61   * `bidders/123/accounts/456/filterSets/abc`
62   * @param array $optParams Optional parameters.
63   * @return Google_Service_AdExchangeBuyerII_Adexchangebuyer2Empty
64   */
65  public function delete($name, $optParams = array())
66  {
67    $params = array('name' => $name);
68    $params = array_merge($params, $optParams);
69    return $this->call('delete', array($params), "Google_Service_AdExchangeBuyerII_Adexchangebuyer2Empty");
70  }
71  /**
72   * Retrieves the requested filter set for the account with the given account ID.
73   * (filterSets.get)
74   *
75   * @param string $name Full name of the resource being requested. For example: -
76   * For a bidder-level filter set for bidder 123: `bidders/123/filterSets/abc` -
77   * For an account-level filter set for the buyer account representing bidder
78   * 123: `bidders/123/accounts/123/filterSets/abc` - For an account-level filter
79   * set for the child seat buyer account 456 whose bidder is 123:
80   * `bidders/123/accounts/456/filterSets/abc`
81   * @param array $optParams Optional parameters.
82   * @return Google_Service_AdExchangeBuyerII_FilterSet
83   */
84  public function get($name, $optParams = array())
85  {
86    $params = array('name' => $name);
87    $params = array_merge($params, $optParams);
88    return $this->call('get', array($params), "Google_Service_AdExchangeBuyerII_FilterSet");
89  }
90  /**
91   * Lists all filter sets for the account with the given account ID.
92   * (filterSets.listBiddersAccountsFilterSets)
93   *
94   * @param string $ownerName Name of the owner (bidder or account) of the filter
95   * sets to be listed. For example: - For a bidder-level filter set for bidder
96   * 123: `bidders/123` - For an account-level filter set for the buyer account
97   * representing bidder 123: `bidders/123/accounts/123` - For an account-level
98   * filter set for the child seat buyer account 456 whose bidder is 123:
99   * `bidders/123/accounts/456`
100   * @param array $optParams Optional parameters.
101   *
102   * @opt_param int pageSize Requested page size. The server may return fewer
103   * results than requested. If unspecified, the server will pick an appropriate
104   * default.
105   * @opt_param string pageToken A token identifying a page of results the server
106   * should return. Typically, this is the value of
107   * ListFilterSetsResponse.nextPageToken returned from the previous call to the
108   * accounts.filterSets.list method.
109   * @return Google_Service_AdExchangeBuyerII_ListFilterSetsResponse
110   */
111  public function listBiddersAccountsFilterSets($ownerName, $optParams = array())
112  {
113    $params = array('ownerName' => $ownerName);
114    $params = array_merge($params, $optParams);
115    return $this->call('list', array($params), "Google_Service_AdExchangeBuyerII_ListFilterSetsResponse");
116  }
117}
118