source: vendor/google/apiclient-services/src/ServiceManagement/Resource/ServicesConfigs.php

Last change on this file was e3d4e0a, checked in by Vlado 222039 <vlado.popovski@…>, 12 days ago

Upload project files

  • Property mode set to 100644
File size: 5.5 KB
Line 
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\ServiceManagement\Resource;
19
20use Google\Service\ServiceManagement\ListServiceConfigsResponse;
21use Google\Service\ServiceManagement\Operation;
22use Google\Service\ServiceManagement\Service;
23use Google\Service\ServiceManagement\SubmitConfigSourceRequest;
24
25/**
26 * The "configs" collection of methods.
27 * Typical usage is:
28 * <code>
29 * $servicemanagementService = new Google\Service\ServiceManagement(...);
30 * $configs = $servicemanagementService->services_configs;
31 * </code>
32 */
33class ServicesConfigs extends \Google\Service\Resource
34{
35 /**
36 * Creates a new service configuration (version) for a managed service. This
37 * method only stores the service configuration. To roll out the service
38 * configuration to backend systems please call CreateServiceRollout. Only the
39 * 100 most recent service configurations and ones referenced by existing
40 * rollouts are kept for each service. The rest will be deleted eventually.
41 * (configs.create)
42 *
43 * @param string $serviceName Required. The name of the service. See the
44 * [overview](https://cloud.google.com/service-management/overview) for naming
45 * requirements. For example: `example.googleapis.com`.
46 * @param Service $postBody
47 * @param array $optParams Optional parameters.
48 * @return Service
49 * @throws \Google\Service\Exception
50 */
51 public function create($serviceName, Service $postBody, $optParams = [])
52 {
53 $params = ['serviceName' => $serviceName, 'postBody' => $postBody];
54 $params = array_merge($params, $optParams);
55 return $this->call('create', [$params], Service::class);
56 }
57 /**
58 * Gets a service configuration (version) for a managed service. (configs.get)
59 *
60 * @param string $serviceName Required. The name of the service. See the
61 * [overview](https://cloud.google.com/service-management/overview) for naming
62 * requirements. For example: `example.googleapis.com`.
63 * @param string $configId Required. The id of the service configuration
64 * resource. This field must be specified for the server to return all fields,
65 * including `SourceInfo`.
66 * @param array $optParams Optional parameters.
67 *
68 * @opt_param string view Specifies which parts of the Service Config should be
69 * returned in the response.
70 * @return Service
71 * @throws \Google\Service\Exception
72 */
73 public function get($serviceName, $configId, $optParams = [])
74 {
75 $params = ['serviceName' => $serviceName, 'configId' => $configId];
76 $params = array_merge($params, $optParams);
77 return $this->call('get', [$params], Service::class);
78 }
79 /**
80 * Lists the history of the service configuration for a managed service, from
81 * the newest to the oldest. (configs.listServicesConfigs)
82 *
83 * @param string $serviceName Required. The name of the service. See the
84 * [overview](https://cloud.google.com/service-management/overview) for naming
85 * requirements. For example: `example.googleapis.com`.
86 * @param array $optParams Optional parameters.
87 *
88 * @opt_param int pageSize The max number of items to include in the response
89 * list. Page size is 50 if not specified. Maximum value is 100.
90 * @opt_param string pageToken The token of the page to retrieve.
91 * @return ListServiceConfigsResponse
92 * @throws \Google\Service\Exception
93 */
94 public function listServicesConfigs($serviceName, $optParams = [])
95 {
96 $params = ['serviceName' => $serviceName];
97 $params = array_merge($params, $optParams);
98 return $this->call('list', [$params], ListServiceConfigsResponse::class);
99 }
100 /**
101 * Creates a new service configuration (version) for a managed service based on
102 * user-supplied configuration source files (for example: OpenAPI
103 * Specification). This method stores the source configurations as well as the
104 * generated service configuration. To rollout the service configuration to
105 * other services, please call CreateServiceRollout. Only the 100 most recent
106 * configuration sources and ones referenced by existing service configurtions
107 * are kept for each service. The rest will be deleted eventually. Operation
108 * (configs.submit)
109 *
110 * @param string $serviceName Required. The name of the service. See the
111 * [overview](https://cloud.google.com/service-management/overview) for naming
112 * requirements. For example: `example.googleapis.com`.
113 * @param SubmitConfigSourceRequest $postBody
114 * @param array $optParams Optional parameters.
115 * @return Operation
116 * @throws \Google\Service\Exception
117 */
118 public function submit($serviceName, SubmitConfigSourceRequest $postBody, $optParams = [])
119 {
120 $params = ['serviceName' => $serviceName, 'postBody' => $postBody];
121 $params = array_merge($params, $optParams);
122 return $this->call('submit', [$params], Operation::class);
123 }
124}
125
126// Adding a class alias for backwards compatibility with the previous class name.
127class_alias(ServicesConfigs::class, 'Google_Service_ServiceManagement_Resource_ServicesConfigs');
Note: See TracBrowser for help on using the repository browser.