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\CloudIAP\Resource;
19
20use Google\Service\CloudIAP\Brand;
21use Google\Service\CloudIAP\ListBrandsResponse;
22
23/**
24 * The "brands" collection of methods.
25 * Typical usage is:
26 *  <code>
27 *   $iapService = new Google\Service\CloudIAP(...);
28 *   $brands = $iapService->brands;
29 *  </code>
30 */
31class ProjectsBrands extends \Google\Service\Resource
32{
33  /**
34   * Constructs a new OAuth brand for the project if one does not exist. The
35   * created brand is "internal only", meaning that OAuth clients created under it
36   * only accept requests from users who belong to the same Google Workspace
37   * organization as the project. The brand is created in an un-reviewed status.
38   * NOTE: The "internal only" status can be manually changed in the Google Cloud
39   * Console. Requires that a brand does not already exist for the project, and
40   * that the specified support email is owned by the caller. (brands.create)
41   *
42   * @param string $parent Required. GCP Project number/id under which the brand
43   * is to be created. In the following format: projects/{project_number/id}.
44   * @param Brand $postBody
45   * @param array $optParams Optional parameters.
46   * @return Brand
47   */
48  public function create($parent, Brand $postBody, $optParams = [])
49  {
50    $params = ['parent' => $parent, 'postBody' => $postBody];
51    $params = array_merge($params, $optParams);
52    return $this->call('create', [$params], Brand::class);
53  }
54  /**
55   * Retrieves the OAuth brand of the project. (brands.get)
56   *
57   * @param string $name Required. Name of the brand to be fetched. In the
58   * following format: projects/{project_number/id}/brands/{brand}.
59   * @param array $optParams Optional parameters.
60   * @return Brand
61   */
62  public function get($name, $optParams = [])
63  {
64    $params = ['name' => $name];
65    $params = array_merge($params, $optParams);
66    return $this->call('get', [$params], Brand::class);
67  }
68  /**
69   * Lists the existing brands for the project. (brands.listProjectsBrands)
70   *
71   * @param string $parent Required. GCP Project number/id. In the following
72   * format: projects/{project_number/id}.
73   * @param array $optParams Optional parameters.
74   * @return ListBrandsResponse
75   */
76  public function listProjectsBrands($parent, $optParams = [])
77  {
78    $params = ['parent' => $parent];
79    $params = array_merge($params, $optParams);
80    return $this->call('list', [$params], ListBrandsResponse::class);
81  }
82}
83
84// Adding a class alias for backwards compatibility with the previous class name.
85class_alias(ProjectsBrands::class, 'Google_Service_CloudIAP_Resource_ProjectsBrands');
86