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\GoogleCloudApigeeV1ListSharedFlowsResponse; 22use Google\Service\Apigee\GoogleCloudApigeeV1SharedFlow; 23use Google\Service\Apigee\GoogleCloudApigeeV1SharedFlowRevision; 24 25/** 26 * The "sharedflows" collection of methods. 27 * Typical usage is: 28 * <code> 29 * $apigeeService = new Google\Service\Apigee(...); 30 * $sharedflows = $apigeeService->sharedflows; 31 * </code> 32 */ 33class OrganizationsSharedflows extends \Google\Service\Resource 34{ 35 /** 36 * Uploads a ZIP-formatted shared flow configuration bundle to an organization. 37 * If the shared flow already exists, this creates a new revision of it. If the 38 * shared flow does not exist, this creates it. Once imported, the shared flow 39 * revision must be deployed before it can be accessed at runtime. The size 40 * limit of a shared flow bundle is 15 MB. (sharedflows.create) 41 * 42 * @param string $parent Required. The name of the parent organization under 43 * which to create the shared flow. Must be of the form: 44 * `organizations/{organization_id}` 45 * @param GoogleApiHttpBody $postBody 46 * @param array $optParams Optional parameters. 47 * 48 * @opt_param string action Required. Must be set to either `import` or 49 * `validate`. 50 * @opt_param string name Required. The name to give the shared flow 51 * @return GoogleCloudApigeeV1SharedFlowRevision 52 */ 53 public function create($parent, GoogleApiHttpBody $postBody, $optParams = []) 54 { 55 $params = ['parent' => $parent, 'postBody' => $postBody]; 56 $params = array_merge($params, $optParams); 57 return $this->call('create', [$params], GoogleCloudApigeeV1SharedFlowRevision::class); 58 } 59 /** 60 * Deletes a shared flow and all it's revisions. The shared flow must be 61 * undeployed before you can delete it. (sharedflows.delete) 62 * 63 * @param string $name Required. shared flow name of the form: 64 * `organizations/{organization_id}/sharedflows/{shared_flow_id}` 65 * @param array $optParams Optional parameters. 66 * @return GoogleCloudApigeeV1SharedFlow 67 */ 68 public function delete($name, $optParams = []) 69 { 70 $params = ['name' => $name]; 71 $params = array_merge($params, $optParams); 72 return $this->call('delete', [$params], GoogleCloudApigeeV1SharedFlow::class); 73 } 74 /** 75 * Gets a shared flow by name, including a list of its revisions. 76 * (sharedflows.get) 77 * 78 * @param string $name Required. The name of the shared flow to get. Must be of 79 * the form: `organizations/{organization_id}/sharedflows/{shared_flow_id}` 80 * @param array $optParams Optional parameters. 81 * @return GoogleCloudApigeeV1SharedFlow 82 */ 83 public function get($name, $optParams = []) 84 { 85 $params = ['name' => $name]; 86 $params = array_merge($params, $optParams); 87 return $this->call('get', [$params], GoogleCloudApigeeV1SharedFlow::class); 88 } 89 /** 90 * Lists all shared flows in the organization. 91 * (sharedflows.listOrganizationsSharedflows) 92 * 93 * @param string $parent Required. The name of the parent organization under 94 * which to get shared flows. Must be of the form: 95 * `organizations/{organization_id}` 96 * @param array $optParams Optional parameters. 97 * 98 * @opt_param bool includeMetaData Indicates whether to include shared flow 99 * metadata in the response. 100 * @opt_param bool includeRevisions Indicates whether to include a list of 101 * revisions in the response. 102 * @return GoogleCloudApigeeV1ListSharedFlowsResponse 103 */ 104 public function listOrganizationsSharedflows($parent, $optParams = []) 105 { 106 $params = ['parent' => $parent]; 107 $params = array_merge($params, $optParams); 108 return $this->call('list', [$params], GoogleCloudApigeeV1ListSharedFlowsResponse::class); 109 } 110} 111 112// Adding a class alias for backwards compatibility with the previous class name. 113class_alias(OrganizationsSharedflows::class, 'Google_Service_Apigee_Resource_OrganizationsSharedflows'); 114