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\Firebaseappcheck\Resource;
19
20use Google\Service\Firebaseappcheck\GoogleFirebaseAppcheckV1betaBatchUpdateServicesRequest;
21use Google\Service\Firebaseappcheck\GoogleFirebaseAppcheckV1betaBatchUpdateServicesResponse;
22use Google\Service\Firebaseappcheck\GoogleFirebaseAppcheckV1betaListServicesResponse;
23use Google\Service\Firebaseappcheck\GoogleFirebaseAppcheckV1betaService;
24
25/**
26 * The "services" collection of methods.
27 * Typical usage is:
28 *  <code>
29 *   $firebaseappcheckService = new Google\Service\Firebaseappcheck(...);
30 *   $services = $firebaseappcheckService->services;
31 *  </code>
32 */
33class ProjectsServices extends \Google\Service\Resource
34{
35  /**
36   * Atomically updates the specified Service configurations.
37   * (services.batchUpdate)
38   *
39   * @param string $parent Required. The parent project name shared by all Service
40   * configurations being updated, in the format ``` projects/{project_number} ```
41   * The parent collection in the `name` field of any resource being updated must
42   * match this field, or the entire batch fails.
43   * @param GoogleFirebaseAppcheckV1betaBatchUpdateServicesRequest $postBody
44   * @param array $optParams Optional parameters.
45   * @return GoogleFirebaseAppcheckV1betaBatchUpdateServicesResponse
46   */
47  public function batchUpdate($parent, GoogleFirebaseAppcheckV1betaBatchUpdateServicesRequest $postBody, $optParams = [])
48  {
49    $params = ['parent' => $parent, 'postBody' => $postBody];
50    $params = array_merge($params, $optParams);
51    return $this->call('batchUpdate', [$params], GoogleFirebaseAppcheckV1betaBatchUpdateServicesResponse::class);
52  }
53  /**
54   * Gets the Service configuration for the specified service name. (services.get)
55   *
56   * @param string $name Required. The relative resource name of the Service to
57   * retrieve, in the format: ``` projects/{project_number}/services/{service_id}
58   * ``` Note that the `service_id` element must be a supported service ID.
59   * Currently, the following service IDs are supported: *
60   * `firebasestorage.googleapis.com` (Cloud Storage for Firebase) *
61   * `firebasedatabase.googleapis.com` (Firebase Realtime Database) *
62   * `firestore.googleapis.com` (Cloud Firestore)
63   * @param array $optParams Optional parameters.
64   * @return GoogleFirebaseAppcheckV1betaService
65   */
66  public function get($name, $optParams = [])
67  {
68    $params = ['name' => $name];
69    $params = array_merge($params, $optParams);
70    return $this->call('get', [$params], GoogleFirebaseAppcheckV1betaService::class);
71  }
72  /**
73   * Lists all Service configurations for the specified project. Only Services
74   * which were explicitly configured using UpdateService or BatchUpdateServices
75   * will be returned. (services.listProjectsServices)
76   *
77   * @param string $parent Required. The relative resource name of the parent
78   * project for which to list each associated Service, in the format: ```
79   * projects/{project_number} ```
80   * @param array $optParams Optional parameters.
81   *
82   * @opt_param int pageSize The maximum number of Services to return in the
83   * response. Only explicitly configured services are returned. The server may
84   * return fewer than this at its own discretion. If no value is specified (or
85   * too large a value is specified), the server will impose its own limit.
86   * @opt_param string pageToken Token returned from a previous call to
87   * ListServices indicating where in the set of Services to resume listing.
88   * Provide this to retrieve the subsequent page. When paginating, all other
89   * parameters provided to ListServices must match the call that provided the
90   * page token; if they do not match, the result is undefined.
91   * @return GoogleFirebaseAppcheckV1betaListServicesResponse
92   */
93  public function listProjectsServices($parent, $optParams = [])
94  {
95    $params = ['parent' => $parent];
96    $params = array_merge($params, $optParams);
97    return $this->call('list', [$params], GoogleFirebaseAppcheckV1betaListServicesResponse::class);
98  }
99  /**
100   * Updates the specified Service configuration. (services.patch)
101   *
102   * @param string $name Required. The relative resource name of the service
103   * configuration object, in the format: ```
104   * projects/{project_number}/services/{service_id} ``` Note that the
105   * `service_id` element must be a supported service ID. Currently, the following
106   * service IDs are supported: * `firebasestorage.googleapis.com` (Cloud Storage
107   * for Firebase) * `firebasedatabase.googleapis.com` (Firebase Realtime
108   * Database) * `firestore.googleapis.com` (Cloud Firestore)
109   * @param GoogleFirebaseAppcheckV1betaService $postBody
110   * @param array $optParams Optional parameters.
111   *
112   * @opt_param string updateMask Required. A comma-separated list of names of
113   * fields in the Service to update. Example: `enforcement_mode`.
114   * @return GoogleFirebaseAppcheckV1betaService
115   */
116  public function patch($name, GoogleFirebaseAppcheckV1betaService $postBody, $optParams = [])
117  {
118    $params = ['name' => $name, 'postBody' => $postBody];
119    $params = array_merge($params, $optParams);
120    return $this->call('patch', [$params], GoogleFirebaseAppcheckV1betaService::class);
121  }
122}
123
124// Adding a class alias for backwards compatibility with the previous class name.
125class_alias(ProjectsServices::class, 'Google_Service_Firebaseappcheck_Resource_ProjectsServices');
126