[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\Sasportal\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\Sasportal\SasPortalCustomer;
|
---|
| 21 | use Google\Service\Sasportal\SasPortalListCustomersResponse;
|
---|
| 22 | use Google\Service\Sasportal\SasPortalListGcpProjectDeploymentsResponse;
|
---|
| 23 | use Google\Service\Sasportal\SasPortalListLegacyOrganizationsResponse;
|
---|
| 24 | use Google\Service\Sasportal\SasPortalMigrateOrganizationRequest;
|
---|
| 25 | use Google\Service\Sasportal\SasPortalOperation;
|
---|
| 26 | use Google\Service\Sasportal\SasPortalProvisionDeploymentRequest;
|
---|
| 27 | use Google\Service\Sasportal\SasPortalProvisionDeploymentResponse;
|
---|
| 28 | use Google\Service\Sasportal\SasPortalSetupSasAnalyticsRequest;
|
---|
| 29 |
|
---|
| 30 | /**
|
---|
| 31 | * The "customers" collection of methods.
|
---|
| 32 | * Typical usage is:
|
---|
| 33 | * <code>
|
---|
| 34 | * $sasportalService = new Google\Service\Sasportal(...);
|
---|
| 35 | * $customers = $sasportalService->customers;
|
---|
| 36 | * </code>
|
---|
| 37 | */
|
---|
| 38 | class Customers extends \Google\Service\Resource
|
---|
| 39 | {
|
---|
| 40 | /**
|
---|
| 41 | * Returns a requested customer. (customers.get)
|
---|
| 42 | *
|
---|
| 43 | * @param string $name Required. The name of the customer.
|
---|
| 44 | * @param array $optParams Optional parameters.
|
---|
| 45 | * @return SasPortalCustomer
|
---|
| 46 | * @throws \Google\Service\Exception
|
---|
| 47 | */
|
---|
| 48 | public function get($name, $optParams = [])
|
---|
| 49 | {
|
---|
| 50 | $params = ['name' => $name];
|
---|
| 51 | $params = array_merge($params, $optParams);
|
---|
| 52 | return $this->call('get', [$params], SasPortalCustomer::class);
|
---|
| 53 | }
|
---|
| 54 | /**
|
---|
| 55 | * Returns a list of requested customers. (customers.listCustomers)
|
---|
| 56 | *
|
---|
| 57 | * @param array $optParams Optional parameters.
|
---|
| 58 | *
|
---|
| 59 | * @opt_param int pageSize The maximum number of customers to return in the
|
---|
| 60 | * response.
|
---|
| 61 | * @opt_param string pageToken A pagination token returned from a previous call
|
---|
| 62 | * to ListCustomers that indicates where this listing should continue from.
|
---|
| 63 | * @return SasPortalListCustomersResponse
|
---|
| 64 | * @throws \Google\Service\Exception
|
---|
| 65 | */
|
---|
| 66 | public function listCustomers($optParams = [])
|
---|
| 67 | {
|
---|
| 68 | $params = [];
|
---|
| 69 | $params = array_merge($params, $optParams);
|
---|
| 70 | return $this->call('list', [$params], SasPortalListCustomersResponse::class);
|
---|
| 71 | }
|
---|
| 72 | /**
|
---|
| 73 | * Returns a list of SAS deployments associated with current GCP project.
|
---|
| 74 | * Includes whether SAS analytics has been enabled or not.
|
---|
| 75 | * (customers.listGcpProjectDeployments)
|
---|
| 76 | *
|
---|
| 77 | * @param array $optParams Optional parameters.
|
---|
| 78 | * @return SasPortalListGcpProjectDeploymentsResponse
|
---|
| 79 | * @throws \Google\Service\Exception
|
---|
| 80 | */
|
---|
| 81 | public function listGcpProjectDeployments($optParams = [])
|
---|
| 82 | {
|
---|
| 83 | $params = [];
|
---|
| 84 | $params = array_merge($params, $optParams);
|
---|
| 85 | return $this->call('listGcpProjectDeployments', [$params], SasPortalListGcpProjectDeploymentsResponse::class);
|
---|
| 86 | }
|
---|
| 87 | /**
|
---|
| 88 | * Returns a list of legacy organizations. (customers.listLegacyOrganizations)
|
---|
| 89 | *
|
---|
| 90 | * @param array $optParams Optional parameters.
|
---|
| 91 | * @return SasPortalListLegacyOrganizationsResponse
|
---|
| 92 | * @throws \Google\Service\Exception
|
---|
| 93 | */
|
---|
| 94 | public function listLegacyOrganizations($optParams = [])
|
---|
| 95 | {
|
---|
| 96 | $params = [];
|
---|
| 97 | $params = array_merge($params, $optParams);
|
---|
| 98 | return $this->call('listLegacyOrganizations', [$params], SasPortalListLegacyOrganizationsResponse::class);
|
---|
| 99 | }
|
---|
| 100 | /**
|
---|
| 101 | * Migrates a SAS organization to the cloud. This will create GCP projects for
|
---|
| 102 | * each deployment and associate them. The SAS Organization is linked to the gcp
|
---|
| 103 | * project that called the command. go/sas-legacy-customer-migration
|
---|
| 104 | * (customers.migrateOrganization)
|
---|
| 105 | *
|
---|
| 106 | * @param SasPortalMigrateOrganizationRequest $postBody
|
---|
| 107 | * @param array $optParams Optional parameters.
|
---|
| 108 | * @return SasPortalOperation
|
---|
| 109 | * @throws \Google\Service\Exception
|
---|
| 110 | */
|
---|
| 111 | public function migrateOrganization(SasPortalMigrateOrganizationRequest $postBody, $optParams = [])
|
---|
| 112 | {
|
---|
| 113 | $params = ['postBody' => $postBody];
|
---|
| 114 | $params = array_merge($params, $optParams);
|
---|
| 115 | return $this->call('migrateOrganization', [$params], SasPortalOperation::class);
|
---|
| 116 | }
|
---|
| 117 | /**
|
---|
| 118 | * Updates an existing customer. (customers.patch)
|
---|
| 119 | *
|
---|
| 120 | * @param string $name Output only. Resource name of the customer.
|
---|
| 121 | * @param SasPortalCustomer $postBody
|
---|
| 122 | * @param array $optParams Optional parameters.
|
---|
| 123 | *
|
---|
| 124 | * @opt_param string updateMask Fields to be updated.
|
---|
| 125 | * @return SasPortalCustomer
|
---|
| 126 | * @throws \Google\Service\Exception
|
---|
| 127 | */
|
---|
| 128 | public function patch($name, SasPortalCustomer $postBody, $optParams = [])
|
---|
| 129 | {
|
---|
| 130 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
| 131 | $params = array_merge($params, $optParams);
|
---|
| 132 | return $this->call('patch', [$params], SasPortalCustomer::class);
|
---|
| 133 | }
|
---|
| 134 | /**
|
---|
| 135 | * Creates a new SAS deployment through the GCP workflow. Creates a SAS
|
---|
| 136 | * organization if an organization match is not found.
|
---|
| 137 | * (customers.provisionDeployment)
|
---|
| 138 | *
|
---|
| 139 | * @param SasPortalProvisionDeploymentRequest $postBody
|
---|
| 140 | * @param array $optParams Optional parameters.
|
---|
| 141 | * @return SasPortalProvisionDeploymentResponse
|
---|
| 142 | * @throws \Google\Service\Exception
|
---|
| 143 | */
|
---|
| 144 | public function provisionDeployment(SasPortalProvisionDeploymentRequest $postBody, $optParams = [])
|
---|
| 145 | {
|
---|
| 146 | $params = ['postBody' => $postBody];
|
---|
| 147 | $params = array_merge($params, $optParams);
|
---|
| 148 | return $this->call('provisionDeployment', [$params], SasPortalProvisionDeploymentResponse::class);
|
---|
| 149 | }
|
---|
| 150 | /**
|
---|
| 151 | * Setups the a GCP Project to receive SAS Analytics messages via GCP Pub/Sub
|
---|
| 152 | * with a subscription to BigQuery. All the Pub/Sub topics and BigQuery tables
|
---|
| 153 | * are created automatically as part of this service.
|
---|
| 154 | * (customers.setupSasAnalytics)
|
---|
| 155 | *
|
---|
| 156 | * @param SasPortalSetupSasAnalyticsRequest $postBody
|
---|
| 157 | * @param array $optParams Optional parameters.
|
---|
| 158 | * @return SasPortalOperation
|
---|
| 159 | * @throws \Google\Service\Exception
|
---|
| 160 | */
|
---|
| 161 | public function setupSasAnalytics(SasPortalSetupSasAnalyticsRequest $postBody, $optParams = [])
|
---|
| 162 | {
|
---|
| 163 | $params = ['postBody' => $postBody];
|
---|
| 164 | $params = array_merge($params, $optParams);
|
---|
| 165 | return $this->call('setupSasAnalytics', [$params], SasPortalOperation::class);
|
---|
| 166 | }
|
---|
| 167 | }
|
---|
| 168 |
|
---|
| 169 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 170 | class_alias(Customers::class, 'Google_Service_Sasportal_Resource_Customers');
|
---|