[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\GoogleCloudIntegrationsV1alphaAuthConfig;
|
---|
| 21 | use Google\Service\Integrations\GoogleCloudIntegrationsV1alphaListAuthConfigsResponse;
|
---|
| 22 | use Google\Service\Integrations\GoogleProtobufEmpty;
|
---|
| 23 |
|
---|
| 24 | /**
|
---|
| 25 | * The "authConfigs" collection of methods.
|
---|
| 26 | * Typical usage is:
|
---|
| 27 | * <code>
|
---|
| 28 | * $integrationsService = new Google\Service\Integrations(...);
|
---|
| 29 | * $authConfigs = $integrationsService->projects_locations_authConfigs;
|
---|
| 30 | * </code>
|
---|
| 31 | */
|
---|
| 32 | class ProjectsLocationsAuthConfigs extends \Google\Service\Resource
|
---|
| 33 | {
|
---|
| 34 | /**
|
---|
| 35 | * Creates an auth config record. Fetch corresponding credentials for specific
|
---|
| 36 | * auth types, e.g. access token for OAuth 2.0, JWT token for JWT. Encrypt the
|
---|
| 37 | * auth config with Cloud KMS and store the encrypted credentials in Spanner.
|
---|
| 38 | * Returns the encrypted auth config. (authConfigs.create)
|
---|
| 39 | *
|
---|
| 40 | * @param string $parent Required. "projects/{project}/locations/{location}"
|
---|
| 41 | * format.
|
---|
| 42 | * @param GoogleCloudIntegrationsV1alphaAuthConfig $postBody
|
---|
| 43 | * @param array $optParams Optional parameters.
|
---|
| 44 | *
|
---|
| 45 | * @opt_param string clientCertificate.encryptedPrivateKey The ssl certificate
|
---|
| 46 | * encoded in PEM format. This string must include the begin header and end
|
---|
| 47 | * footer lines. For example, -----BEGIN CERTIFICATE-----
|
---|
| 48 | * MIICTTCCAbagAwIBAgIJAPT0tSKNxan/MA0GCSqGSIb3DQEBCwUAMCoxFzAVBgNV
|
---|
| 49 | * BAoTDkdvb2dsZSBURVNUSU5HMQ8wDQYDVQQDEwZ0ZXN0Q0EwHhcNMTUwMTAxMDAw
|
---|
| 50 | * MDAwWhcNMjUwMTAxMDAwMDAwWjAuMRcwFQYDVQQKEw5Hb29nbGUgVEVTVElORzET
|
---|
| 51 | * MBEGA1UEAwwKam9lQGJhbmFuYTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA
|
---|
| 52 | * vDYFgMgxi5W488d9J7UpCInl0NXmZQpJDEHE4hvkaRlH7pnC71H0DLt0/3zATRP1
|
---|
| 53 | * JzY2+eqBmbGl4/sgZKYv8UrLnNyQNUTsNx1iZAfPUflf5FwgVsai8BM0pUciq1NB
|
---|
| 54 | * xD429VFcrGZNucvFLh72RuRFIKH8WUpiK/iZNFkWhZ0CAwEAAaN3MHUwDgYDVR0P
|
---|
| 55 | * AQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAMBgNVHRMB
|
---|
| 56 | * Af8EAjAAMBkGA1UdDgQSBBCVgnFBCWgL/iwCqnGrhTPQMBsGA1UdIwQUMBKAEKey
|
---|
| 57 | * Um2o4k2WiEVA0ldQvNYwDQYJKoZIhvcNAQELBQADgYEAYK986R4E3L1v+Q6esBtW
|
---|
| 58 | * JrUwA9UmJRSQr0N5w3o9XzarU37/bkjOP0Fw0k/A6Vv1n3vlciYfBFaBIam1qRHr
|
---|
| 59 | * 5dMsYf4CZS6w50r7hyzqyrwDoyNxkLnd2PdcHT/sym1QmflsjEs7pejtnohO6N2H
|
---|
| 60 | * wQW6M0H7Zt8claGRla4fKkg= -----END CERTIFICATE-----
|
---|
| 61 | * @opt_param string clientCertificate.passphrase 'passphrase' should be left
|
---|
| 62 | * unset if private key is not encrypted. Note that 'passphrase' is not the
|
---|
| 63 | * password for web server, but an extra layer of security to protected private
|
---|
| 64 | * key.
|
---|
| 65 | * @opt_param string clientCertificate.sslCertificate The ssl certificate
|
---|
| 66 | * encoded in PEM format. This string must include the begin header and end
|
---|
| 67 | * footer lines. For example, -----BEGIN CERTIFICATE-----
|
---|
| 68 | * MIICTTCCAbagAwIBAgIJAPT0tSKNxan/MA0GCSqGSIb3DQEBCwUAMCoxFzAVBgNV
|
---|
| 69 | * BAoTDkdvb2dsZSBURVNUSU5HMQ8wDQYDVQQDEwZ0ZXN0Q0EwHhcNMTUwMTAxMDAw
|
---|
| 70 | * MDAwWhcNMjUwMTAxMDAwMDAwWjAuMRcwFQYDVQQKEw5Hb29nbGUgVEVTVElORzET
|
---|
| 71 | * MBEGA1UEAwwKam9lQGJhbmFuYTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA
|
---|
| 72 | * vDYFgMgxi5W488d9J7UpCInl0NXmZQpJDEHE4hvkaRlH7pnC71H0DLt0/3zATRP1
|
---|
| 73 | * JzY2+eqBmbGl4/sgZKYv8UrLnNyQNUTsNx1iZAfPUflf5FwgVsai8BM0pUciq1NB
|
---|
| 74 | * xD429VFcrGZNucvFLh72RuRFIKH8WUpiK/iZNFkWhZ0CAwEAAaN3MHUwDgYDVR0P
|
---|
| 75 | * AQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAMBgNVHRMB
|
---|
| 76 | * Af8EAjAAMBkGA1UdDgQSBBCVgnFBCWgL/iwCqnGrhTPQMBsGA1UdIwQUMBKAEKey
|
---|
| 77 | * Um2o4k2WiEVA0ldQvNYwDQYJKoZIhvcNAQELBQADgYEAYK986R4E3L1v+Q6esBtW
|
---|
| 78 | * JrUwA9UmJRSQr0N5w3o9XzarU37/bkjOP0Fw0k/A6Vv1n3vlciYfBFaBIam1qRHr
|
---|
| 79 | * 5dMsYf4CZS6w50r7hyzqyrwDoyNxkLnd2PdcHT/sym1QmflsjEs7pejtnohO6N2H
|
---|
| 80 | * wQW6M0H7Zt8claGRla4fKkg= -----END CERTIFICATE-----
|
---|
| 81 | * @return GoogleCloudIntegrationsV1alphaAuthConfig
|
---|
| 82 | * @throws \Google\Service\Exception
|
---|
| 83 | */
|
---|
| 84 | public function create($parent, GoogleCloudIntegrationsV1alphaAuthConfig $postBody, $optParams = [])
|
---|
| 85 | {
|
---|
| 86 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
| 87 | $params = array_merge($params, $optParams);
|
---|
| 88 | return $this->call('create', [$params], GoogleCloudIntegrationsV1alphaAuthConfig::class);
|
---|
| 89 | }
|
---|
| 90 | /**
|
---|
| 91 | * Deletes an auth config. (authConfigs.delete)
|
---|
| 92 | *
|
---|
| 93 | * @param string $name Required. The name that is associated with the
|
---|
| 94 | * AuthConfig.
|
---|
| 95 | * @param array $optParams Optional parameters.
|
---|
| 96 | * @return GoogleProtobufEmpty
|
---|
| 97 | * @throws \Google\Service\Exception
|
---|
| 98 | */
|
---|
| 99 | public function delete($name, $optParams = [])
|
---|
| 100 | {
|
---|
| 101 | $params = ['name' => $name];
|
---|
| 102 | $params = array_merge($params, $optParams);
|
---|
| 103 | return $this->call('delete', [$params], GoogleProtobufEmpty::class);
|
---|
| 104 | }
|
---|
| 105 | /**
|
---|
| 106 | * Gets a complete auth config. If the auth config doesn't exist, Code.NOT_FOUND
|
---|
| 107 | * exception will be thrown. Returns the decrypted auth config.
|
---|
| 108 | * (authConfigs.get)
|
---|
| 109 | *
|
---|
| 110 | * @param string $name Required. The name that is associated with the
|
---|
| 111 | * AuthConfig.
|
---|
| 112 | * @param array $optParams Optional parameters.
|
---|
| 113 | * @return GoogleCloudIntegrationsV1alphaAuthConfig
|
---|
| 114 | * @throws \Google\Service\Exception
|
---|
| 115 | */
|
---|
| 116 | public function get($name, $optParams = [])
|
---|
| 117 | {
|
---|
| 118 | $params = ['name' => $name];
|
---|
| 119 | $params = array_merge($params, $optParams);
|
---|
| 120 | return $this->call('get', [$params], GoogleCloudIntegrationsV1alphaAuthConfig::class);
|
---|
| 121 | }
|
---|
| 122 | /**
|
---|
| 123 | * Lists all auth configs that match the filter. Restrict to auth configs belong
|
---|
| 124 | * to the current client only. (authConfigs.listProjectsLocationsAuthConfigs)
|
---|
| 125 | *
|
---|
| 126 | * @param string $parent Required. The client, which owns this collection of
|
---|
| 127 | * AuthConfigs.
|
---|
| 128 | * @param array $optParams Optional parameters.
|
---|
| 129 | *
|
---|
| 130 | * @opt_param string filter Filtering as supported in
|
---|
| 131 | * https://developers.google.com/authorized-buyers/apis/guides/list-filters.
|
---|
| 132 | * @opt_param int pageSize The size of entries in the response. If unspecified,
|
---|
| 133 | * defaults to 100.
|
---|
| 134 | * @opt_param string pageToken The token returned in the previous response.
|
---|
| 135 | * @opt_param string readMask The mask which specifies fields that need to be
|
---|
| 136 | * returned in the AuthConfig's response.
|
---|
| 137 | * @return GoogleCloudIntegrationsV1alphaListAuthConfigsResponse
|
---|
| 138 | * @throws \Google\Service\Exception
|
---|
| 139 | */
|
---|
| 140 | public function listProjectsLocationsAuthConfigs($parent, $optParams = [])
|
---|
| 141 | {
|
---|
| 142 | $params = ['parent' => $parent];
|
---|
| 143 | $params = array_merge($params, $optParams);
|
---|
| 144 | return $this->call('list', [$params], GoogleCloudIntegrationsV1alphaListAuthConfigsResponse::class);
|
---|
| 145 | }
|
---|
| 146 | /**
|
---|
| 147 | * Updates an auth config. If credential is updated, fetch the encrypted auth
|
---|
| 148 | * config from Spanner, decrypt with Cloud KMS key, update the credential
|
---|
| 149 | * fields, re-encrypt with Cloud KMS key and update the Spanner record. For
|
---|
| 150 | * other fields, directly update the Spanner record. Returns the encrypted auth
|
---|
| 151 | * config. (authConfigs.patch)
|
---|
| 152 | *
|
---|
| 153 | * @param string $name Resource name of the auth config. For more information,
|
---|
| 154 | * see Manage authentication profiles.
|
---|
| 155 | * projects/{project}/locations/{location}/authConfigs/{authConfig}.
|
---|
| 156 | * @param GoogleCloudIntegrationsV1alphaAuthConfig $postBody
|
---|
| 157 | * @param array $optParams Optional parameters.
|
---|
| 158 | *
|
---|
| 159 | * @opt_param string clientCertificate.encryptedPrivateKey The ssl certificate
|
---|
| 160 | * encoded in PEM format. This string must include the begin header and end
|
---|
| 161 | * footer lines. For example, -----BEGIN CERTIFICATE-----
|
---|
| 162 | * MIICTTCCAbagAwIBAgIJAPT0tSKNxan/MA0GCSqGSIb3DQEBCwUAMCoxFzAVBgNV
|
---|
| 163 | * BAoTDkdvb2dsZSBURVNUSU5HMQ8wDQYDVQQDEwZ0ZXN0Q0EwHhcNMTUwMTAxMDAw
|
---|
| 164 | * MDAwWhcNMjUwMTAxMDAwMDAwWjAuMRcwFQYDVQQKEw5Hb29nbGUgVEVTVElORzET
|
---|
| 165 | * MBEGA1UEAwwKam9lQGJhbmFuYTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA
|
---|
| 166 | * vDYFgMgxi5W488d9J7UpCInl0NXmZQpJDEHE4hvkaRlH7pnC71H0DLt0/3zATRP1
|
---|
| 167 | * JzY2+eqBmbGl4/sgZKYv8UrLnNyQNUTsNx1iZAfPUflf5FwgVsai8BM0pUciq1NB
|
---|
| 168 | * xD429VFcrGZNucvFLh72RuRFIKH8WUpiK/iZNFkWhZ0CAwEAAaN3MHUwDgYDVR0P
|
---|
| 169 | * AQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAMBgNVHRMB
|
---|
| 170 | * Af8EAjAAMBkGA1UdDgQSBBCVgnFBCWgL/iwCqnGrhTPQMBsGA1UdIwQUMBKAEKey
|
---|
| 171 | * Um2o4k2WiEVA0ldQvNYwDQYJKoZIhvcNAQELBQADgYEAYK986R4E3L1v+Q6esBtW
|
---|
| 172 | * JrUwA9UmJRSQr0N5w3o9XzarU37/bkjOP0Fw0k/A6Vv1n3vlciYfBFaBIam1qRHr
|
---|
| 173 | * 5dMsYf4CZS6w50r7hyzqyrwDoyNxkLnd2PdcHT/sym1QmflsjEs7pejtnohO6N2H
|
---|
| 174 | * wQW6M0H7Zt8claGRla4fKkg= -----END CERTIFICATE-----
|
---|
| 175 | * @opt_param string clientCertificate.passphrase 'passphrase' should be left
|
---|
| 176 | * unset if private key is not encrypted. Note that 'passphrase' is not the
|
---|
| 177 | * password for web server, but an extra layer of security to protected private
|
---|
| 178 | * key.
|
---|
| 179 | * @opt_param string clientCertificate.sslCertificate The ssl certificate
|
---|
| 180 | * encoded in PEM format. This string must include the begin header and end
|
---|
| 181 | * footer lines. For example, -----BEGIN CERTIFICATE-----
|
---|
| 182 | * MIICTTCCAbagAwIBAgIJAPT0tSKNxan/MA0GCSqGSIb3DQEBCwUAMCoxFzAVBgNV
|
---|
| 183 | * BAoTDkdvb2dsZSBURVNUSU5HMQ8wDQYDVQQDEwZ0ZXN0Q0EwHhcNMTUwMTAxMDAw
|
---|
| 184 | * MDAwWhcNMjUwMTAxMDAwMDAwWjAuMRcwFQYDVQQKEw5Hb29nbGUgVEVTVElORzET
|
---|
| 185 | * MBEGA1UEAwwKam9lQGJhbmFuYTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA
|
---|
| 186 | * vDYFgMgxi5W488d9J7UpCInl0NXmZQpJDEHE4hvkaRlH7pnC71H0DLt0/3zATRP1
|
---|
| 187 | * JzY2+eqBmbGl4/sgZKYv8UrLnNyQNUTsNx1iZAfPUflf5FwgVsai8BM0pUciq1NB
|
---|
| 188 | * xD429VFcrGZNucvFLh72RuRFIKH8WUpiK/iZNFkWhZ0CAwEAAaN3MHUwDgYDVR0P
|
---|
| 189 | * AQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAMBgNVHRMB
|
---|
| 190 | * Af8EAjAAMBkGA1UdDgQSBBCVgnFBCWgL/iwCqnGrhTPQMBsGA1UdIwQUMBKAEKey
|
---|
| 191 | * Um2o4k2WiEVA0ldQvNYwDQYJKoZIhvcNAQELBQADgYEAYK986R4E3L1v+Q6esBtW
|
---|
| 192 | * JrUwA9UmJRSQr0N5w3o9XzarU37/bkjOP0Fw0k/A6Vv1n3vlciYfBFaBIam1qRHr
|
---|
| 193 | * 5dMsYf4CZS6w50r7hyzqyrwDoyNxkLnd2PdcHT/sym1QmflsjEs7pejtnohO6N2H
|
---|
| 194 | * wQW6M0H7Zt8claGRla4fKkg= -----END CERTIFICATE-----
|
---|
| 195 | * @opt_param string updateMask Field mask specifying the fields in the above
|
---|
| 196 | * AuthConfig that have been modified and need to be updated.
|
---|
| 197 | * @return GoogleCloudIntegrationsV1alphaAuthConfig
|
---|
| 198 | * @throws \Google\Service\Exception
|
---|
| 199 | */
|
---|
| 200 | public function patch($name, GoogleCloudIntegrationsV1alphaAuthConfig $postBody, $optParams = [])
|
---|
| 201 | {
|
---|
| 202 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
| 203 | $params = array_merge($params, $optParams);
|
---|
| 204 | return $this->call('patch', [$params], GoogleCloudIntegrationsV1alphaAuthConfig::class);
|
---|
| 205 | }
|
---|
| 206 | }
|
---|
| 207 |
|
---|
| 208 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 209 | class_alias(ProjectsLocationsAuthConfigs::class, 'Google_Service_Integrations_Resource_ProjectsLocationsAuthConfigs');
|
---|