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\AuthorizedBuyersMarketplace\Resource;
19
20use Google\Service\AuthorizedBuyersMarketplace\ListPublisherProfilesResponse;
21use Google\Service\AuthorizedBuyersMarketplace\PublisherProfile;
22
23/**
24 * The "publisherProfiles" collection of methods.
25 * Typical usage is:
26 *  <code>
27 *   $authorizedbuyersmarketplaceService = new Google\Service\AuthorizedBuyersMarketplace(...);
28 *   $publisherProfiles = $authorizedbuyersmarketplaceService->publisherProfiles;
29 *  </code>
30 */
31class BuyersPublisherProfiles extends \Google\Service\Resource
32{
33  /**
34   * Gets the requested publisher profile by name. (publisherProfiles.get)
35   *
36   * @param string $name Required. Name of the publisher profile. Format:
37   * `buyers/{buyerId}/publisherProfiles/{publisherProfileId}`
38   * @param array $optParams Optional parameters.
39   * @return PublisherProfile
40   */
41  public function get($name, $optParams = [])
42  {
43    $params = ['name' => $name];
44    $params = array_merge($params, $optParams);
45    return $this->call('get', [$params], PublisherProfile::class);
46  }
47  /**
48   * Lists publisher profiles (publisherProfiles.listBuyersPublisherProfiles)
49   *
50   * @param string $parent Required. Parent that owns the collection of publisher
51   * profiles Format: `buyers/{buyerId}`
52   * @param array $optParams Optional parameters.
53   *
54   * @opt_param string filter Optional query string using the [Cloud API list
55   * filtering] (https://developers.google.com/authorized-buyers/apis/guides/v2
56   * /list-filters) syntax.
57   * @opt_param int pageSize Requested page size. The server may return fewer
58   * results than requested. If requested more than 500, the server will return
59   * 500 results per page. If unspecified, the server will pick a default page
60   * size of 100.
61   * @opt_param string pageToken The page token as returned from a previous
62   * ListPublisherProfilesResponse.
63   * @return ListPublisherProfilesResponse
64   */
65  public function listBuyersPublisherProfiles($parent, $optParams = [])
66  {
67    $params = ['parent' => $parent];
68    $params = array_merge($params, $optParams);
69    return $this->call('list', [$params], ListPublisherProfilesResponse::class);
70  }
71}
72
73// Adding a class alias for backwards compatibility with the previous class name.
74class_alias(BuyersPublisherProfiles::class, 'Google_Service_AuthorizedBuyersMarketplace_Resource_BuyersPublisherProfiles');
75