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\GoogleApiHttpBody; 21use Google\Service\Apigee\GoogleCloudApigeeV1SharedFlowRevision; 22 23/** 24 * The "revisions" collection of methods. 25 * Typical usage is: 26 * <code> 27 * $apigeeService = new Google\Service\Apigee(...); 28 * $revisions = $apigeeService->revisions; 29 * </code> 30 */ 31class OrganizationsSharedflowsRevisions extends \Google\Service\Resource 32{ 33 /** 34 * Deletes a shared flow and all associated policies, resources, and revisions. 35 * You must undeploy the shared flow before deleting it. (revisions.delete) 36 * 37 * @param string $name Required. The name of the shared flow revision to delete. 38 * Must be of the form: `organizations/{organization_id}/sharedflows/{shared_flo 39 * w_id}/revisions/{revision_id}` 40 * @param array $optParams Optional parameters. 41 * @return GoogleCloudApigeeV1SharedFlowRevision 42 */ 43 public function delete($name, $optParams = []) 44 { 45 $params = ['name' => $name]; 46 $params = array_merge($params, $optParams); 47 return $this->call('delete', [$params], GoogleCloudApigeeV1SharedFlowRevision::class); 48 } 49 /** 50 * Gets a revision of a shared flow. To download the shared flow configuration 51 * bundle for the specified revision as a zip file, set the `format` query 52 * parameter to `bundle`. If you are using curl, specify `-o filename.zip` to 53 * save the output to a file; otherwise, it displays to `stdout`. Then, develop 54 * the shared flow configuration locally and upload the updated sharedFlow 55 * configuration revision, as described in 56 * [updateSharedFlowRevision](updateSharedFlowRevision). (revisions.get) 57 * 58 * @param string $name Required. The name of the shared flow revision to get. 59 * Must be of the form: `organizations/{organization_id}/sharedflows/{shared_flo 60 * w_id}/revisions/{revision_id}` 61 * @param array $optParams Optional parameters. 62 * 63 * @opt_param string format Specify `bundle` to export the contents of the 64 * shared flow bundle. Otherwise, the bundle metadata is returned. 65 * @return GoogleApiHttpBody 66 */ 67 public function get($name, $optParams = []) 68 { 69 $params = ['name' => $name]; 70 $params = array_merge($params, $optParams); 71 return $this->call('get', [$params], GoogleApiHttpBody::class); 72 } 73 /** 74 * Updates a shared flow revision. This operation is only allowed on revisions 75 * which have never been deployed. After deployment a revision becomes 76 * immutable, even if it becomes undeployed. The payload is a ZIP-formatted 77 * shared flow. Content type must be either multipart/form-data or application 78 * /octet-stream. (revisions.updateSharedFlowRevision) 79 * 80 * @param string $name Required. The name of the shared flow revision to update. 81 * Must be of the form: `organizations/{organization_id}/sharedflows/{shared_flo 82 * w_id}/revisions/{revision_id}` 83 * @param GoogleApiHttpBody $postBody 84 * @param array $optParams Optional parameters. 85 * 86 * @opt_param bool validate Ignored. All uploads are validated regardless of the 87 * value of this field. It is kept for compatibility with existing APIs. Must be 88 * `true` or `false` if provided. 89 * @return GoogleCloudApigeeV1SharedFlowRevision 90 */ 91 public function updateSharedFlowRevision($name, GoogleApiHttpBody $postBody, $optParams = []) 92 { 93 $params = ['name' => $name, 'postBody' => $postBody]; 94 $params = array_merge($params, $optParams); 95 return $this->call('updateSharedFlowRevision', [$params], GoogleCloudApigeeV1SharedFlowRevision::class); 96 } 97} 98 99// Adding a class alias for backwards compatibility with the previous class name. 100class_alias(OrganizationsSharedflowsRevisions::class, 'Google_Service_Apigee_Resource_OrganizationsSharedflowsRevisions'); 101