[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\Integrations\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\Integrations\GoogleCloudIntegrationsV1alphaListSfdcInstancesResponse;
|
---|
| 21 | use Google\Service\Integrations\GoogleCloudIntegrationsV1alphaSfdcInstance;
|
---|
| 22 | use Google\Service\Integrations\GoogleProtobufEmpty;
|
---|
| 23 |
|
---|
| 24 | /**
|
---|
| 25 | * The "sfdcInstances" collection of methods.
|
---|
| 26 | * Typical usage is:
|
---|
| 27 | * <code>
|
---|
| 28 | * $integrationsService = new Google\Service\Integrations(...);
|
---|
| 29 | * $sfdcInstances = $integrationsService->projects_locations_sfdcInstances;
|
---|
| 30 | * </code>
|
---|
| 31 | */
|
---|
| 32 | class ProjectsLocationsSfdcInstances extends \Google\Service\Resource
|
---|
| 33 | {
|
---|
| 34 | /**
|
---|
| 35 | * Creates an sfdc instance record. Store the sfdc instance in Spanner. Returns
|
---|
| 36 | * the sfdc instance. (sfdcInstances.create)
|
---|
| 37 | *
|
---|
| 38 | * @param string $parent Required. "projects/{project}/locations/{location}"
|
---|
| 39 | * format.
|
---|
| 40 | * @param GoogleCloudIntegrationsV1alphaSfdcInstance $postBody
|
---|
| 41 | * @param array $optParams Optional parameters.
|
---|
| 42 | * @return GoogleCloudIntegrationsV1alphaSfdcInstance
|
---|
| 43 | * @throws \Google\Service\Exception
|
---|
| 44 | */
|
---|
| 45 | public function create($parent, GoogleCloudIntegrationsV1alphaSfdcInstance $postBody, $optParams = [])
|
---|
| 46 | {
|
---|
| 47 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
| 48 | $params = array_merge($params, $optParams);
|
---|
| 49 | return $this->call('create', [$params], GoogleCloudIntegrationsV1alphaSfdcInstance::class);
|
---|
| 50 | }
|
---|
| 51 | /**
|
---|
| 52 | * Deletes an sfdc instance. (sfdcInstances.delete)
|
---|
| 53 | *
|
---|
| 54 | * @param string $name Required. The name that is associated with the
|
---|
| 55 | * SfdcInstance.
|
---|
| 56 | * @param array $optParams Optional parameters.
|
---|
| 57 | * @return GoogleProtobufEmpty
|
---|
| 58 | * @throws \Google\Service\Exception
|
---|
| 59 | */
|
---|
| 60 | public function delete($name, $optParams = [])
|
---|
| 61 | {
|
---|
| 62 | $params = ['name' => $name];
|
---|
| 63 | $params = array_merge($params, $optParams);
|
---|
| 64 | return $this->call('delete', [$params], GoogleProtobufEmpty::class);
|
---|
| 65 | }
|
---|
| 66 | /**
|
---|
| 67 | * Gets an sfdc instance. If the instance doesn't exist, Code.NOT_FOUND
|
---|
| 68 | * exception will be thrown. (sfdcInstances.get)
|
---|
| 69 | *
|
---|
| 70 | * @param string $name Required. The name that is associated with the
|
---|
| 71 | * SfdcInstance.
|
---|
| 72 | * @param array $optParams Optional parameters.
|
---|
| 73 | * @return GoogleCloudIntegrationsV1alphaSfdcInstance
|
---|
| 74 | * @throws \Google\Service\Exception
|
---|
| 75 | */
|
---|
| 76 | public function get($name, $optParams = [])
|
---|
| 77 | {
|
---|
| 78 | $params = ['name' => $name];
|
---|
| 79 | $params = array_merge($params, $optParams);
|
---|
| 80 | return $this->call('get', [$params], GoogleCloudIntegrationsV1alphaSfdcInstance::class);
|
---|
| 81 | }
|
---|
| 82 | /**
|
---|
| 83 | * Lists all sfdc instances that match the filter. Restrict to sfdc instances
|
---|
| 84 | * belonging to the current client only.
|
---|
| 85 | * (sfdcInstances.listProjectsLocationsSfdcInstances)
|
---|
| 86 | *
|
---|
| 87 | * @param string $parent Required. The client, which owns this collection of
|
---|
| 88 | * SfdcInstances.
|
---|
| 89 | * @param array $optParams Optional parameters.
|
---|
| 90 | *
|
---|
| 91 | * @opt_param string filter Filtering as supported in
|
---|
| 92 | * https://developers.google.com/authorized-buyers/apis/guides/list-filters.
|
---|
| 93 | * @opt_param int pageSize The size of entries in the response. If unspecified,
|
---|
| 94 | * defaults to 100.
|
---|
| 95 | * @opt_param string pageToken The token returned in the previous response.
|
---|
| 96 | * @opt_param string readMask The mask which specifies fields that need to be
|
---|
| 97 | * returned in the SfdcInstance's response.
|
---|
| 98 | * @return GoogleCloudIntegrationsV1alphaListSfdcInstancesResponse
|
---|
| 99 | * @throws \Google\Service\Exception
|
---|
| 100 | */
|
---|
| 101 | public function listProjectsLocationsSfdcInstances($parent, $optParams = [])
|
---|
| 102 | {
|
---|
| 103 | $params = ['parent' => $parent];
|
---|
| 104 | $params = array_merge($params, $optParams);
|
---|
| 105 | return $this->call('list', [$params], GoogleCloudIntegrationsV1alphaListSfdcInstancesResponse::class);
|
---|
| 106 | }
|
---|
| 107 | /**
|
---|
| 108 | * Updates an sfdc instance. Updates the sfdc instance in spanner. Returns the
|
---|
| 109 | * sfdc instance. (sfdcInstances.patch)
|
---|
| 110 | *
|
---|
| 111 | * @param string $name Resource name of the SFDC instance
|
---|
| 112 | * projects/{project}/locations/{location}/sfdcInstances/{sfdcInstance}.
|
---|
| 113 | * @param GoogleCloudIntegrationsV1alphaSfdcInstance $postBody
|
---|
| 114 | * @param array $optParams Optional parameters.
|
---|
| 115 | *
|
---|
| 116 | * @opt_param string updateMask Field mask specifying the fields in the above
|
---|
| 117 | * SfdcInstance that have been modified and need to be updated.
|
---|
| 118 | * @return GoogleCloudIntegrationsV1alphaSfdcInstance
|
---|
| 119 | * @throws \Google\Service\Exception
|
---|
| 120 | */
|
---|
| 121 | public function patch($name, GoogleCloudIntegrationsV1alphaSfdcInstance $postBody, $optParams = [])
|
---|
| 122 | {
|
---|
| 123 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
| 124 | $params = array_merge($params, $optParams);
|
---|
| 125 | return $this->call('patch', [$params], GoogleCloudIntegrationsV1alphaSfdcInstance::class);
|
---|
| 126 | }
|
---|
| 127 | }
|
---|
| 128 |
|
---|
| 129 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 130 | class_alias(ProjectsLocationsSfdcInstances::class, 'Google_Service_Integrations_Resource_ProjectsLocationsSfdcInstances');
|
---|