source: vendor/google/apiclient-services/src/Apigee/Resource/OrganizationsEnvironmentsArchiveDeployments.php

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

Upload project files

  • Property mode set to 100644
File size: 8.1 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\Apigee\Resource;
19
20use Google\Service\Apigee\GoogleCloudApigeeV1ArchiveDeployment;
21use Google\Service\Apigee\GoogleCloudApigeeV1GenerateDownloadUrlRequest;
22use Google\Service\Apigee\GoogleCloudApigeeV1GenerateDownloadUrlResponse;
23use Google\Service\Apigee\GoogleCloudApigeeV1GenerateUploadUrlRequest;
24use Google\Service\Apigee\GoogleCloudApigeeV1GenerateUploadUrlResponse;
25use Google\Service\Apigee\GoogleCloudApigeeV1ListArchiveDeploymentsResponse;
26use Google\Service\Apigee\GoogleLongrunningOperation;
27use Google\Service\Apigee\GoogleProtobufEmpty;
28
29/**
30 * The "archiveDeployments" collection of methods.
31 * Typical usage is:
32 * <code>
33 * $apigeeService = new Google\Service\Apigee(...);
34 * $archiveDeployments = $apigeeService->organizations_environments_archiveDeployments;
35 * </code>
36 */
37class OrganizationsEnvironmentsArchiveDeployments extends \Google\Service\Resource
38{
39 /**
40 * Creates a new ArchiveDeployment. (archiveDeployments.create)
41 *
42 * @param string $parent Required. The Environment this Archive Deployment will
43 * be created in.
44 * @param GoogleCloudApigeeV1ArchiveDeployment $postBody
45 * @param array $optParams Optional parameters.
46 * @return GoogleLongrunningOperation
47 * @throws \Google\Service\Exception
48 */
49 public function create($parent, GoogleCloudApigeeV1ArchiveDeployment $postBody, $optParams = [])
50 {
51 $params = ['parent' => $parent, 'postBody' => $postBody];
52 $params = array_merge($params, $optParams);
53 return $this->call('create', [$params], GoogleLongrunningOperation::class);
54 }
55 /**
56 * Deletes an archive deployment. (archiveDeployments.delete)
57 *
58 * @param string $name Required. Name of the Archive Deployment in the following
59 * format: `organizations/{org}/environments/{env}/archiveDeployments/{id}`.
60 * @param array $optParams Optional parameters.
61 * @return GoogleProtobufEmpty
62 * @throws \Google\Service\Exception
63 */
64 public function delete($name, $optParams = [])
65 {
66 $params = ['name' => $name];
67 $params = array_merge($params, $optParams);
68 return $this->call('delete', [$params], GoogleProtobufEmpty::class);
69 }
70 /**
71 * Generates a signed URL for downloading the original zip file used to create
72 * an Archive Deployment. The URL is only valid for a limited period and should
73 * be used within minutes after generation. Each call returns a new upload URL.
74 * (archiveDeployments.generateDownloadUrl)
75 *
76 * @param string $name Required. The name of the Archive Deployment you want to
77 * download.
78 * @param GoogleCloudApigeeV1GenerateDownloadUrlRequest $postBody
79 * @param array $optParams Optional parameters.
80 * @return GoogleCloudApigeeV1GenerateDownloadUrlResponse
81 * @throws \Google\Service\Exception
82 */
83 public function generateDownloadUrl($name, GoogleCloudApigeeV1GenerateDownloadUrlRequest $postBody, $optParams = [])
84 {
85 $params = ['name' => $name, 'postBody' => $postBody];
86 $params = array_merge($params, $optParams);
87 return $this->call('generateDownloadUrl', [$params], GoogleCloudApigeeV1GenerateDownloadUrlResponse::class);
88 }
89 /**
90 * Generates a signed URL for uploading an Archive zip file to Google Cloud
91 * Storage. Once the upload is complete, the signed URL should be passed to
92 * CreateArchiveDeployment. When uploading to the generated signed URL, please
93 * follow these restrictions: * Source file type should be a zip file. * Source
94 * file size should not exceed 1GB limit. * No credentials should be attached -
95 * the signed URLs provide access to the target bucket using internal service
96 * identity; if credentials were attached, the identity from the credentials
97 * would be used, but that identity does not have permissions to upload files to
98 * the URL. When making a HTTP PUT request, these two headers need to be
99 * specified: * `content-type: application/zip` * `x-goog-content-length-range:
100 * 0,1073741824` And this header SHOULD NOT be specified: * `Authorization:
101 * Bearer YOUR_TOKEN` (archiveDeployments.generateUploadUrl)
102 *
103 * @param string $parent Required. The organization and environment to upload
104 * to.
105 * @param GoogleCloudApigeeV1GenerateUploadUrlRequest $postBody
106 * @param array $optParams Optional parameters.
107 * @return GoogleCloudApigeeV1GenerateUploadUrlResponse
108 * @throws \Google\Service\Exception
109 */
110 public function generateUploadUrl($parent, GoogleCloudApigeeV1GenerateUploadUrlRequest $postBody, $optParams = [])
111 {
112 $params = ['parent' => $parent, 'postBody' => $postBody];
113 $params = array_merge($params, $optParams);
114 return $this->call('generateUploadUrl', [$params], GoogleCloudApigeeV1GenerateUploadUrlResponse::class);
115 }
116 /**
117 * Gets the specified ArchiveDeployment. (archiveDeployments.get)
118 *
119 * @param string $name Required. Name of the Archive Deployment in the following
120 * format: `organizations/{org}/environments/{env}/archiveDeployments/{id}`.
121 * @param array $optParams Optional parameters.
122 * @return GoogleCloudApigeeV1ArchiveDeployment
123 * @throws \Google\Service\Exception
124 */
125 public function get($name, $optParams = [])
126 {
127 $params = ['name' => $name];
128 $params = array_merge($params, $optParams);
129 return $this->call('get', [$params], GoogleCloudApigeeV1ArchiveDeployment::class);
130 }
131 /**
132 * Lists the ArchiveDeployments in the specified Environment.
133 * (archiveDeployments.listOrganizationsEnvironmentsArchiveDeployments)
134 *
135 * @param string $parent Required. Name of the Environment for which to list
136 * Archive Deployments in the format: `organizations/{org}/environments/{env}`.
137 * @param array $optParams Optional parameters.
138 *
139 * @opt_param string filter Optional. An optional query used to return a subset
140 * of Archive Deployments using the semantics defined in
141 * https://google.aip.dev/160.
142 * @opt_param int pageSize Optional. Maximum number of Archive Deployments to
143 * return. If unspecified, at most 25 deployments will be returned.
144 * @opt_param string pageToken Optional. Page token, returned from a previous
145 * ListArchiveDeployments call, that you can use to retrieve the next page.
146 * @return GoogleCloudApigeeV1ListArchiveDeploymentsResponse
147 * @throws \Google\Service\Exception
148 */
149 public function listOrganizationsEnvironmentsArchiveDeployments($parent, $optParams = [])
150 {
151 $params = ['parent' => $parent];
152 $params = array_merge($params, $optParams);
153 return $this->call('list', [$params], GoogleCloudApigeeV1ListArchiveDeploymentsResponse::class);
154 }
155 /**
156 * Updates an existing ArchiveDeployment. Labels can modified but most of the
157 * other fields are not modifiable. (archiveDeployments.patch)
158 *
159 * @param string $name Name of the Archive Deployment in the following format:
160 * `organizations/{org}/environments/{env}/archiveDeployments/{id}`.
161 * @param GoogleCloudApigeeV1ArchiveDeployment $postBody
162 * @param array $optParams Optional parameters.
163 *
164 * @opt_param string updateMask Required. The list of fields to be updated.
165 * @return GoogleCloudApigeeV1ArchiveDeployment
166 * @throws \Google\Service\Exception
167 */
168 public function patch($name, GoogleCloudApigeeV1ArchiveDeployment $postBody, $optParams = [])
169 {
170 $params = ['name' => $name, 'postBody' => $postBody];
171 $params = array_merge($params, $optParams);
172 return $this->call('patch', [$params], GoogleCloudApigeeV1ArchiveDeployment::class);
173 }
174}
175
176// Adding a class alias for backwards compatibility with the previous class name.
177class_alias(OrganizationsEnvironmentsArchiveDeployments::class, 'Google_Service_Apigee_Resource_OrganizationsEnvironmentsArchiveDeployments');
Note: See TracBrowser for help on using the repository browser.