source: vendor/google/apiclient-services/src/Config/Resource/ProjectsLocationsPreviews.php@ e3d4e0a

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

Upload project files

  • Property mode set to 100644
File size: 7.3 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\Config\Resource;
19
20use Google\Service\Config\ExportPreviewResultRequest;
21use Google\Service\Config\ExportPreviewResultResponse;
22use Google\Service\Config\ListPreviewsResponse;
23use Google\Service\Config\Operation;
24use Google\Service\Config\Preview;
25
26/**
27 * The "previews" collection of methods.
28 * Typical usage is:
29 * <code>
30 * $configService = new Google\Service\Config(...);
31 * $previews = $configService->projects_locations_previews;
32 * </code>
33 */
34class ProjectsLocationsPreviews extends \Google\Service\Resource
35{
36 /**
37 * Creates a Preview. (previews.create)
38 *
39 * @param string $parent Required. The parent in whose context the Preview is
40 * created. The parent value is in the format:
41 * 'projects/{project_id}/locations/{location}'.
42 * @param Preview $postBody
43 * @param array $optParams Optional parameters.
44 *
45 * @opt_param string previewId Optional. The preview ID.
46 * @opt_param string requestId Optional. An optional request ID to identify
47 * requests. Specify a unique request ID so that if you must retry your request,
48 * the server will know to ignore the request if it has already been completed.
49 * The server will guarantee that for at least 60 minutes since the first
50 * request. For example, consider a situation where you make an initial request
51 * and the request times out. If you make the request again with the same
52 * request ID, the server can check if original operation with the same request
53 * ID was received, and if so, will ignore the second request. This prevents
54 * clients from accidentally creating duplicate commitments. The request ID must
55 * be a valid UUID with the exception that zero UUID is not supported
56 * (00000000-0000-0000-0000-000000000000).
57 * @return Operation
58 * @throws \Google\Service\Exception
59 */
60 public function create($parent, Preview $postBody, $optParams = [])
61 {
62 $params = ['parent' => $parent, 'postBody' => $postBody];
63 $params = array_merge($params, $optParams);
64 return $this->call('create', [$params], Operation::class);
65 }
66 /**
67 * Deletes a Preview. (previews.delete)
68 *
69 * @param string $name Required. The name of the Preview in the format:
70 * 'projects/{project_id}/locations/{location}/previews/{preview}'.
71 * @param array $optParams Optional parameters.
72 *
73 * @opt_param string requestId Optional. An optional request ID to identify
74 * requests. Specify a unique request ID so that if you must retry your request,
75 * the server will know to ignore the request if it has already been completed.
76 * The server will guarantee that for at least 60 minutes after the first
77 * request. For example, consider a situation where you make an initial request
78 * and the request times out. If you make the request again with the same
79 * request ID, the server can check if original operation with the same request
80 * ID was received, and if so, will ignore the second request. This prevents
81 * clients from accidentally creating duplicate commitments. The request ID must
82 * be a valid UUID with the exception that zero UUID is not supported
83 * (00000000-0000-0000-0000-000000000000).
84 * @return Operation
85 * @throws \Google\Service\Exception
86 */
87 public function delete($name, $optParams = [])
88 {
89 $params = ['name' => $name];
90 $params = array_merge($params, $optParams);
91 return $this->call('delete', [$params], Operation::class);
92 }
93 /**
94 * Export Preview results. (previews.export)
95 *
96 * @param string $parent Required. The preview whose results should be exported.
97 * The preview value is in the format:
98 * 'projects/{project_id}/locations/{location}/previews/{preview}'.
99 * @param ExportPreviewResultRequest $postBody
100 * @param array $optParams Optional parameters.
101 * @return ExportPreviewResultResponse
102 * @throws \Google\Service\Exception
103 */
104 public function export($parent, ExportPreviewResultRequest $postBody, $optParams = [])
105 {
106 $params = ['parent' => $parent, 'postBody' => $postBody];
107 $params = array_merge($params, $optParams);
108 return $this->call('export', [$params], ExportPreviewResultResponse::class);
109 }
110 /**
111 * Gets details about a Preview. (previews.get)
112 *
113 * @param string $name Required. The name of the preview. Format:
114 * 'projects/{project_id}/locations/{location}/previews/{preview}'.
115 * @param array $optParams Optional parameters.
116 * @return Preview
117 * @throws \Google\Service\Exception
118 */
119 public function get($name, $optParams = [])
120 {
121 $params = ['name' => $name];
122 $params = array_merge($params, $optParams);
123 return $this->call('get', [$params], Preview::class);
124 }
125 /**
126 * Lists Previews in a given project and location.
127 * (previews.listProjectsLocationsPreviews)
128 *
129 * @param string $parent Required. The parent in whose context the Previews are
130 * listed. The parent value is in the format:
131 * 'projects/{project_id}/locations/{location}'.
132 * @param array $optParams Optional parameters.
133 *
134 * @opt_param string filter Optional. Lists the Deployments that match the
135 * filter expression. A filter expression filters the resources listed in the
136 * response. The expression must be of the form '{field} {operator} {value}'
137 * where operators: '<', '>', '<=', '>=', '!=', '=', ':' are supported (colon
138 * ':' represents a HAS operator which is roughly synonymous with equality).
139 * {field} can refer to a proto or JSON field, or a synthetic field. Field names
140 * can be camelCase or snake_case. Examples: - Filter by name: name =
141 * "projects/foo/locations/us-central1/deployments/bar - Filter by labels: -
142 * Resources that have a key called 'foo' labels.foo:* - Resources that have a
143 * key called 'foo' whose value is 'bar' labels.foo = bar - Filter by state: -
144 * Deployments in CREATING state. state=CREATING
145 * @opt_param string orderBy Optional. Field to use to sort the list.
146 * @opt_param int pageSize Optional. When requesting a page of resources,
147 * 'page_size' specifies number of resources to return. If unspecified, at most
148 * 500 will be returned. The maximum value is 1000.
149 * @opt_param string pageToken Optional. Token returned by previous call to
150 * 'ListDeployments' which specifies the position in the list from where to
151 * continue listing the resources.
152 * @return ListPreviewsResponse
153 * @throws \Google\Service\Exception
154 */
155 public function listProjectsLocationsPreviews($parent, $optParams = [])
156 {
157 $params = ['parent' => $parent];
158 $params = array_merge($params, $optParams);
159 return $this->call('list', [$params], ListPreviewsResponse::class);
160 }
161}
162
163// Adding a class alias for backwards compatibility with the previous class name.
164class_alias(ProjectsLocationsPreviews::class, 'Google_Service_Config_Resource_ProjectsLocationsPreviews');
Note: See TracBrowser for help on using the repository browser.