[e3d4e0a] | 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 |
|
---|
| 18 | namespace Google\Service\Apigee\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\Apigee\GoogleApiHttpBody;
|
---|
| 21 | use Google\Service\Apigee\GoogleCloudApigeeV1ListSharedFlowsResponse;
|
---|
| 22 | use Google\Service\Apigee\GoogleCloudApigeeV1SharedFlow;
|
---|
| 23 | use 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->organizations_sharedflows;
|
---|
| 31 | * </code>
|
---|
| 32 | */
|
---|
| 33 | class 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 | * @throws \Google\Service\Exception
|
---|
| 53 | */
|
---|
| 54 | public function create($parent, GoogleApiHttpBody $postBody, $optParams = [])
|
---|
| 55 | {
|
---|
| 56 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
| 57 | $params = array_merge($params, $optParams);
|
---|
| 58 | return $this->call('create', [$params], GoogleCloudApigeeV1SharedFlowRevision::class);
|
---|
| 59 | }
|
---|
| 60 | /**
|
---|
| 61 | * Deletes a shared flow and all it's revisions. The shared flow must be
|
---|
| 62 | * undeployed before you can delete it. (sharedflows.delete)
|
---|
| 63 | *
|
---|
| 64 | * @param string $name Required. shared flow name of the form:
|
---|
| 65 | * `organizations/{organization_id}/sharedflows/{shared_flow_id}`
|
---|
| 66 | * @param array $optParams Optional parameters.
|
---|
| 67 | * @return GoogleCloudApigeeV1SharedFlow
|
---|
| 68 | * @throws \Google\Service\Exception
|
---|
| 69 | */
|
---|
| 70 | public function delete($name, $optParams = [])
|
---|
| 71 | {
|
---|
| 72 | $params = ['name' => $name];
|
---|
| 73 | $params = array_merge($params, $optParams);
|
---|
| 74 | return $this->call('delete', [$params], GoogleCloudApigeeV1SharedFlow::class);
|
---|
| 75 | }
|
---|
| 76 | /**
|
---|
| 77 | * Gets a shared flow by name, including a list of its revisions.
|
---|
| 78 | * (sharedflows.get)
|
---|
| 79 | *
|
---|
| 80 | * @param string $name Required. The name of the shared flow to get. Must be of
|
---|
| 81 | * the form: `organizations/{organization_id}/sharedflows/{shared_flow_id}`
|
---|
| 82 | * @param array $optParams Optional parameters.
|
---|
| 83 | * @return GoogleCloudApigeeV1SharedFlow
|
---|
| 84 | * @throws \Google\Service\Exception
|
---|
| 85 | */
|
---|
| 86 | public function get($name, $optParams = [])
|
---|
| 87 | {
|
---|
| 88 | $params = ['name' => $name];
|
---|
| 89 | $params = array_merge($params, $optParams);
|
---|
| 90 | return $this->call('get', [$params], GoogleCloudApigeeV1SharedFlow::class);
|
---|
| 91 | }
|
---|
| 92 | /**
|
---|
| 93 | * Lists all shared flows in the organization.
|
---|
| 94 | * (sharedflows.listOrganizationsSharedflows)
|
---|
| 95 | *
|
---|
| 96 | * @param string $parent Required. The name of the parent organization under
|
---|
| 97 | * which to get shared flows. Must be of the form:
|
---|
| 98 | * `organizations/{organization_id}`
|
---|
| 99 | * @param array $optParams Optional parameters.
|
---|
| 100 | *
|
---|
| 101 | * @opt_param bool includeMetaData Indicates whether to include shared flow
|
---|
| 102 | * metadata in the response.
|
---|
| 103 | * @opt_param bool includeRevisions Indicates whether to include a list of
|
---|
| 104 | * revisions in the response.
|
---|
| 105 | * @return GoogleCloudApigeeV1ListSharedFlowsResponse
|
---|
| 106 | * @throws \Google\Service\Exception
|
---|
| 107 | */
|
---|
| 108 | public function listOrganizationsSharedflows($parent, $optParams = [])
|
---|
| 109 | {
|
---|
| 110 | $params = ['parent' => $parent];
|
---|
| 111 | $params = array_merge($params, $optParams);
|
---|
| 112 | return $this->call('list', [$params], GoogleCloudApigeeV1ListSharedFlowsResponse::class);
|
---|
| 113 | }
|
---|
| 114 | }
|
---|
| 115 |
|
---|
| 116 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 117 | class_alias(OrganizationsSharedflows::class, 'Google_Service_Apigee_Resource_OrganizationsSharedflows');
|
---|