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\Baremetalsolution\Resource;
19
20use Google\Service\Baremetalsolution\ProvisioningConfig;
21use Google\Service\Baremetalsolution\SubmitProvisioningConfigRequest;
22use Google\Service\Baremetalsolution\SubmitProvisioningConfigResponse;
23
24/**
25 * The "provisioningConfigs" collection of methods.
26 * Typical usage is:
27 *  <code>
28 *   $baremetalsolutionService = new Google\Service\Baremetalsolution(...);
29 *   $provisioningConfigs = $baremetalsolutionService->provisioningConfigs;
30 *  </code>
31 */
32class ProjectsLocationsProvisioningConfigs extends \Google\Service\Resource
33{
34  /**
35   * Create new ProvisioningConfig. (provisioningConfigs.create)
36   *
37   * @param string $parent Required. The parent project and location containing
38   * the ProvisioningConfig.
39   * @param ProvisioningConfig $postBody
40   * @param array $optParams Optional parameters.
41   *
42   * @opt_param string email Optional. Email provided to send a confirmation with
43   * provisioning config to.
44   * @return ProvisioningConfig
45   */
46  public function create($parent, ProvisioningConfig $postBody, $optParams = [])
47  {
48    $params = ['parent' => $parent, 'postBody' => $postBody];
49    $params = array_merge($params, $optParams);
50    return $this->call('create', [$params], ProvisioningConfig::class);
51  }
52  /**
53   * Get ProvisioningConfig by name. (provisioningConfigs.get)
54   *
55   * @param string $name Required. Name of the ProvisioningConfig.
56   * @param array $optParams Optional parameters.
57   * @return ProvisioningConfig
58   */
59  public function get($name, $optParams = [])
60  {
61    $params = ['name' => $name];
62    $params = array_merge($params, $optParams);
63    return $this->call('get', [$params], ProvisioningConfig::class);
64  }
65  /**
66   * Update existing ProvisioningConfig. (provisioningConfigs.patch)
67   *
68   * @param string $name Output only. The name of the provisioning config.
69   * @param ProvisioningConfig $postBody
70   * @param array $optParams Optional parameters.
71   *
72   * @opt_param string email Optional. Email provided to send a confirmation with
73   * provisioning config to.
74   * @opt_param string updateMask Required. The list of fields to update.
75   * @return ProvisioningConfig
76   */
77  public function patch($name, ProvisioningConfig $postBody, $optParams = [])
78  {
79    $params = ['name' => $name, 'postBody' => $postBody];
80    $params = array_merge($params, $optParams);
81    return $this->call('patch', [$params], ProvisioningConfig::class);
82  }
83  /**
84   * Submit a provisiong configuration for a given project.
85   * (provisioningConfigs.submit)
86   *
87   * @param string $parent Required. The parent project and location containing
88   * the ProvisioningConfig.
89   * @param SubmitProvisioningConfigRequest $postBody
90   * @param array $optParams Optional parameters.
91   * @return SubmitProvisioningConfigResponse
92   */
93  public function submit($parent, SubmitProvisioningConfigRequest $postBody, $optParams = [])
94  {
95    $params = ['parent' => $parent, 'postBody' => $postBody];
96    $params = array_merge($params, $optParams);
97    return $this->call('submit', [$params], SubmitProvisioningConfigResponse::class);
98  }
99}
100
101// Adding a class alias for backwards compatibility with the previous class name.
102class_alias(ProjectsLocationsProvisioningConfigs::class, 'Google_Service_Baremetalsolution_Resource_ProjectsLocationsProvisioningConfigs');
103