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