gestione documentale avanzata 1 parte

This commit is contained in:
2026-05-28 09:34:28 +02:00
parent 3471befb1a
commit f2b0833b90
34482 changed files with 4312269 additions and 546 deletions
@@ -0,0 +1,50 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class AddQuorumMember extends \Google\Model
{
/**
* Required. The public key associated with the 2FA key for the new quorum
* member to add. Public keys must be associated with RSA 2048 keys.
*
* @var string
*/
public $twoFactorPublicKeyPem;
/**
* Required. The public key associated with the 2FA key for the new quorum
* member to add. Public keys must be associated with RSA 2048 keys.
*
* @param string $twoFactorPublicKeyPem
*/
public function setTwoFactorPublicKeyPem($twoFactorPublicKeyPem)
{
$this->twoFactorPublicKeyPem = $twoFactorPublicKeyPem;
}
/**
* @return string
*/
public function getTwoFactorPublicKeyPem()
{
return $this->twoFactorPublicKeyPem;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(AddQuorumMember::class, 'Google_Service_CloudKMS_AddQuorumMember');
@@ -0,0 +1,63 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class ApproveSingleTenantHsmInstanceProposalRequest extends \Google\Model
{
protected $quorumReplyType = QuorumReply::class;
protected $quorumReplyDataType = '';
protected $requiredActionQuorumReplyType = RequiredActionQuorumReply::class;
protected $requiredActionQuorumReplyDataType = '';
/**
* Required. The reply to QuorumParameters for approving the proposal.
*
* @param QuorumReply $quorumReply
*/
public function setQuorumReply(QuorumReply $quorumReply)
{
$this->quorumReply = $quorumReply;
}
/**
* @return QuorumReply
*/
public function getQuorumReply()
{
return $this->quorumReply;
}
/**
* Required. The reply to RequiredActionQuorumParameters for approving the
* proposal.
*
* @param RequiredActionQuorumReply $requiredActionQuorumReply
*/
public function setRequiredActionQuorumReply(RequiredActionQuorumReply $requiredActionQuorumReply)
{
$this->requiredActionQuorumReply = $requiredActionQuorumReply;
}
/**
* @return RequiredActionQuorumReply
*/
public function getRequiredActionQuorumReply()
{
return $this->requiredActionQuorumReply;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ApproveSingleTenantHsmInstanceProposalRequest::class, 'Google_Service_CloudKMS_ApproveSingleTenantHsmInstanceProposalRequest');
@@ -0,0 +1,25 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class ApproveSingleTenantHsmInstanceProposalResponse extends \Google\Model
{
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ApproveSingleTenantHsmInstanceProposalResponse::class, 'Google_Service_CloudKMS_ApproveSingleTenantHsmInstanceProposalResponse');
@@ -0,0 +1,96 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class AsymmetricDecryptRequest extends \Google\Model
{
/**
* Required. The data encrypted with the named CryptoKeyVersion's public key
* using OAEP.
*
* @var string
*/
public $ciphertext;
/**
* Optional. An optional CRC32C checksum of the
* AsymmetricDecryptRequest.ciphertext. If specified, KeyManagementService
* will verify the integrity of the received
* AsymmetricDecryptRequest.ciphertext using this checksum.
* KeyManagementService will report an error if the checksum verification
* fails. If you receive a checksum error, your client should verify that
* CRC32C(AsymmetricDecryptRequest.ciphertext) is equal to
* AsymmetricDecryptRequest.ciphertext_crc32c, and if so, perform a limited
* number of retries. A persistent mismatch may indicate an issue in your
* computation of the CRC32C checksum. Note: This field is defined as int64
* for reasons of compatibility across different languages. However, it is a
* non-negative integer, which will never exceed 2^32-1, and can be safely
* downconverted to uint32 in languages that support this type.
*
* @var string
*/
public $ciphertextCrc32c;
/**
* Required. The data encrypted with the named CryptoKeyVersion's public key
* using OAEP.
*
* @param string $ciphertext
*/
public function setCiphertext($ciphertext)
{
$this->ciphertext = $ciphertext;
}
/**
* @return string
*/
public function getCiphertext()
{
return $this->ciphertext;
}
/**
* Optional. An optional CRC32C checksum of the
* AsymmetricDecryptRequest.ciphertext. If specified, KeyManagementService
* will verify the integrity of the received
* AsymmetricDecryptRequest.ciphertext using this checksum.
* KeyManagementService will report an error if the checksum verification
* fails. If you receive a checksum error, your client should verify that
* CRC32C(AsymmetricDecryptRequest.ciphertext) is equal to
* AsymmetricDecryptRequest.ciphertext_crc32c, and if so, perform a limited
* number of retries. A persistent mismatch may indicate an issue in your
* computation of the CRC32C checksum. Note: This field is defined as int64
* for reasons of compatibility across different languages. However, it is a
* non-negative integer, which will never exceed 2^32-1, and can be safely
* downconverted to uint32 in languages that support this type.
*
* @param string $ciphertextCrc32c
*/
public function setCiphertextCrc32c($ciphertextCrc32c)
{
$this->ciphertextCrc32c = $ciphertextCrc32c;
}
/**
* @return string
*/
public function getCiphertextCrc32c()
{
return $this->ciphertextCrc32c;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(AsymmetricDecryptRequest::class, 'Google_Service_CloudKMS_AsymmetricDecryptRequest');
@@ -0,0 +1,175 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class AsymmetricDecryptResponse extends \Google\Model
{
/**
* Not specified.
*/
public const PROTECTION_LEVEL_PROTECTION_LEVEL_UNSPECIFIED = 'PROTECTION_LEVEL_UNSPECIFIED';
/**
* Crypto operations are performed in software.
*/
public const PROTECTION_LEVEL_SOFTWARE = 'SOFTWARE';
/**
* Crypto operations are performed in a Hardware Security Module.
*/
public const PROTECTION_LEVEL_HSM = 'HSM';
/**
* Crypto operations are performed by an external key manager.
*/
public const PROTECTION_LEVEL_EXTERNAL = 'EXTERNAL';
/**
* Crypto operations are performed in an EKM-over-VPC backend.
*/
public const PROTECTION_LEVEL_EXTERNAL_VPC = 'EXTERNAL_VPC';
/**
* Crypto operations are performed in a single-tenant HSM.
*/
public const PROTECTION_LEVEL_HSM_SINGLE_TENANT = 'HSM_SINGLE_TENANT';
/**
* The decrypted data originally encrypted with the matching public key.
*
* @var string
*/
public $plaintext;
/**
* Integrity verification field. A CRC32C checksum of the returned
* AsymmetricDecryptResponse.plaintext. An integrity check of
* AsymmetricDecryptResponse.plaintext can be performed by computing the
* CRC32C checksum of AsymmetricDecryptResponse.plaintext and comparing your
* results to this field. Discard the response in case of non-matching
* checksum values, and perform a limited number of retries. A persistent
* mismatch may indicate an issue in your computation of the CRC32C checksum.
* Note: This field is defined as int64 for reasons of compatibility across
* different languages. However, it is a non-negative integer, which will
* never exceed 2^32-1, and can be safely downconverted to uint32 in languages
* that support this type.
*
* @var string
*/
public $plaintextCrc32c;
/**
* The ProtectionLevel of the CryptoKeyVersion used in decryption.
*
* @var string
*/
public $protectionLevel;
/**
* Integrity verification field. A flag indicating whether
* AsymmetricDecryptRequest.ciphertext_crc32c was received by
* KeyManagementService and used for the integrity verification of the
* ciphertext. A false value of this field indicates either that
* AsymmetricDecryptRequest.ciphertext_crc32c was left unset or that it was
* not delivered to KeyManagementService. If you've set
* AsymmetricDecryptRequest.ciphertext_crc32c but this field is still false,
* discard the response and perform a limited number of retries.
*
* @var bool
*/
public $verifiedCiphertextCrc32c;
/**
* The decrypted data originally encrypted with the matching public key.
*
* @param string $plaintext
*/
public function setPlaintext($plaintext)
{
$this->plaintext = $plaintext;
}
/**
* @return string
*/
public function getPlaintext()
{
return $this->plaintext;
}
/**
* Integrity verification field. A CRC32C checksum of the returned
* AsymmetricDecryptResponse.plaintext. An integrity check of
* AsymmetricDecryptResponse.plaintext can be performed by computing the
* CRC32C checksum of AsymmetricDecryptResponse.plaintext and comparing your
* results to this field. Discard the response in case of non-matching
* checksum values, and perform a limited number of retries. A persistent
* mismatch may indicate an issue in your computation of the CRC32C checksum.
* Note: This field is defined as int64 for reasons of compatibility across
* different languages. However, it is a non-negative integer, which will
* never exceed 2^32-1, and can be safely downconverted to uint32 in languages
* that support this type.
*
* @param string $plaintextCrc32c
*/
public function setPlaintextCrc32c($plaintextCrc32c)
{
$this->plaintextCrc32c = $plaintextCrc32c;
}
/**
* @return string
*/
public function getPlaintextCrc32c()
{
return $this->plaintextCrc32c;
}
/**
* The ProtectionLevel of the CryptoKeyVersion used in decryption.
*
* Accepted values: PROTECTION_LEVEL_UNSPECIFIED, SOFTWARE, HSM, EXTERNAL,
* EXTERNAL_VPC, HSM_SINGLE_TENANT
*
* @param self::PROTECTION_LEVEL_* $protectionLevel
*/
public function setProtectionLevel($protectionLevel)
{
$this->protectionLevel = $protectionLevel;
}
/**
* @return self::PROTECTION_LEVEL_*
*/
public function getProtectionLevel()
{
return $this->protectionLevel;
}
/**
* Integrity verification field. A flag indicating whether
* AsymmetricDecryptRequest.ciphertext_crc32c was received by
* KeyManagementService and used for the integrity verification of the
* ciphertext. A false value of this field indicates either that
* AsymmetricDecryptRequest.ciphertext_crc32c was left unset or that it was
* not delivered to KeyManagementService. If you've set
* AsymmetricDecryptRequest.ciphertext_crc32c but this field is still false,
* discard the response and perform a limited number of retries.
*
* @param bool $verifiedCiphertextCrc32c
*/
public function setVerifiedCiphertextCrc32c($verifiedCiphertextCrc32c)
{
$this->verifiedCiphertextCrc32c = $verifiedCiphertextCrc32c;
}
/**
* @return bool
*/
public function getVerifiedCiphertextCrc32c()
{
return $this->verifiedCiphertextCrc32c;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(AsymmetricDecryptResponse::class, 'Google_Service_CloudKMS_AsymmetricDecryptResponse');
@@ -0,0 +1,158 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class AsymmetricSignRequest extends \Google\Model
{
/**
* Optional. The data to sign. It can't be supplied if
* AsymmetricSignRequest.digest is supplied.
*
* @var string
*/
public $data;
/**
* Optional. An optional CRC32C checksum of the AsymmetricSignRequest.data. If
* specified, KeyManagementService will verify the integrity of the received
* AsymmetricSignRequest.data using this checksum. KeyManagementService will
* report an error if the checksum verification fails. If you receive a
* checksum error, your client should verify that
* CRC32C(AsymmetricSignRequest.data) is equal to
* AsymmetricSignRequest.data_crc32c, and if so, perform a limited number of
* retries. A persistent mismatch may indicate an issue in your computation of
* the CRC32C checksum. Note: This field is defined as int64 for reasons of
* compatibility across different languages. However, it is a non-negative
* integer, which will never exceed 2^32-1, and can be safely downconverted to
* uint32 in languages that support this type.
*
* @var string
*/
public $dataCrc32c;
protected $digestType = Digest::class;
protected $digestDataType = '';
/**
* Optional. An optional CRC32C checksum of the AsymmetricSignRequest.digest.
* If specified, KeyManagementService will verify the integrity of the
* received AsymmetricSignRequest.digest using this checksum.
* KeyManagementService will report an error if the checksum verification
* fails. If you receive a checksum error, your client should verify that
* CRC32C(AsymmetricSignRequest.digest) is equal to
* AsymmetricSignRequest.digest_crc32c, and if so, perform a limited number of
* retries. A persistent mismatch may indicate an issue in your computation of
* the CRC32C checksum. Note: This field is defined as int64 for reasons of
* compatibility across different languages. However, it is a non-negative
* integer, which will never exceed 2^32-1, and can be safely downconverted to
* uint32 in languages that support this type.
*
* @var string
*/
public $digestCrc32c;
/**
* Optional. The data to sign. It can't be supplied if
* AsymmetricSignRequest.digest is supplied.
*
* @param string $data
*/
public function setData($data)
{
$this->data = $data;
}
/**
* @return string
*/
public function getData()
{
return $this->data;
}
/**
* Optional. An optional CRC32C checksum of the AsymmetricSignRequest.data. If
* specified, KeyManagementService will verify the integrity of the received
* AsymmetricSignRequest.data using this checksum. KeyManagementService will
* report an error if the checksum verification fails. If you receive a
* checksum error, your client should verify that
* CRC32C(AsymmetricSignRequest.data) is equal to
* AsymmetricSignRequest.data_crc32c, and if so, perform a limited number of
* retries. A persistent mismatch may indicate an issue in your computation of
* the CRC32C checksum. Note: This field is defined as int64 for reasons of
* compatibility across different languages. However, it is a non-negative
* integer, which will never exceed 2^32-1, and can be safely downconverted to
* uint32 in languages that support this type.
*
* @param string $dataCrc32c
*/
public function setDataCrc32c($dataCrc32c)
{
$this->dataCrc32c = $dataCrc32c;
}
/**
* @return string
*/
public function getDataCrc32c()
{
return $this->dataCrc32c;
}
/**
* Optional. The digest of the data to sign. The digest must be produced with
* the same digest algorithm as specified by the key version's algorithm. This
* field may not be supplied if AsymmetricSignRequest.data is supplied.
*
* @param Digest $digest
*/
public function setDigest(Digest $digest)
{
$this->digest = $digest;
}
/**
* @return Digest
*/
public function getDigest()
{
return $this->digest;
}
/**
* Optional. An optional CRC32C checksum of the AsymmetricSignRequest.digest.
* If specified, KeyManagementService will verify the integrity of the
* received AsymmetricSignRequest.digest using this checksum.
* KeyManagementService will report an error if the checksum verification
* fails. If you receive a checksum error, your client should verify that
* CRC32C(AsymmetricSignRequest.digest) is equal to
* AsymmetricSignRequest.digest_crc32c, and if so, perform a limited number of
* retries. A persistent mismatch may indicate an issue in your computation of
* the CRC32C checksum. Note: This field is defined as int64 for reasons of
* compatibility across different languages. However, it is a non-negative
* integer, which will never exceed 2^32-1, and can be safely downconverted to
* uint32 in languages that support this type.
*
* @param string $digestCrc32c
*/
public function setDigestCrc32c($digestCrc32c)
{
$this->digestCrc32c = $digestCrc32c;
}
/**
* @return string
*/
public function getDigestCrc32c()
{
return $this->digestCrc32c;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(AsymmetricSignRequest::class, 'Google_Service_CloudKMS_AsymmetricSignRequest');
@@ -0,0 +1,229 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class AsymmetricSignResponse extends \Google\Model
{
/**
* Not specified.
*/
public const PROTECTION_LEVEL_PROTECTION_LEVEL_UNSPECIFIED = 'PROTECTION_LEVEL_UNSPECIFIED';
/**
* Crypto operations are performed in software.
*/
public const PROTECTION_LEVEL_SOFTWARE = 'SOFTWARE';
/**
* Crypto operations are performed in a Hardware Security Module.
*/
public const PROTECTION_LEVEL_HSM = 'HSM';
/**
* Crypto operations are performed by an external key manager.
*/
public const PROTECTION_LEVEL_EXTERNAL = 'EXTERNAL';
/**
* Crypto operations are performed in an EKM-over-VPC backend.
*/
public const PROTECTION_LEVEL_EXTERNAL_VPC = 'EXTERNAL_VPC';
/**
* Crypto operations are performed in a single-tenant HSM.
*/
public const PROTECTION_LEVEL_HSM_SINGLE_TENANT = 'HSM_SINGLE_TENANT';
/**
* The resource name of the CryptoKeyVersion used for signing. Check this
* field to verify that the intended resource was used for signing.
*
* @var string
*/
public $name;
/**
* The ProtectionLevel of the CryptoKeyVersion used for signing.
*
* @var string
*/
public $protectionLevel;
/**
* The created signature.
*
* @var string
*/
public $signature;
/**
* Integrity verification field. A CRC32C checksum of the returned
* AsymmetricSignResponse.signature. An integrity check of
* AsymmetricSignResponse.signature can be performed by computing the CRC32C
* checksum of AsymmetricSignResponse.signature and comparing your results to
* this field. Discard the response in case of non-matching checksum values,
* and perform a limited number of retries. A persistent mismatch may indicate
* an issue in your computation of the CRC32C checksum. Note: This field is
* defined as int64 for reasons of compatibility across different languages.
* However, it is a non-negative integer, which will never exceed 2^32-1, and
* can be safely downconverted to uint32 in languages that support this type.
*
* @var string
*/
public $signatureCrc32c;
/**
* Integrity verification field. A flag indicating whether
* AsymmetricSignRequest.data_crc32c was received by KeyManagementService and
* used for the integrity verification of the data. A false value of this
* field indicates either that AsymmetricSignRequest.data_crc32c was left
* unset or that it was not delivered to KeyManagementService. If you've set
* AsymmetricSignRequest.data_crc32c but this field is still false, discard
* the response and perform a limited number of retries.
*
* @var bool
*/
public $verifiedDataCrc32c;
/**
* Integrity verification field. A flag indicating whether
* AsymmetricSignRequest.digest_crc32c was received by KeyManagementService
* and used for the integrity verification of the digest. A false value of
* this field indicates either that AsymmetricSignRequest.digest_crc32c was
* left unset or that it was not delivered to KeyManagementService. If you've
* set AsymmetricSignRequest.digest_crc32c but this field is still false,
* discard the response and perform a limited number of retries.
*
* @var bool
*/
public $verifiedDigestCrc32c;
/**
* The resource name of the CryptoKeyVersion used for signing. Check this
* field to verify that the intended resource was used for signing.
*
* @param string $name
*/
public function setName($name)
{
$this->name = $name;
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* The ProtectionLevel of the CryptoKeyVersion used for signing.
*
* Accepted values: PROTECTION_LEVEL_UNSPECIFIED, SOFTWARE, HSM, EXTERNAL,
* EXTERNAL_VPC, HSM_SINGLE_TENANT
*
* @param self::PROTECTION_LEVEL_* $protectionLevel
*/
public function setProtectionLevel($protectionLevel)
{
$this->protectionLevel = $protectionLevel;
}
/**
* @return self::PROTECTION_LEVEL_*
*/
public function getProtectionLevel()
{
return $this->protectionLevel;
}
/**
* The created signature.
*
* @param string $signature
*/
public function setSignature($signature)
{
$this->signature = $signature;
}
/**
* @return string
*/
public function getSignature()
{
return $this->signature;
}
/**
* Integrity verification field. A CRC32C checksum of the returned
* AsymmetricSignResponse.signature. An integrity check of
* AsymmetricSignResponse.signature can be performed by computing the CRC32C
* checksum of AsymmetricSignResponse.signature and comparing your results to
* this field. Discard the response in case of non-matching checksum values,
* and perform a limited number of retries. A persistent mismatch may indicate
* an issue in your computation of the CRC32C checksum. Note: This field is
* defined as int64 for reasons of compatibility across different languages.
* However, it is a non-negative integer, which will never exceed 2^32-1, and
* can be safely downconverted to uint32 in languages that support this type.
*
* @param string $signatureCrc32c
*/
public function setSignatureCrc32c($signatureCrc32c)
{
$this->signatureCrc32c = $signatureCrc32c;
}
/**
* @return string
*/
public function getSignatureCrc32c()
{
return $this->signatureCrc32c;
}
/**
* Integrity verification field. A flag indicating whether
* AsymmetricSignRequest.data_crc32c was received by KeyManagementService and
* used for the integrity verification of the data. A false value of this
* field indicates either that AsymmetricSignRequest.data_crc32c was left
* unset or that it was not delivered to KeyManagementService. If you've set
* AsymmetricSignRequest.data_crc32c but this field is still false, discard
* the response and perform a limited number of retries.
*
* @param bool $verifiedDataCrc32c
*/
public function setVerifiedDataCrc32c($verifiedDataCrc32c)
{
$this->verifiedDataCrc32c = $verifiedDataCrc32c;
}
/**
* @return bool
*/
public function getVerifiedDataCrc32c()
{
return $this->verifiedDataCrc32c;
}
/**
* Integrity verification field. A flag indicating whether
* AsymmetricSignRequest.digest_crc32c was received by KeyManagementService
* and used for the integrity verification of the digest. A false value of
* this field indicates either that AsymmetricSignRequest.digest_crc32c was
* left unset or that it was not delivered to KeyManagementService. If you've
* set AsymmetricSignRequest.digest_crc32c but this field is still false,
* discard the response and perform a limited number of retries.
*
* @param bool $verifiedDigestCrc32c
*/
public function setVerifiedDigestCrc32c($verifiedDigestCrc32c)
{
$this->verifiedDigestCrc32c = $verifiedDigestCrc32c;
}
/**
* @return bool
*/
public function getVerifiedDigestCrc32c()
{
return $this->verifiedDigestCrc32c;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(AsymmetricSignResponse::class, 'Google_Service_CloudKMS_AsymmetricSignResponse');
@@ -0,0 +1,71 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class AuditConfig extends \Google\Collection
{
protected $collection_key = 'auditLogConfigs';
protected $auditLogConfigsType = AuditLogConfig::class;
protected $auditLogConfigsDataType = 'array';
/**
* Specifies a service that will be enabled for audit logging. For example,
* `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a
* special value that covers all services.
*
* @var string
*/
public $service;
/**
* The configuration for logging of each type of permission.
*
* @param AuditLogConfig[] $auditLogConfigs
*/
public function setAuditLogConfigs($auditLogConfigs)
{
$this->auditLogConfigs = $auditLogConfigs;
}
/**
* @return AuditLogConfig[]
*/
public function getAuditLogConfigs()
{
return $this->auditLogConfigs;
}
/**
* Specifies a service that will be enabled for audit logging. For example,
* `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a
* special value that covers all services.
*
* @param string $service
*/
public function setService($service)
{
$this->service = $service;
}
/**
* @return string
*/
public function getService()
{
return $this->service;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(AuditConfig::class, 'Google_Service_CloudKMS_AuditConfig');
@@ -0,0 +1,91 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class AuditLogConfig extends \Google\Collection
{
/**
* Default case. Should never be this.
*/
public const LOG_TYPE_LOG_TYPE_UNSPECIFIED = 'LOG_TYPE_UNSPECIFIED';
/**
* Admin reads. Example: CloudIAM getIamPolicy
*/
public const LOG_TYPE_ADMIN_READ = 'ADMIN_READ';
/**
* Data writes. Example: CloudSQL Users create
*/
public const LOG_TYPE_DATA_WRITE = 'DATA_WRITE';
/**
* Data reads. Example: CloudSQL Users list
*/
public const LOG_TYPE_DATA_READ = 'DATA_READ';
protected $collection_key = 'exemptedMembers';
/**
* Specifies the identities that do not cause logging for this type of
* permission. Follows the same format of Binding.members.
*
* @var string[]
*/
public $exemptedMembers;
/**
* The log type that this config enables.
*
* @var string
*/
public $logType;
/**
* Specifies the identities that do not cause logging for this type of
* permission. Follows the same format of Binding.members.
*
* @param string[] $exemptedMembers
*/
public function setExemptedMembers($exemptedMembers)
{
$this->exemptedMembers = $exemptedMembers;
}
/**
* @return string[]
*/
public function getExemptedMembers()
{
return $this->exemptedMembers;
}
/**
* The log type that this config enables.
*
* Accepted values: LOG_TYPE_UNSPECIFIED, ADMIN_READ, DATA_WRITE, DATA_READ
*
* @param self::LOG_TYPE_* $logType
*/
public function setLogType($logType)
{
$this->logType = $logType;
}
/**
* @return self::LOG_TYPE_*
*/
public function getLogType()
{
return $this->logType;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(AuditLogConfig::class, 'Google_Service_CloudKMS_AuditLogConfig');
@@ -0,0 +1,212 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class AutokeyConfig extends \Google\Model
{
/**
* Default value. KeyProjectResolutionMode when not specified will act as
* `DEDICATED_KEY_PROJECT`.
*/
public const KEY_PROJECT_RESOLUTION_MODE_KEY_PROJECT_RESOLUTION_MODE_UNSPECIFIED = 'KEY_PROJECT_RESOLUTION_MODE_UNSPECIFIED';
/**
* Keys are created in a dedicated project specified by `key_project`.
*/
public const KEY_PROJECT_RESOLUTION_MODE_DEDICATED_KEY_PROJECT = 'DEDICATED_KEY_PROJECT';
/**
* Keys are created in the same project as the resource requesting the key.
* The `key_project` must not be set when this mode is used.
*/
public const KEY_PROJECT_RESOLUTION_MODE_RESOURCE_PROJECT = 'RESOURCE_PROJECT';
/**
* Disables the AutokeyConfig. When this mode is set, any AutokeyConfig from
* higher levels in the resource hierarchy are ignored for this resource and
* its descendants. This setting can be overridden by a more specific
* configuration at a lower level. For example, if Autokey is disabled on a
* folder, it can be re-enabled on a sub-folder or project within that folder
* by setting a different mode (e.g., DEDICATED_KEY_PROJECT or
* RESOURCE_PROJECT).
*/
public const KEY_PROJECT_RESOLUTION_MODE_DISABLED = 'DISABLED';
/**
* The state of the AutokeyConfig is unspecified.
*/
public const STATE_STATE_UNSPECIFIED = 'STATE_UNSPECIFIED';
/**
* The AutokeyConfig is currently active.
*/
public const STATE_ACTIVE = 'ACTIVE';
/**
* A previously configured key project has been deleted and the current
* AutokeyConfig is unusable.
*/
public const STATE_KEY_PROJECT_DELETED = 'KEY_PROJECT_DELETED';
/**
* The AutokeyConfig is not yet initialized or has been reset to its default
* uninitialized state.
*/
public const STATE_UNINITIALIZED = 'UNINITIALIZED';
/**
* Optional. A checksum computed by the server based on the value of other
* fields. This may be sent on update requests to ensure that the client has
* an up-to-date value before proceeding. The request will be rejected with an
* ABORTED error on a mismatched etag.
*
* @var string
*/
public $etag;
/**
* Optional. Name of the key project, e.g. `projects/{PROJECT_ID}` or
* `projects/{PROJECT_NUMBER}`, where Cloud KMS Autokey will provision a new
* CryptoKey when a KeyHandle is created. On UpdateAutokeyConfig, the caller
* will require `cloudkms.cryptoKeys.setIamPolicy` permission on this key
* project. Once configured, for Cloud KMS Autokey to function properly, this
* key project must have the Cloud KMS API activated and the Cloud KMS Service
* Agent for this key project must be granted the `cloudkms.admin` role (or
* pertinent permissions). A request with an empty key project field will
* clear the configuration.
*
* @var string
*/
public $keyProject;
/**
* Optional. KeyProjectResolutionMode for the AutokeyConfig. Valid values are
* `DEDICATED_KEY_PROJECT`, `RESOURCE_PROJECT`, or `DISABLED`.
*
* @var string
*/
public $keyProjectResolutionMode;
/**
* Identifier. Name of the AutokeyConfig resource, e.g.
* `folders/{FOLDER_NUMBER}/autokeyConfig` or
* `projects/{PROJECT_NUMBER}/autokeyConfig`.
*
* @var string
*/
public $name;
/**
* Output only. The state for the AutokeyConfig.
*
* @var string
*/
public $state;
/**
* Optional. A checksum computed by the server based on the value of other
* fields. This may be sent on update requests to ensure that the client has
* an up-to-date value before proceeding. The request will be rejected with an
* ABORTED error on a mismatched etag.
*
* @param string $etag
*/
public function setEtag($etag)
{
$this->etag = $etag;
}
/**
* @return string
*/
public function getEtag()
{
return $this->etag;
}
/**
* Optional. Name of the key project, e.g. `projects/{PROJECT_ID}` or
* `projects/{PROJECT_NUMBER}`, where Cloud KMS Autokey will provision a new
* CryptoKey when a KeyHandle is created. On UpdateAutokeyConfig, the caller
* will require `cloudkms.cryptoKeys.setIamPolicy` permission on this key
* project. Once configured, for Cloud KMS Autokey to function properly, this
* key project must have the Cloud KMS API activated and the Cloud KMS Service
* Agent for this key project must be granted the `cloudkms.admin` role (or
* pertinent permissions). A request with an empty key project field will
* clear the configuration.
*
* @param string $keyProject
*/
public function setKeyProject($keyProject)
{
$this->keyProject = $keyProject;
}
/**
* @return string
*/
public function getKeyProject()
{
return $this->keyProject;
}
/**
* Optional. KeyProjectResolutionMode for the AutokeyConfig. Valid values are
* `DEDICATED_KEY_PROJECT`, `RESOURCE_PROJECT`, or `DISABLED`.
*
* Accepted values: KEY_PROJECT_RESOLUTION_MODE_UNSPECIFIED,
* DEDICATED_KEY_PROJECT, RESOURCE_PROJECT, DISABLED
*
* @param self::KEY_PROJECT_RESOLUTION_MODE_* $keyProjectResolutionMode
*/
public function setKeyProjectResolutionMode($keyProjectResolutionMode)
{
$this->keyProjectResolutionMode = $keyProjectResolutionMode;
}
/**
* @return self::KEY_PROJECT_RESOLUTION_MODE_*
*/
public function getKeyProjectResolutionMode()
{
return $this->keyProjectResolutionMode;
}
/**
* Identifier. Name of the AutokeyConfig resource, e.g.
* `folders/{FOLDER_NUMBER}/autokeyConfig` or
* `projects/{PROJECT_NUMBER}/autokeyConfig`.
*
* @param string $name
*/
public function setName($name)
{
$this->name = $name;
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* Output only. The state for the AutokeyConfig.
*
* Accepted values: STATE_UNSPECIFIED, ACTIVE, KEY_PROJECT_DELETED,
* UNINITIALIZED
*
* @param self::STATE_* $state
*/
public function setState($state)
{
$this->state = $state;
}
/**
* @return self::STATE_*
*/
public function getState()
{
return $this->state;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(AutokeyConfig::class, 'Google_Service_CloudKMS_AutokeyConfig');
@@ -0,0 +1,216 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class Binding extends \Google\Collection
{
protected $collection_key = 'members';
protected $conditionType = Expr::class;
protected $conditionDataType = '';
/**
* Specifies the principals requesting access for a Google Cloud resource.
* `members` can have the following values: * `allUsers`: A special identifier
* that represents anyone who is on the internet; with or without a Google
* account. * `allAuthenticatedUsers`: A special identifier that represents
* anyone who is authenticated with a Google account or a service account.
* Does not include identities that come from external identity providers
* (IdPs) through identity federation. * `user:{emailid}`: An email address
* that represents a specific Google account. For example, `alice@example.com`
* . * `serviceAccount:{emailid}`: An email address that represents a Google
* service account. For example, `my-other-app@appspot.gserviceaccount.com`. *
* `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An
* identifier for a [Kubernetes service
* account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-
* service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-
* kubernetes-sa]`. * `group:{emailid}`: An email address that represents a
* Google group. For example, `admins@example.com`. * `domain:{domain}`: The G
* Suite domain (primary) that represents all the users of that domain. For
* example, `google.com` or `example.com`. * `principal://iam.googleapis.com/l
* ocations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`
* : A single identity in a workforce identity pool. * `principalSet://iam.goo
* gleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`:
* All workforce identities in a group. * `principalSet://iam.googleapis.com/l
* ocations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attrib
* ute_value}`: All workforce identities with a specific attribute value. * `p
* rincipalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}`
* : All identities in a workforce identity pool. * `principal://iam.googleapi
* s.com/projects/{project_number}/locations/global/workloadIdentityPools/{poo
* l_id}/subject/{subject_attribute_value}`: A single identity in a workload
* identity pool. * `principalSet://iam.googleapis.com/projects/{project_numbe
* r}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A
* workload identity pool group. * `principalSet://iam.googleapis.com/projects
* /{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribut
* e.{attribute_name}/{attribute_value}`: All identities in a workload
* identity pool with a certain attribute. * `principalSet://iam.googleapis.co
* m/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id
* }`: All identities in a workload identity pool. *
* `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
* identifier) representing a user that has been recently deleted. For
* example, `alice@example.com?uid=123456789012345678901`. If the user is
* recovered, this value reverts to `user:{emailid}` and the recovered user
* retains the role in the binding. *
* `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
* unique identifier) representing a service account that has been recently
* deleted. For example, `my-other-
* app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service
* account is undeleted, this value reverts to `serviceAccount:{emailid}` and
* the undeleted service account retains the role in the binding. *
* `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
* identifier) representing a Google group that has been recently deleted. For
* example, `admins@example.com?uid=123456789012345678901`. If the group is
* recovered, this value reverts to `group:{emailid}` and the recovered group
* retains the role in the binding. * `deleted:principal://iam.googleapis.com/
* locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}
* `: Deleted single identity in a workforce identity pool. For example,
* `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-
* pool-id/subject/my-subject-attribute-value`.
*
* @var string[]
*/
public $members;
/**
* Role that is assigned to the list of `members`, or principals. For example,
* `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the
* IAM roles and permissions, see the [IAM
* documentation](https://cloud.google.com/iam/docs/roles-overview). For a
* list of the available pre-defined roles, see
* [here](https://cloud.google.com/iam/docs/understanding-roles).
*
* @var string
*/
public $role;
/**
* The condition that is associated with this binding. If the condition
* evaluates to `true`, then this binding applies to the current request. If
* the condition evaluates to `false`, then this binding does not apply to the
* current request. However, a different role binding might grant the same
* role to one or more of the principals in this binding. To learn which
* resources support conditions in their IAM policies, see the [IAM
* documentation](https://cloud.google.com/iam/help/conditions/resource-
* policies).
*
* @param Expr $condition
*/
public function setCondition(Expr $condition)
{
$this->condition = $condition;
}
/**
* @return Expr
*/
public function getCondition()
{
return $this->condition;
}
/**
* Specifies the principals requesting access for a Google Cloud resource.
* `members` can have the following values: * `allUsers`: A special identifier
* that represents anyone who is on the internet; with or without a Google
* account. * `allAuthenticatedUsers`: A special identifier that represents
* anyone who is authenticated with a Google account or a service account.
* Does not include identities that come from external identity providers
* (IdPs) through identity federation. * `user:{emailid}`: An email address
* that represents a specific Google account. For example, `alice@example.com`
* . * `serviceAccount:{emailid}`: An email address that represents a Google
* service account. For example, `my-other-app@appspot.gserviceaccount.com`. *
* `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An
* identifier for a [Kubernetes service
* account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-
* service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-
* kubernetes-sa]`. * `group:{emailid}`: An email address that represents a
* Google group. For example, `admins@example.com`. * `domain:{domain}`: The G
* Suite domain (primary) that represents all the users of that domain. For
* example, `google.com` or `example.com`. * `principal://iam.googleapis.com/l
* ocations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`
* : A single identity in a workforce identity pool. * `principalSet://iam.goo
* gleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`:
* All workforce identities in a group. * `principalSet://iam.googleapis.com/l
* ocations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attrib
* ute_value}`: All workforce identities with a specific attribute value. * `p
* rincipalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}`
* : All identities in a workforce identity pool. * `principal://iam.googleapi
* s.com/projects/{project_number}/locations/global/workloadIdentityPools/{poo
* l_id}/subject/{subject_attribute_value}`: A single identity in a workload
* identity pool. * `principalSet://iam.googleapis.com/projects/{project_numbe
* r}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A
* workload identity pool group. * `principalSet://iam.googleapis.com/projects
* /{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribut
* e.{attribute_name}/{attribute_value}`: All identities in a workload
* identity pool with a certain attribute. * `principalSet://iam.googleapis.co
* m/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id
* }`: All identities in a workload identity pool. *
* `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
* identifier) representing a user that has been recently deleted. For
* example, `alice@example.com?uid=123456789012345678901`. If the user is
* recovered, this value reverts to `user:{emailid}` and the recovered user
* retains the role in the binding. *
* `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
* unique identifier) representing a service account that has been recently
* deleted. For example, `my-other-
* app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service
* account is undeleted, this value reverts to `serviceAccount:{emailid}` and
* the undeleted service account retains the role in the binding. *
* `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
* identifier) representing a Google group that has been recently deleted. For
* example, `admins@example.com?uid=123456789012345678901`. If the group is
* recovered, this value reverts to `group:{emailid}` and the recovered group
* retains the role in the binding. * `deleted:principal://iam.googleapis.com/
* locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}
* `: Deleted single identity in a workforce identity pool. For example,
* `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-
* pool-id/subject/my-subject-attribute-value`.
*
* @param string[] $members
*/
public function setMembers($members)
{
$this->members = $members;
}
/**
* @return string[]
*/
public function getMembers()
{
return $this->members;
}
/**
* Role that is assigned to the list of `members`, or principals. For example,
* `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the
* IAM roles and permissions, see the [IAM
* documentation](https://cloud.google.com/iam/docs/roles-overview). For a
* list of the available pre-defined roles, see
* [here](https://cloud.google.com/iam/docs/understanding-roles).
*
* @param string $role
*/
public function setRole($role)
{
$this->role = $role;
}
/**
* @return string
*/
public function getRole()
{
return $this->role;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Binding::class, 'Google_Service_CloudKMS_Binding');
@@ -0,0 +1,239 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class Certificate extends \Google\Collection
{
protected $collection_key = 'subjectAlternativeDnsNames';
/**
* Output only. The issuer distinguished name in RFC 2253 format. Only present
* if parsed is true.
*
* @var string
*/
public $issuer;
/**
* Output only. The certificate is not valid after this time. Only present if
* parsed is true.
*
* @var string
*/
public $notAfterTime;
/**
* Output only. The certificate is not valid before this time. Only present if
* parsed is true.
*
* @var string
*/
public $notBeforeTime;
/**
* Output only. True if the certificate was parsed successfully.
*
* @var bool
*/
public $parsed;
/**
* Required. The raw certificate bytes in DER format.
*
* @var string
*/
public $rawDer;
/**
* Output only. The certificate serial number as a hex string. Only present if
* parsed is true.
*
* @var string
*/
public $serialNumber;
/**
* Output only. The SHA-256 certificate fingerprint as a hex string. Only
* present if parsed is true.
*
* @var string
*/
public $sha256Fingerprint;
/**
* Output only. The subject distinguished name in RFC 2253 format. Only
* present if parsed is true.
*
* @var string
*/
public $subject;
/**
* Output only. The subject Alternative DNS names. Only present if parsed is
* true.
*
* @var string[]
*/
public $subjectAlternativeDnsNames;
/**
* Output only. The issuer distinguished name in RFC 2253 format. Only present
* if parsed is true.
*
* @param string $issuer
*/
public function setIssuer($issuer)
{
$this->issuer = $issuer;
}
/**
* @return string
*/
public function getIssuer()
{
return $this->issuer;
}
/**
* Output only. The certificate is not valid after this time. Only present if
* parsed is true.
*
* @param string $notAfterTime
*/
public function setNotAfterTime($notAfterTime)
{
$this->notAfterTime = $notAfterTime;
}
/**
* @return string
*/
public function getNotAfterTime()
{
return $this->notAfterTime;
}
/**
* Output only. The certificate is not valid before this time. Only present if
* parsed is true.
*
* @param string $notBeforeTime
*/
public function setNotBeforeTime($notBeforeTime)
{
$this->notBeforeTime = $notBeforeTime;
}
/**
* @return string
*/
public function getNotBeforeTime()
{
return $this->notBeforeTime;
}
/**
* Output only. True if the certificate was parsed successfully.
*
* @param bool $parsed
*/
public function setParsed($parsed)
{
$this->parsed = $parsed;
}
/**
* @return bool
*/
public function getParsed()
{
return $this->parsed;
}
/**
* Required. The raw certificate bytes in DER format.
*
* @param string $rawDer
*/
public function setRawDer($rawDer)
{
$this->rawDer = $rawDer;
}
/**
* @return string
*/
public function getRawDer()
{
return $this->rawDer;
}
/**
* Output only. The certificate serial number as a hex string. Only present if
* parsed is true.
*
* @param string $serialNumber
*/
public function setSerialNumber($serialNumber)
{
$this->serialNumber = $serialNumber;
}
/**
* @return string
*/
public function getSerialNumber()
{
return $this->serialNumber;
}
/**
* Output only. The SHA-256 certificate fingerprint as a hex string. Only
* present if parsed is true.
*
* @param string $sha256Fingerprint
*/
public function setSha256Fingerprint($sha256Fingerprint)
{
$this->sha256Fingerprint = $sha256Fingerprint;
}
/**
* @return string
*/
public function getSha256Fingerprint()
{
return $this->sha256Fingerprint;
}
/**
* Output only. The subject distinguished name in RFC 2253 format. Only
* present if parsed is true.
*
* @param string $subject
*/
public function setSubject($subject)
{
$this->subject = $subject;
}
/**
* @return string
*/
public function getSubject()
{
return $this->subject;
}
/**
* Output only. The subject Alternative DNS names. Only present if parsed is
* true.
*
* @param string[] $subjectAlternativeDnsNames
*/
public function setSubjectAlternativeDnsNames($subjectAlternativeDnsNames)
{
$this->subjectAlternativeDnsNames = $subjectAlternativeDnsNames;
}
/**
* @return string[]
*/
public function getSubjectAlternativeDnsNames()
{
return $this->subjectAlternativeDnsNames;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Certificate::class, 'Google_Service_CloudKMS_Certificate');
@@ -0,0 +1,93 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class CertificateChains extends \Google\Collection
{
protected $collection_key = 'googlePartitionCerts';
/**
* Cavium certificate chain corresponding to the attestation.
*
* @var string[]
*/
public $caviumCerts;
/**
* Google card certificate chain corresponding to the attestation.
*
* @var string[]
*/
public $googleCardCerts;
/**
* Google partition certificate chain corresponding to the attestation.
*
* @var string[]
*/
public $googlePartitionCerts;
/**
* Cavium certificate chain corresponding to the attestation.
*
* @param string[] $caviumCerts
*/
public function setCaviumCerts($caviumCerts)
{
$this->caviumCerts = $caviumCerts;
}
/**
* @return string[]
*/
public function getCaviumCerts()
{
return $this->caviumCerts;
}
/**
* Google card certificate chain corresponding to the attestation.
*
* @param string[] $googleCardCerts
*/
public function setGoogleCardCerts($googleCardCerts)
{
$this->googleCardCerts = $googleCardCerts;
}
/**
* @return string[]
*/
public function getGoogleCardCerts()
{
return $this->googleCardCerts;
}
/**
* Google partition certificate chain corresponding to the attestation.
*
* @param string[] $googlePartitionCerts
*/
public function setGooglePartitionCerts($googlePartitionCerts)
{
$this->googlePartitionCerts = $googlePartitionCerts;
}
/**
* @return string[]
*/
public function getGooglePartitionCerts()
{
return $this->googlePartitionCerts;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(CertificateChains::class, 'Google_Service_CloudKMS_CertificateChains');
@@ -0,0 +1,74 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class Challenge extends \Google\Model
{
/**
* Output only. The challenge to be signed by the 2FA key indicated by the
* public key.
*
* @var string
*/
public $challenge;
/**
* Output only. The public key associated with the 2FA key that should sign
* the challenge.
*
* @var string
*/
public $publicKeyPem;
/**
* Output only. The challenge to be signed by the 2FA key indicated by the
* public key.
*
* @param string $challenge
*/
public function setChallenge($challenge)
{
$this->challenge = $challenge;
}
/**
* @return string
*/
public function getChallenge()
{
return $this->challenge;
}
/**
* Output only. The public key associated with the 2FA key that should sign
* the challenge.
*
* @param string $publicKeyPem
*/
public function setPublicKeyPem($publicKeyPem)
{
$this->publicKeyPem = $publicKeyPem;
}
/**
* @return string
*/
public function getPublicKeyPem()
{
return $this->publicKeyPem;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Challenge::class, 'Google_Service_CloudKMS_Challenge');
@@ -0,0 +1,72 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class ChallengeReply extends \Google\Model
{
/**
* Required. The public key associated with the 2FA key.
*
* @var string
*/
public $publicKeyPem;
/**
* Required. The signed challenge associated with the 2FA key. The signature
* must be RSASSA-PKCS1 v1.5 with a SHA256 digest.
*
* @var string
*/
public $signedChallenge;
/**
* Required. The public key associated with the 2FA key.
*
* @param string $publicKeyPem
*/
public function setPublicKeyPem($publicKeyPem)
{
$this->publicKeyPem = $publicKeyPem;
}
/**
* @return string
*/
public function getPublicKeyPem()
{
return $this->publicKeyPem;
}
/**
* Required. The signed challenge associated with the 2FA key. The signature
* must be RSASSA-PKCS1 v1.5 with a SHA256 digest.
*
* @param string $signedChallenge
*/
public function setSignedChallenge($signedChallenge)
{
$this->signedChallenge = $signedChallenge;
}
/**
* @return string
*/
public function getSignedChallenge()
{
return $this->signedChallenge;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ChallengeReply::class, 'Google_Service_CloudKMS_ChallengeReply');
@@ -0,0 +1,88 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class ChecksummedData extends \Google\Model
{
/**
* Integrity verification field. A CRC32C checksum of the returned
* ChecksummedData.data. An integrity check of ChecksummedData.data can be
* performed by computing the CRC32C checksum of ChecksummedData.data and
* comparing your results to this field. Discard the response in case of non-
* matching checksum values, and perform a limited number of retries. A
* persistent mismatch may indicate an issue in your computation of the CRC32C
* checksum. Note: This field is defined as int64 for reasons of compatibility
* across different languages. However, it is a non-negative integer, which
* will never exceed `2^32-1`, and can be safely downconverted to uint32 in
* languages that support this type.
*
* @var string
*/
public $crc32cChecksum;
/**
* Raw Data.
*
* @var string
*/
public $data;
/**
* Integrity verification field. A CRC32C checksum of the returned
* ChecksummedData.data. An integrity check of ChecksummedData.data can be
* performed by computing the CRC32C checksum of ChecksummedData.data and
* comparing your results to this field. Discard the response in case of non-
* matching checksum values, and perform a limited number of retries. A
* persistent mismatch may indicate an issue in your computation of the CRC32C
* checksum. Note: This field is defined as int64 for reasons of compatibility
* across different languages. However, it is a non-negative integer, which
* will never exceed `2^32-1`, and can be safely downconverted to uint32 in
* languages that support this type.
*
* @param string $crc32cChecksum
*/
public function setCrc32cChecksum($crc32cChecksum)
{
$this->crc32cChecksum = $crc32cChecksum;
}
/**
* @return string
*/
public function getCrc32cChecksum()
{
return $this->crc32cChecksum;
}
/**
* Raw Data.
*
* @param string $data
*/
public function setData($data)
{
$this->data = $data;
}
/**
* @return string
*/
public function getData()
{
return $this->data;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ChecksummedData::class, 'Google_Service_CloudKMS_ChecksummedData');
@@ -0,0 +1,25 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class CloudkmsEmpty extends \Google\Model
{
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(CloudkmsEmpty::class, 'Google_Service_CloudKMS_CloudkmsEmpty');
@@ -0,0 +1,372 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class CryptoKey extends \Google\Model
{
/**
* Not specified.
*/
public const PURPOSE_CRYPTO_KEY_PURPOSE_UNSPECIFIED = 'CRYPTO_KEY_PURPOSE_UNSPECIFIED';
/**
* CryptoKeys with this purpose may be used with Encrypt and Decrypt.
*/
public const PURPOSE_ENCRYPT_DECRYPT = 'ENCRYPT_DECRYPT';
/**
* CryptoKeys with this purpose may be used with AsymmetricSign and
* GetPublicKey.
*/
public const PURPOSE_ASYMMETRIC_SIGN = 'ASYMMETRIC_SIGN';
/**
* CryptoKeys with this purpose may be used with AsymmetricDecrypt and
* GetPublicKey.
*/
public const PURPOSE_ASYMMETRIC_DECRYPT = 'ASYMMETRIC_DECRYPT';
/**
* CryptoKeys with this purpose may be used with RawEncrypt and RawDecrypt.
* This purpose is meant to be used for interoperable symmetric encryption and
* does not support automatic CryptoKey rotation.
*/
public const PURPOSE_RAW_ENCRYPT_DECRYPT = 'RAW_ENCRYPT_DECRYPT';
/**
* CryptoKeys with this purpose may be used with MacSign.
*/
public const PURPOSE_MAC = 'MAC';
/**
* CryptoKeys with this purpose may be used with GetPublicKey and Decapsulate.
*/
public const PURPOSE_KEY_ENCAPSULATION = 'KEY_ENCAPSULATION';
/**
* Output only. The time at which this CryptoKey was created.
*
* @var string
*/
public $createTime;
/**
* Immutable. The resource name of the backend environment where the key
* material for all CryptoKeyVersions associated with this CryptoKey reside
* and where all related cryptographic operations are performed. Only
* applicable if CryptoKeyVersions have a ProtectionLevel of EXTERNAL_VPC,
* with the resource name in the format `projects/locations/ekmConnections`.
* Only applicable if CryptoKeyVersions have a ProtectionLevel of
* HSM_SINGLE_TENANT, with the resource name in the format
* `projects/locations/singleTenantHsmInstances`. Note, this list is non-
* exhaustive and may apply to additional ProtectionLevels in the future.
*
* @var string
*/
public $cryptoKeyBackend;
/**
* Immutable. The period of time that versions of this key spend in the
* DESTROY_SCHEDULED state before transitioning to DESTROYED. If not specified
* at creation time, the default duration is 30 days.
*
* @var string
*/
public $destroyScheduledDuration;
/**
* Immutable. Whether this key may contain imported versions only.
*
* @var bool
*/
public $importOnly;
protected $keyAccessJustificationsPolicyType = KeyAccessJustificationsPolicy::class;
protected $keyAccessJustificationsPolicyDataType = '';
/**
* Labels with user-defined metadata. For more information, see [Labeling
* Keys](https://cloud.google.com/kms/docs/labeling-keys).
*
* @var string[]
*/
public $labels;
/**
* Output only. The resource name for this CryptoKey in the format
* `projects/locations/keyRings/cryptoKeys`.
*
* @var string
*/
public $name;
/**
* At next_rotation_time, the Key Management Service will automatically: 1.
* Create a new version of this CryptoKey. 2. Mark the new version as primary.
* Key rotations performed manually via CreateCryptoKeyVersion and
* UpdateCryptoKeyPrimaryVersion do not affect next_rotation_time. Keys with
* purpose ENCRYPT_DECRYPT support automatic rotation. For other keys, this
* field must be omitted.
*
* @var string
*/
public $nextRotationTime;
protected $primaryType = CryptoKeyVersion::class;
protected $primaryDataType = '';
/**
* Immutable. The immutable purpose of this CryptoKey.
*
* @var string
*/
public $purpose;
/**
* next_rotation_time will be advanced by this period when the service
* automatically rotates a key. Must be at least 24 hours and at most 876,000
* hours. If rotation_period is set, next_rotation_time must also be set. Keys
* with purpose ENCRYPT_DECRYPT support automatic rotation. For other keys,
* this field must be omitted.
*
* @var string
*/
public $rotationPeriod;
protected $versionTemplateType = CryptoKeyVersionTemplate::class;
protected $versionTemplateDataType = '';
/**
* Output only. The time at which this CryptoKey was created.
*
* @param string $createTime
*/
public function setCreateTime($createTime)
{
$this->createTime = $createTime;
}
/**
* @return string
*/
public function getCreateTime()
{
return $this->createTime;
}
/**
* Immutable. The resource name of the backend environment where the key
* material for all CryptoKeyVersions associated with this CryptoKey reside
* and where all related cryptographic operations are performed. Only
* applicable if CryptoKeyVersions have a ProtectionLevel of EXTERNAL_VPC,
* with the resource name in the format `projects/locations/ekmConnections`.
* Only applicable if CryptoKeyVersions have a ProtectionLevel of
* HSM_SINGLE_TENANT, with the resource name in the format
* `projects/locations/singleTenantHsmInstances`. Note, this list is non-
* exhaustive and may apply to additional ProtectionLevels in the future.
*
* @param string $cryptoKeyBackend
*/
public function setCryptoKeyBackend($cryptoKeyBackend)
{
$this->cryptoKeyBackend = $cryptoKeyBackend;
}
/**
* @return string
*/
public function getCryptoKeyBackend()
{
return $this->cryptoKeyBackend;
}
/**
* Immutable. The period of time that versions of this key spend in the
* DESTROY_SCHEDULED state before transitioning to DESTROYED. If not specified
* at creation time, the default duration is 30 days.
*
* @param string $destroyScheduledDuration
*/
public function setDestroyScheduledDuration($destroyScheduledDuration)
{
$this->destroyScheduledDuration = $destroyScheduledDuration;
}
/**
* @return string
*/
public function getDestroyScheduledDuration()
{
return $this->destroyScheduledDuration;
}
/**
* Immutable. Whether this key may contain imported versions only.
*
* @param bool $importOnly
*/
public function setImportOnly($importOnly)
{
$this->importOnly = $importOnly;
}
/**
* @return bool
*/
public function getImportOnly()
{
return $this->importOnly;
}
/**
* Optional. The policy used for Key Access Justifications Policy Enforcement.
* If this field is present and this key is enrolled in Key Access
* Justifications Policy Enforcement, the policy will be evaluated in encrypt,
* decrypt, and sign operations, and the operation will fail if rejected by
* the policy. The policy is defined by specifying zero or more allowed
* justification codes. https://cloud.google.com/assured-workloads/key-access-
* justifications/docs/justification-codes By default, this field is absent,
* and all justification codes are allowed. If the
* `key_access_justifications_policy.allowed_access_reasons` is empty (zero
* allowed justification code), all encrypt, decrypt, and sign operations will
* fail.
*
* @param KeyAccessJustificationsPolicy $keyAccessJustificationsPolicy
*/
public function setKeyAccessJustificationsPolicy(KeyAccessJustificationsPolicy $keyAccessJustificationsPolicy)
{
$this->keyAccessJustificationsPolicy = $keyAccessJustificationsPolicy;
}
/**
* @return KeyAccessJustificationsPolicy
*/
public function getKeyAccessJustificationsPolicy()
{
return $this->keyAccessJustificationsPolicy;
}
/**
* Labels with user-defined metadata. For more information, see [Labeling
* Keys](https://cloud.google.com/kms/docs/labeling-keys).
*
* @param string[] $labels
*/
public function setLabels($labels)
{
$this->labels = $labels;
}
/**
* @return string[]
*/
public function getLabels()
{
return $this->labels;
}
/**
* Output only. The resource name for this CryptoKey in the format
* `projects/locations/keyRings/cryptoKeys`.
*
* @param string $name
*/
public function setName($name)
{
$this->name = $name;
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* At next_rotation_time, the Key Management Service will automatically: 1.
* Create a new version of this CryptoKey. 2. Mark the new version as primary.
* Key rotations performed manually via CreateCryptoKeyVersion and
* UpdateCryptoKeyPrimaryVersion do not affect next_rotation_time. Keys with
* purpose ENCRYPT_DECRYPT support automatic rotation. For other keys, this
* field must be omitted.
*
* @param string $nextRotationTime
*/
public function setNextRotationTime($nextRotationTime)
{
$this->nextRotationTime = $nextRotationTime;
}
/**
* @return string
*/
public function getNextRotationTime()
{
return $this->nextRotationTime;
}
/**
* Output only. A copy of the "primary" CryptoKeyVersion that will be used by
* Encrypt when this CryptoKey is given in EncryptRequest.name. The
* CryptoKey's primary version can be updated via
* UpdateCryptoKeyPrimaryVersion. Keys with purpose ENCRYPT_DECRYPT may have a
* primary. For other keys, this field will be omitted.
*
* @param CryptoKeyVersion $primary
*/
public function setPrimary(CryptoKeyVersion $primary)
{
$this->primary = $primary;
}
/**
* @return CryptoKeyVersion
*/
public function getPrimary()
{
return $this->primary;
}
/**
* Immutable. The immutable purpose of this CryptoKey.
*
* Accepted values: CRYPTO_KEY_PURPOSE_UNSPECIFIED, ENCRYPT_DECRYPT,
* ASYMMETRIC_SIGN, ASYMMETRIC_DECRYPT, RAW_ENCRYPT_DECRYPT, MAC,
* KEY_ENCAPSULATION
*
* @param self::PURPOSE_* $purpose
*/
public function setPurpose($purpose)
{
$this->purpose = $purpose;
}
/**
* @return self::PURPOSE_*
*/
public function getPurpose()
{
return $this->purpose;
}
/**
* next_rotation_time will be advanced by this period when the service
* automatically rotates a key. Must be at least 24 hours and at most 876,000
* hours. If rotation_period is set, next_rotation_time must also be set. Keys
* with purpose ENCRYPT_DECRYPT support automatic rotation. For other keys,
* this field must be omitted.
*
* @param string $rotationPeriod
*/
public function setRotationPeriod($rotationPeriod)
{
$this->rotationPeriod = $rotationPeriod;
}
/**
* @return string
*/
public function getRotationPeriod()
{
return $this->rotationPeriod;
}
/**
* A template describing settings for new CryptoKeyVersion instances. The
* properties of new CryptoKeyVersion instances created by either
* CreateCryptoKeyVersion or auto-rotation are controlled by this template.
*
* @param CryptoKeyVersionTemplate $versionTemplate
*/
public function setVersionTemplate(CryptoKeyVersionTemplate $versionTemplate)
{
$this->versionTemplate = $versionTemplate;
}
/**
* @return CryptoKeyVersionTemplate
*/
public function getVersionTemplate()
{
return $this->versionTemplate;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(CryptoKey::class, 'Google_Service_CloudKMS_CryptoKey');
@@ -0,0 +1,721 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class CryptoKeyVersion extends \Google\Model
{
/**
* Not specified.
*/
public const ALGORITHM_CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED = 'CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED';
/**
* Creates symmetric encryption keys.
*/
public const ALGORITHM_GOOGLE_SYMMETRIC_ENCRYPTION = 'GOOGLE_SYMMETRIC_ENCRYPTION';
/**
* AES-GCM (Galois Counter Mode) using 128-bit keys.
*/
public const ALGORITHM_AES_128_GCM = 'AES_128_GCM';
/**
* AES-GCM (Galois Counter Mode) using 256-bit keys.
*/
public const ALGORITHM_AES_256_GCM = 'AES_256_GCM';
/**
* AES-CBC (Cipher Block Chaining Mode) using 128-bit keys.
*/
public const ALGORITHM_AES_128_CBC = 'AES_128_CBC';
/**
* AES-CBC (Cipher Block Chaining Mode) using 256-bit keys.
*/
public const ALGORITHM_AES_256_CBC = 'AES_256_CBC';
/**
* AES-CTR (Counter Mode) using 128-bit keys.
*/
public const ALGORITHM_AES_128_CTR = 'AES_128_CTR';
/**
* AES-CTR (Counter Mode) using 256-bit keys.
*/
public const ALGORITHM_AES_256_CTR = 'AES_256_CTR';
/**
* RSASSA-PSS 2048 bit key with a SHA256 digest.
*/
public const ALGORITHM_RSA_SIGN_PSS_2048_SHA256 = 'RSA_SIGN_PSS_2048_SHA256';
/**
* RSASSA-PSS 3072 bit key with a SHA256 digest.
*/
public const ALGORITHM_RSA_SIGN_PSS_3072_SHA256 = 'RSA_SIGN_PSS_3072_SHA256';
/**
* RSASSA-PSS 4096 bit key with a SHA256 digest.
*/
public const ALGORITHM_RSA_SIGN_PSS_4096_SHA256 = 'RSA_SIGN_PSS_4096_SHA256';
/**
* RSASSA-PSS 4096 bit key with a SHA512 digest.
*/
public const ALGORITHM_RSA_SIGN_PSS_4096_SHA512 = 'RSA_SIGN_PSS_4096_SHA512';
/**
* RSASSA-PKCS1-v1_5 with a 2048 bit key and a SHA256 digest.
*/
public const ALGORITHM_RSA_SIGN_PKCS1_2048_SHA256 = 'RSA_SIGN_PKCS1_2048_SHA256';
/**
* RSASSA-PKCS1-v1_5 with a 3072 bit key and a SHA256 digest.
*/
public const ALGORITHM_RSA_SIGN_PKCS1_3072_SHA256 = 'RSA_SIGN_PKCS1_3072_SHA256';
/**
* RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA256 digest.
*/
public const ALGORITHM_RSA_SIGN_PKCS1_4096_SHA256 = 'RSA_SIGN_PKCS1_4096_SHA256';
/**
* RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA512 digest.
*/
public const ALGORITHM_RSA_SIGN_PKCS1_4096_SHA512 = 'RSA_SIGN_PKCS1_4096_SHA512';
/**
* RSASSA-PKCS1-v1_5 signing without encoding, with a 2048 bit key.
*/
public const ALGORITHM_RSA_SIGN_RAW_PKCS1_2048 = 'RSA_SIGN_RAW_PKCS1_2048';
/**
* RSASSA-PKCS1-v1_5 signing without encoding, with a 3072 bit key.
*/
public const ALGORITHM_RSA_SIGN_RAW_PKCS1_3072 = 'RSA_SIGN_RAW_PKCS1_3072';
/**
* RSASSA-PKCS1-v1_5 signing without encoding, with a 4096 bit key.
*/
public const ALGORITHM_RSA_SIGN_RAW_PKCS1_4096 = 'RSA_SIGN_RAW_PKCS1_4096';
/**
* RSAES-OAEP 2048 bit key with a SHA256 digest.
*/
public const ALGORITHM_RSA_DECRYPT_OAEP_2048_SHA256 = 'RSA_DECRYPT_OAEP_2048_SHA256';
/**
* RSAES-OAEP 3072 bit key with a SHA256 digest.
*/
public const ALGORITHM_RSA_DECRYPT_OAEP_3072_SHA256 = 'RSA_DECRYPT_OAEP_3072_SHA256';
/**
* RSAES-OAEP 4096 bit key with a SHA256 digest.
*/
public const ALGORITHM_RSA_DECRYPT_OAEP_4096_SHA256 = 'RSA_DECRYPT_OAEP_4096_SHA256';
/**
* RSAES-OAEP 4096 bit key with a SHA512 digest.
*/
public const ALGORITHM_RSA_DECRYPT_OAEP_4096_SHA512 = 'RSA_DECRYPT_OAEP_4096_SHA512';
/**
* RSAES-OAEP 2048 bit key with a SHA1 digest.
*/
public const ALGORITHM_RSA_DECRYPT_OAEP_2048_SHA1 = 'RSA_DECRYPT_OAEP_2048_SHA1';
/**
* RSAES-OAEP 3072 bit key with a SHA1 digest.
*/
public const ALGORITHM_RSA_DECRYPT_OAEP_3072_SHA1 = 'RSA_DECRYPT_OAEP_3072_SHA1';
/**
* RSAES-OAEP 4096 bit key with a SHA1 digest.
*/
public const ALGORITHM_RSA_DECRYPT_OAEP_4096_SHA1 = 'RSA_DECRYPT_OAEP_4096_SHA1';
/**
* ECDSA on the NIST P-256 curve with a SHA256 digest. Other hash functions
* can also be used: https://cloud.google.com/kms/docs/create-validate-
* signatures#ecdsa_support_for_other_hash_algorithms
*/
public const ALGORITHM_EC_SIGN_P256_SHA256 = 'EC_SIGN_P256_SHA256';
/**
* ECDSA on the NIST P-384 curve with a SHA384 digest. Other hash functions
* can also be used: https://cloud.google.com/kms/docs/create-validate-
* signatures#ecdsa_support_for_other_hash_algorithms
*/
public const ALGORITHM_EC_SIGN_P384_SHA384 = 'EC_SIGN_P384_SHA384';
/**
* ECDSA on the non-NIST secp256k1 curve. This curve is only supported for HSM
* protection level. Other hash functions can also be used:
* https://cloud.google.com/kms/docs/create-validate-
* signatures#ecdsa_support_for_other_hash_algorithms
*/
public const ALGORITHM_EC_SIGN_SECP256K1_SHA256 = 'EC_SIGN_SECP256K1_SHA256';
/**
* EdDSA on the Curve25519 in pure mode (taking data as input).
*/
public const ALGORITHM_EC_SIGN_ED25519 = 'EC_SIGN_ED25519';
/**
* HMAC-SHA256 signing with a 256 bit key.
*/
public const ALGORITHM_HMAC_SHA256 = 'HMAC_SHA256';
/**
* HMAC-SHA1 signing with a 160 bit key.
*/
public const ALGORITHM_HMAC_SHA1 = 'HMAC_SHA1';
/**
* HMAC-SHA384 signing with a 384 bit key.
*/
public const ALGORITHM_HMAC_SHA384 = 'HMAC_SHA384';
/**
* HMAC-SHA512 signing with a 512 bit key.
*/
public const ALGORITHM_HMAC_SHA512 = 'HMAC_SHA512';
/**
* HMAC-SHA224 signing with a 224 bit key.
*/
public const ALGORITHM_HMAC_SHA224 = 'HMAC_SHA224';
/**
* Algorithm representing symmetric encryption by an external key manager.
*/
public const ALGORITHM_EXTERNAL_SYMMETRIC_ENCRYPTION = 'EXTERNAL_SYMMETRIC_ENCRYPTION';
/**
* ML-KEM-768 (FIPS 203)
*/
public const ALGORITHM_ML_KEM_768 = 'ML_KEM_768';
/**
* ML-KEM-1024 (FIPS 203)
*/
public const ALGORITHM_ML_KEM_1024 = 'ML_KEM_1024';
/**
* X-Wing hybrid KEM combining ML-KEM-768 with X25519 following
* datatracker.ietf.org/doc/draft-connolly-cfrg-xwing-kem/.
*/
public const ALGORITHM_KEM_XWING = 'KEM_XWING';
/**
* The post-quantum Module-Lattice-Based Digital Signature Algorithm, at
* security level 1. Randomized version.
*/
public const ALGORITHM_PQ_SIGN_ML_DSA_44 = 'PQ_SIGN_ML_DSA_44';
/**
* The post-quantum Module-Lattice-Based Digital Signature Algorithm, at
* security level 3. Randomized version.
*/
public const ALGORITHM_PQ_SIGN_ML_DSA_65 = 'PQ_SIGN_ML_DSA_65';
/**
* The post-quantum Module-Lattice-Based Digital Signature Algorithm, at
* security level 5. Randomized version.
*/
public const ALGORITHM_PQ_SIGN_ML_DSA_87 = 'PQ_SIGN_ML_DSA_87';
/**
* The post-quantum stateless hash-based digital signature algorithm, at
* security level 1. Randomized version.
*/
public const ALGORITHM_PQ_SIGN_SLH_DSA_SHA2_128S = 'PQ_SIGN_SLH_DSA_SHA2_128S';
/**
* The post-quantum stateless hash-based digital signature algorithm, at
* security level 1. Randomized pre-hash version supporting SHA256 digests.
*/
public const ALGORITHM_PQ_SIGN_HASH_SLH_DSA_SHA2_128S_SHA256 = 'PQ_SIGN_HASH_SLH_DSA_SHA2_128S_SHA256';
/**
* The post-quantum Module-Lattice-Based Digital Signature Algorithm, at
* security level 1. Randomized version supporting externally-computed message
* representatives.
*/
public const ALGORITHM_PQ_SIGN_ML_DSA_44_EXTERNAL_MU = 'PQ_SIGN_ML_DSA_44_EXTERNAL_MU';
/**
* The post-quantum Module-Lattice-Based Digital Signature Algorithm, at
* security level 3. Randomized version supporting externally-computed message
* representatives.
*/
public const ALGORITHM_PQ_SIGN_ML_DSA_65_EXTERNAL_MU = 'PQ_SIGN_ML_DSA_65_EXTERNAL_MU';
/**
* The post-quantum Module-Lattice-Based Digital Signature Algorithm, at
* security level 5. Randomized version supporting externally-computed message
* representatives.
*/
public const ALGORITHM_PQ_SIGN_ML_DSA_87_EXTERNAL_MU = 'PQ_SIGN_ML_DSA_87_EXTERNAL_MU';
/**
* Not specified.
*/
public const PROTECTION_LEVEL_PROTECTION_LEVEL_UNSPECIFIED = 'PROTECTION_LEVEL_UNSPECIFIED';
/**
* Crypto operations are performed in software.
*/
public const PROTECTION_LEVEL_SOFTWARE = 'SOFTWARE';
/**
* Crypto operations are performed in a Hardware Security Module.
*/
public const PROTECTION_LEVEL_HSM = 'HSM';
/**
* Crypto operations are performed by an external key manager.
*/
public const PROTECTION_LEVEL_EXTERNAL = 'EXTERNAL';
/**
* Crypto operations are performed in an EKM-over-VPC backend.
*/
public const PROTECTION_LEVEL_EXTERNAL_VPC = 'EXTERNAL_VPC';
/**
* Crypto operations are performed in a single-tenant HSM.
*/
public const PROTECTION_LEVEL_HSM_SINGLE_TENANT = 'HSM_SINGLE_TENANT';
/**
* Not specified.
*/
public const STATE_CRYPTO_KEY_VERSION_STATE_UNSPECIFIED = 'CRYPTO_KEY_VERSION_STATE_UNSPECIFIED';
/**
* This version is still being generated. It may not be used, enabled,
* disabled, or destroyed yet. Cloud KMS will automatically mark this version
* ENABLED as soon as the version is ready.
*/
public const STATE_PENDING_GENERATION = 'PENDING_GENERATION';
/**
* This version may be used for cryptographic operations.
*/
public const STATE_ENABLED = 'ENABLED';
/**
* This version may not be used, but the key material is still available, and
* the version can be placed back into the ENABLED state.
*/
public const STATE_DISABLED = 'DISABLED';
/**
* The key material of this version is destroyed and no longer stored. This
* version may only become ENABLED again if this version is reimport_eligible
* and the original key material is reimported with a call to
* KeyManagementService.ImportCryptoKeyVersion.
*/
public const STATE_DESTROYED = 'DESTROYED';
/**
* This version is scheduled for destruction, and will be destroyed soon. Call
* RestoreCryptoKeyVersion to put it back into the DISABLED state.
*/
public const STATE_DESTROY_SCHEDULED = 'DESTROY_SCHEDULED';
/**
* This version is still being imported. It may not be used, enabled,
* disabled, or destroyed yet. Cloud KMS will automatically mark this version
* ENABLED as soon as the version is ready.
*/
public const STATE_PENDING_IMPORT = 'PENDING_IMPORT';
/**
* This version was not imported successfully. It may not be used, enabled,
* disabled, or destroyed. The submitted key material has been discarded.
* Additional details can be found in CryptoKeyVersion.import_failure_reason.
*/
public const STATE_IMPORT_FAILED = 'IMPORT_FAILED';
/**
* This version was not generated successfully. It may not be used, enabled,
* disabled, or destroyed. Additional details can be found in
* CryptoKeyVersion.generation_failure_reason.
*/
public const STATE_GENERATION_FAILED = 'GENERATION_FAILED';
/**
* This version was destroyed, and it may not be used or enabled again. Cloud
* KMS is waiting for the corresponding key material residing in an external
* key manager to be destroyed.
*/
public const STATE_PENDING_EXTERNAL_DESTRUCTION = 'PENDING_EXTERNAL_DESTRUCTION';
/**
* This version was destroyed, and it may not be used or enabled again.
* However, Cloud KMS could not confirm that the corresponding key material
* residing in an external key manager was destroyed. Additional details can
* be found in CryptoKeyVersion.external_destruction_failure_reason.
*/
public const STATE_EXTERNAL_DESTRUCTION_FAILED = 'EXTERNAL_DESTRUCTION_FAILED';
/**
* Output only. The CryptoKeyVersionAlgorithm that this CryptoKeyVersion
* supports.
*
* @var string
*/
public $algorithm;
protected $attestationType = KeyOperationAttestation::class;
protected $attestationDataType = '';
/**
* Output only. The time at which this CryptoKeyVersion was created.
*
* @var string
*/
public $createTime;
/**
* Output only. The time this CryptoKeyVersion's key material was destroyed.
* Only present if state is DESTROYED.
*
* @var string
*/
public $destroyEventTime;
/**
* Output only. The time this CryptoKeyVersion's key material is scheduled for
* destruction. Only present if state is DESTROY_SCHEDULED.
*
* @var string
*/
public $destroyTime;
/**
* Output only. The root cause of the most recent external destruction
* failure. Only present if state is EXTERNAL_DESTRUCTION_FAILED.
*
* @var string
*/
public $externalDestructionFailureReason;
protected $externalProtectionLevelOptionsType = ExternalProtectionLevelOptions::class;
protected $externalProtectionLevelOptionsDataType = '';
/**
* Output only. The time this CryptoKeyVersion's key material was generated.
*
* @var string
*/
public $generateTime;
/**
* Output only. The root cause of the most recent generation failure. Only
* present if state is GENERATION_FAILED.
*
* @var string
*/
public $generationFailureReason;
/**
* Output only. The root cause of the most recent import failure. Only present
* if state is IMPORT_FAILED.
*
* @var string
*/
public $importFailureReason;
/**
* Output only. The name of the ImportJob used in the most recent import of
* this CryptoKeyVersion. Only present if the underlying key material was
* imported.
*
* @var string
*/
public $importJob;
/**
* Output only. The time at which this CryptoKeyVersion's key material was
* most recently imported.
*
* @var string
*/
public $importTime;
/**
* Output only. The resource name for this CryptoKeyVersion in the format
* `projects/locations/keyRings/cryptoKeys/cryptoKeyVersions`.
*
* @var string
*/
public $name;
/**
* Output only. The ProtectionLevel describing how crypto operations are
* performed with this CryptoKeyVersion.
*
* @var string
*/
public $protectionLevel;
/**
* Output only. Whether or not this key version is eligible for reimport, by
* being specified as a target in
* ImportCryptoKeyVersionRequest.crypto_key_version.
*
* @var bool
*/
public $reimportEligible;
/**
* The current state of the CryptoKeyVersion.
*
* @var string
*/
public $state;
/**
* Output only. The CryptoKeyVersionAlgorithm that this CryptoKeyVersion
* supports.
*
* Accepted values: CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED,
* GOOGLE_SYMMETRIC_ENCRYPTION, AES_128_GCM, AES_256_GCM, AES_128_CBC,
* AES_256_CBC, AES_128_CTR, AES_256_CTR, RSA_SIGN_PSS_2048_SHA256,
* RSA_SIGN_PSS_3072_SHA256, RSA_SIGN_PSS_4096_SHA256,
* RSA_SIGN_PSS_4096_SHA512, RSA_SIGN_PKCS1_2048_SHA256,
* RSA_SIGN_PKCS1_3072_SHA256, RSA_SIGN_PKCS1_4096_SHA256,
* RSA_SIGN_PKCS1_4096_SHA512, RSA_SIGN_RAW_PKCS1_2048,
* RSA_SIGN_RAW_PKCS1_3072, RSA_SIGN_RAW_PKCS1_4096,
* RSA_DECRYPT_OAEP_2048_SHA256, RSA_DECRYPT_OAEP_3072_SHA256,
* RSA_DECRYPT_OAEP_4096_SHA256, RSA_DECRYPT_OAEP_4096_SHA512,
* RSA_DECRYPT_OAEP_2048_SHA1, RSA_DECRYPT_OAEP_3072_SHA1,
* RSA_DECRYPT_OAEP_4096_SHA1, EC_SIGN_P256_SHA256, EC_SIGN_P384_SHA384,
* EC_SIGN_SECP256K1_SHA256, EC_SIGN_ED25519, HMAC_SHA256, HMAC_SHA1,
* HMAC_SHA384, HMAC_SHA512, HMAC_SHA224, EXTERNAL_SYMMETRIC_ENCRYPTION,
* ML_KEM_768, ML_KEM_1024, KEM_XWING, PQ_SIGN_ML_DSA_44, PQ_SIGN_ML_DSA_65,
* PQ_SIGN_ML_DSA_87, PQ_SIGN_SLH_DSA_SHA2_128S,
* PQ_SIGN_HASH_SLH_DSA_SHA2_128S_SHA256, PQ_SIGN_ML_DSA_44_EXTERNAL_MU,
* PQ_SIGN_ML_DSA_65_EXTERNAL_MU, PQ_SIGN_ML_DSA_87_EXTERNAL_MU
*
* @param self::ALGORITHM_* $algorithm
*/
public function setAlgorithm($algorithm)
{
$this->algorithm = $algorithm;
}
/**
* @return self::ALGORITHM_*
*/
public function getAlgorithm()
{
return $this->algorithm;
}
/**
* Output only. Statement that was generated and signed by the HSM at key
* creation time. Use this statement to verify attributes of the key as stored
* on the HSM, independently of Google. Only provided for key versions with
* protection_level HSM.
*
* @param KeyOperationAttestation $attestation
*/
public function setAttestation(KeyOperationAttestation $attestation)
{
$this->attestation = $attestation;
}
/**
* @return KeyOperationAttestation
*/
public function getAttestation()
{
return $this->attestation;
}
/**
* Output only. The time at which this CryptoKeyVersion was created.
*
* @param string $createTime
*/
public function setCreateTime($createTime)
{
$this->createTime = $createTime;
}
/**
* @return string
*/
public function getCreateTime()
{
return $this->createTime;
}
/**
* Output only. The time this CryptoKeyVersion's key material was destroyed.
* Only present if state is DESTROYED.
*
* @param string $destroyEventTime
*/
public function setDestroyEventTime($destroyEventTime)
{
$this->destroyEventTime = $destroyEventTime;
}
/**
* @return string
*/
public function getDestroyEventTime()
{
return $this->destroyEventTime;
}
/**
* Output only. The time this CryptoKeyVersion's key material is scheduled for
* destruction. Only present if state is DESTROY_SCHEDULED.
*
* @param string $destroyTime
*/
public function setDestroyTime($destroyTime)
{
$this->destroyTime = $destroyTime;
}
/**
* @return string
*/
public function getDestroyTime()
{
return $this->destroyTime;
}
/**
* Output only. The root cause of the most recent external destruction
* failure. Only present if state is EXTERNAL_DESTRUCTION_FAILED.
*
* @param string $externalDestructionFailureReason
*/
public function setExternalDestructionFailureReason($externalDestructionFailureReason)
{
$this->externalDestructionFailureReason = $externalDestructionFailureReason;
}
/**
* @return string
*/
public function getExternalDestructionFailureReason()
{
return $this->externalDestructionFailureReason;
}
/**
* ExternalProtectionLevelOptions stores a group of additional fields for
* configuring a CryptoKeyVersion that are specific to the EXTERNAL protection
* level and EXTERNAL_VPC protection levels.
*
* @param ExternalProtectionLevelOptions $externalProtectionLevelOptions
*/
public function setExternalProtectionLevelOptions(ExternalProtectionLevelOptions $externalProtectionLevelOptions)
{
$this->externalProtectionLevelOptions = $externalProtectionLevelOptions;
}
/**
* @return ExternalProtectionLevelOptions
*/
public function getExternalProtectionLevelOptions()
{
return $this->externalProtectionLevelOptions;
}
/**
* Output only. The time this CryptoKeyVersion's key material was generated.
*
* @param string $generateTime
*/
public function setGenerateTime($generateTime)
{
$this->generateTime = $generateTime;
}
/**
* @return string
*/
public function getGenerateTime()
{
return $this->generateTime;
}
/**
* Output only. The root cause of the most recent generation failure. Only
* present if state is GENERATION_FAILED.
*
* @param string $generationFailureReason
*/
public function setGenerationFailureReason($generationFailureReason)
{
$this->generationFailureReason = $generationFailureReason;
}
/**
* @return string
*/
public function getGenerationFailureReason()
{
return $this->generationFailureReason;
}
/**
* Output only. The root cause of the most recent import failure. Only present
* if state is IMPORT_FAILED.
*
* @param string $importFailureReason
*/
public function setImportFailureReason($importFailureReason)
{
$this->importFailureReason = $importFailureReason;
}
/**
* @return string
*/
public function getImportFailureReason()
{
return $this->importFailureReason;
}
/**
* Output only. The name of the ImportJob used in the most recent import of
* this CryptoKeyVersion. Only present if the underlying key material was
* imported.
*
* @param string $importJob
*/
public function setImportJob($importJob)
{
$this->importJob = $importJob;
}
/**
* @return string
*/
public function getImportJob()
{
return $this->importJob;
}
/**
* Output only. The time at which this CryptoKeyVersion's key material was
* most recently imported.
*
* @param string $importTime
*/
public function setImportTime($importTime)
{
$this->importTime = $importTime;
}
/**
* @return string
*/
public function getImportTime()
{
return $this->importTime;
}
/**
* Output only. The resource name for this CryptoKeyVersion in the format
* `projects/locations/keyRings/cryptoKeys/cryptoKeyVersions`.
*
* @param string $name
*/
public function setName($name)
{
$this->name = $name;
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* Output only. The ProtectionLevel describing how crypto operations are
* performed with this CryptoKeyVersion.
*
* Accepted values: PROTECTION_LEVEL_UNSPECIFIED, SOFTWARE, HSM, EXTERNAL,
* EXTERNAL_VPC, HSM_SINGLE_TENANT
*
* @param self::PROTECTION_LEVEL_* $protectionLevel
*/
public function setProtectionLevel($protectionLevel)
{
$this->protectionLevel = $protectionLevel;
}
/**
* @return self::PROTECTION_LEVEL_*
*/
public function getProtectionLevel()
{
return $this->protectionLevel;
}
/**
* Output only. Whether or not this key version is eligible for reimport, by
* being specified as a target in
* ImportCryptoKeyVersionRequest.crypto_key_version.
*
* @param bool $reimportEligible
*/
public function setReimportEligible($reimportEligible)
{
$this->reimportEligible = $reimportEligible;
}
/**
* @return bool
*/
public function getReimportEligible()
{
return $this->reimportEligible;
}
/**
* The current state of the CryptoKeyVersion.
*
* Accepted values: CRYPTO_KEY_VERSION_STATE_UNSPECIFIED, PENDING_GENERATION,
* ENABLED, DISABLED, DESTROYED, DESTROY_SCHEDULED, PENDING_IMPORT,
* IMPORT_FAILED, GENERATION_FAILED, PENDING_EXTERNAL_DESTRUCTION,
* EXTERNAL_DESTRUCTION_FAILED
*
* @param self::STATE_* $state
*/
public function setState($state)
{
$this->state = $state;
}
/**
* @return self::STATE_*
*/
public function getState()
{
return $this->state;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(CryptoKeyVersion::class, 'Google_Service_CloudKMS_CryptoKeyVersion');
@@ -0,0 +1,331 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class CryptoKeyVersionTemplate extends \Google\Model
{
/**
* Not specified.
*/
public const ALGORITHM_CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED = 'CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED';
/**
* Creates symmetric encryption keys.
*/
public const ALGORITHM_GOOGLE_SYMMETRIC_ENCRYPTION = 'GOOGLE_SYMMETRIC_ENCRYPTION';
/**
* AES-GCM (Galois Counter Mode) using 128-bit keys.
*/
public const ALGORITHM_AES_128_GCM = 'AES_128_GCM';
/**
* AES-GCM (Galois Counter Mode) using 256-bit keys.
*/
public const ALGORITHM_AES_256_GCM = 'AES_256_GCM';
/**
* AES-CBC (Cipher Block Chaining Mode) using 128-bit keys.
*/
public const ALGORITHM_AES_128_CBC = 'AES_128_CBC';
/**
* AES-CBC (Cipher Block Chaining Mode) using 256-bit keys.
*/
public const ALGORITHM_AES_256_CBC = 'AES_256_CBC';
/**
* AES-CTR (Counter Mode) using 128-bit keys.
*/
public const ALGORITHM_AES_128_CTR = 'AES_128_CTR';
/**
* AES-CTR (Counter Mode) using 256-bit keys.
*/
public const ALGORITHM_AES_256_CTR = 'AES_256_CTR';
/**
* RSASSA-PSS 2048 bit key with a SHA256 digest.
*/
public const ALGORITHM_RSA_SIGN_PSS_2048_SHA256 = 'RSA_SIGN_PSS_2048_SHA256';
/**
* RSASSA-PSS 3072 bit key with a SHA256 digest.
*/
public const ALGORITHM_RSA_SIGN_PSS_3072_SHA256 = 'RSA_SIGN_PSS_3072_SHA256';
/**
* RSASSA-PSS 4096 bit key with a SHA256 digest.
*/
public const ALGORITHM_RSA_SIGN_PSS_4096_SHA256 = 'RSA_SIGN_PSS_4096_SHA256';
/**
* RSASSA-PSS 4096 bit key with a SHA512 digest.
*/
public const ALGORITHM_RSA_SIGN_PSS_4096_SHA512 = 'RSA_SIGN_PSS_4096_SHA512';
/**
* RSASSA-PKCS1-v1_5 with a 2048 bit key and a SHA256 digest.
*/
public const ALGORITHM_RSA_SIGN_PKCS1_2048_SHA256 = 'RSA_SIGN_PKCS1_2048_SHA256';
/**
* RSASSA-PKCS1-v1_5 with a 3072 bit key and a SHA256 digest.
*/
public const ALGORITHM_RSA_SIGN_PKCS1_3072_SHA256 = 'RSA_SIGN_PKCS1_3072_SHA256';
/**
* RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA256 digest.
*/
public const ALGORITHM_RSA_SIGN_PKCS1_4096_SHA256 = 'RSA_SIGN_PKCS1_4096_SHA256';
/**
* RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA512 digest.
*/
public const ALGORITHM_RSA_SIGN_PKCS1_4096_SHA512 = 'RSA_SIGN_PKCS1_4096_SHA512';
/**
* RSASSA-PKCS1-v1_5 signing without encoding, with a 2048 bit key.
*/
public const ALGORITHM_RSA_SIGN_RAW_PKCS1_2048 = 'RSA_SIGN_RAW_PKCS1_2048';
/**
* RSASSA-PKCS1-v1_5 signing without encoding, with a 3072 bit key.
*/
public const ALGORITHM_RSA_SIGN_RAW_PKCS1_3072 = 'RSA_SIGN_RAW_PKCS1_3072';
/**
* RSASSA-PKCS1-v1_5 signing without encoding, with a 4096 bit key.
*/
public const ALGORITHM_RSA_SIGN_RAW_PKCS1_4096 = 'RSA_SIGN_RAW_PKCS1_4096';
/**
* RSAES-OAEP 2048 bit key with a SHA256 digest.
*/
public const ALGORITHM_RSA_DECRYPT_OAEP_2048_SHA256 = 'RSA_DECRYPT_OAEP_2048_SHA256';
/**
* RSAES-OAEP 3072 bit key with a SHA256 digest.
*/
public const ALGORITHM_RSA_DECRYPT_OAEP_3072_SHA256 = 'RSA_DECRYPT_OAEP_3072_SHA256';
/**
* RSAES-OAEP 4096 bit key with a SHA256 digest.
*/
public const ALGORITHM_RSA_DECRYPT_OAEP_4096_SHA256 = 'RSA_DECRYPT_OAEP_4096_SHA256';
/**
* RSAES-OAEP 4096 bit key with a SHA512 digest.
*/
public const ALGORITHM_RSA_DECRYPT_OAEP_4096_SHA512 = 'RSA_DECRYPT_OAEP_4096_SHA512';
/**
* RSAES-OAEP 2048 bit key with a SHA1 digest.
*/
public const ALGORITHM_RSA_DECRYPT_OAEP_2048_SHA1 = 'RSA_DECRYPT_OAEP_2048_SHA1';
/**
* RSAES-OAEP 3072 bit key with a SHA1 digest.
*/
public const ALGORITHM_RSA_DECRYPT_OAEP_3072_SHA1 = 'RSA_DECRYPT_OAEP_3072_SHA1';
/**
* RSAES-OAEP 4096 bit key with a SHA1 digest.
*/
public const ALGORITHM_RSA_DECRYPT_OAEP_4096_SHA1 = 'RSA_DECRYPT_OAEP_4096_SHA1';
/**
* ECDSA on the NIST P-256 curve with a SHA256 digest. Other hash functions
* can also be used: https://cloud.google.com/kms/docs/create-validate-
* signatures#ecdsa_support_for_other_hash_algorithms
*/
public const ALGORITHM_EC_SIGN_P256_SHA256 = 'EC_SIGN_P256_SHA256';
/**
* ECDSA on the NIST P-384 curve with a SHA384 digest. Other hash functions
* can also be used: https://cloud.google.com/kms/docs/create-validate-
* signatures#ecdsa_support_for_other_hash_algorithms
*/
public const ALGORITHM_EC_SIGN_P384_SHA384 = 'EC_SIGN_P384_SHA384';
/**
* ECDSA on the non-NIST secp256k1 curve. This curve is only supported for HSM
* protection level. Other hash functions can also be used:
* https://cloud.google.com/kms/docs/create-validate-
* signatures#ecdsa_support_for_other_hash_algorithms
*/
public const ALGORITHM_EC_SIGN_SECP256K1_SHA256 = 'EC_SIGN_SECP256K1_SHA256';
/**
* EdDSA on the Curve25519 in pure mode (taking data as input).
*/
public const ALGORITHM_EC_SIGN_ED25519 = 'EC_SIGN_ED25519';
/**
* HMAC-SHA256 signing with a 256 bit key.
*/
public const ALGORITHM_HMAC_SHA256 = 'HMAC_SHA256';
/**
* HMAC-SHA1 signing with a 160 bit key.
*/
public const ALGORITHM_HMAC_SHA1 = 'HMAC_SHA1';
/**
* HMAC-SHA384 signing with a 384 bit key.
*/
public const ALGORITHM_HMAC_SHA384 = 'HMAC_SHA384';
/**
* HMAC-SHA512 signing with a 512 bit key.
*/
public const ALGORITHM_HMAC_SHA512 = 'HMAC_SHA512';
/**
* HMAC-SHA224 signing with a 224 bit key.
*/
public const ALGORITHM_HMAC_SHA224 = 'HMAC_SHA224';
/**
* Algorithm representing symmetric encryption by an external key manager.
*/
public const ALGORITHM_EXTERNAL_SYMMETRIC_ENCRYPTION = 'EXTERNAL_SYMMETRIC_ENCRYPTION';
/**
* ML-KEM-768 (FIPS 203)
*/
public const ALGORITHM_ML_KEM_768 = 'ML_KEM_768';
/**
* ML-KEM-1024 (FIPS 203)
*/
public const ALGORITHM_ML_KEM_1024 = 'ML_KEM_1024';
/**
* X-Wing hybrid KEM combining ML-KEM-768 with X25519 following
* datatracker.ietf.org/doc/draft-connolly-cfrg-xwing-kem/.
*/
public const ALGORITHM_KEM_XWING = 'KEM_XWING';
/**
* The post-quantum Module-Lattice-Based Digital Signature Algorithm, at
* security level 1. Randomized version.
*/
public const ALGORITHM_PQ_SIGN_ML_DSA_44 = 'PQ_SIGN_ML_DSA_44';
/**
* The post-quantum Module-Lattice-Based Digital Signature Algorithm, at
* security level 3. Randomized version.
*/
public const ALGORITHM_PQ_SIGN_ML_DSA_65 = 'PQ_SIGN_ML_DSA_65';
/**
* The post-quantum Module-Lattice-Based Digital Signature Algorithm, at
* security level 5. Randomized version.
*/
public const ALGORITHM_PQ_SIGN_ML_DSA_87 = 'PQ_SIGN_ML_DSA_87';
/**
* The post-quantum stateless hash-based digital signature algorithm, at
* security level 1. Randomized version.
*/
public const ALGORITHM_PQ_SIGN_SLH_DSA_SHA2_128S = 'PQ_SIGN_SLH_DSA_SHA2_128S';
/**
* The post-quantum stateless hash-based digital signature algorithm, at
* security level 1. Randomized pre-hash version supporting SHA256 digests.
*/
public const ALGORITHM_PQ_SIGN_HASH_SLH_DSA_SHA2_128S_SHA256 = 'PQ_SIGN_HASH_SLH_DSA_SHA2_128S_SHA256';
/**
* The post-quantum Module-Lattice-Based Digital Signature Algorithm, at
* security level 1. Randomized version supporting externally-computed message
* representatives.
*/
public const ALGORITHM_PQ_SIGN_ML_DSA_44_EXTERNAL_MU = 'PQ_SIGN_ML_DSA_44_EXTERNAL_MU';
/**
* The post-quantum Module-Lattice-Based Digital Signature Algorithm, at
* security level 3. Randomized version supporting externally-computed message
* representatives.
*/
public const ALGORITHM_PQ_SIGN_ML_DSA_65_EXTERNAL_MU = 'PQ_SIGN_ML_DSA_65_EXTERNAL_MU';
/**
* The post-quantum Module-Lattice-Based Digital Signature Algorithm, at
* security level 5. Randomized version supporting externally-computed message
* representatives.
*/
public const ALGORITHM_PQ_SIGN_ML_DSA_87_EXTERNAL_MU = 'PQ_SIGN_ML_DSA_87_EXTERNAL_MU';
/**
* Not specified.
*/
public const PROTECTION_LEVEL_PROTECTION_LEVEL_UNSPECIFIED = 'PROTECTION_LEVEL_UNSPECIFIED';
/**
* Crypto operations are performed in software.
*/
public const PROTECTION_LEVEL_SOFTWARE = 'SOFTWARE';
/**
* Crypto operations are performed in a Hardware Security Module.
*/
public const PROTECTION_LEVEL_HSM = 'HSM';
/**
* Crypto operations are performed by an external key manager.
*/
public const PROTECTION_LEVEL_EXTERNAL = 'EXTERNAL';
/**
* Crypto operations are performed in an EKM-over-VPC backend.
*/
public const PROTECTION_LEVEL_EXTERNAL_VPC = 'EXTERNAL_VPC';
/**
* Crypto operations are performed in a single-tenant HSM.
*/
public const PROTECTION_LEVEL_HSM_SINGLE_TENANT = 'HSM_SINGLE_TENANT';
/**
* Required. Algorithm to use when creating a CryptoKeyVersion based on this
* template. For backwards compatibility, GOOGLE_SYMMETRIC_ENCRYPTION is
* implied if both this field is omitted and CryptoKey.purpose is
* ENCRYPT_DECRYPT.
*
* @var string
*/
public $algorithm;
/**
* ProtectionLevel to use when creating a CryptoKeyVersion based on this
* template. Immutable. Defaults to SOFTWARE.
*
* @var string
*/
public $protectionLevel;
/**
* Required. Algorithm to use when creating a CryptoKeyVersion based on this
* template. For backwards compatibility, GOOGLE_SYMMETRIC_ENCRYPTION is
* implied if both this field is omitted and CryptoKey.purpose is
* ENCRYPT_DECRYPT.
*
* Accepted values: CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED,
* GOOGLE_SYMMETRIC_ENCRYPTION, AES_128_GCM, AES_256_GCM, AES_128_CBC,
* AES_256_CBC, AES_128_CTR, AES_256_CTR, RSA_SIGN_PSS_2048_SHA256,
* RSA_SIGN_PSS_3072_SHA256, RSA_SIGN_PSS_4096_SHA256,
* RSA_SIGN_PSS_4096_SHA512, RSA_SIGN_PKCS1_2048_SHA256,
* RSA_SIGN_PKCS1_3072_SHA256, RSA_SIGN_PKCS1_4096_SHA256,
* RSA_SIGN_PKCS1_4096_SHA512, RSA_SIGN_RAW_PKCS1_2048,
* RSA_SIGN_RAW_PKCS1_3072, RSA_SIGN_RAW_PKCS1_4096,
* RSA_DECRYPT_OAEP_2048_SHA256, RSA_DECRYPT_OAEP_3072_SHA256,
* RSA_DECRYPT_OAEP_4096_SHA256, RSA_DECRYPT_OAEP_4096_SHA512,
* RSA_DECRYPT_OAEP_2048_SHA1, RSA_DECRYPT_OAEP_3072_SHA1,
* RSA_DECRYPT_OAEP_4096_SHA1, EC_SIGN_P256_SHA256, EC_SIGN_P384_SHA384,
* EC_SIGN_SECP256K1_SHA256, EC_SIGN_ED25519, HMAC_SHA256, HMAC_SHA1,
* HMAC_SHA384, HMAC_SHA512, HMAC_SHA224, EXTERNAL_SYMMETRIC_ENCRYPTION,
* ML_KEM_768, ML_KEM_1024, KEM_XWING, PQ_SIGN_ML_DSA_44, PQ_SIGN_ML_DSA_65,
* PQ_SIGN_ML_DSA_87, PQ_SIGN_SLH_DSA_SHA2_128S,
* PQ_SIGN_HASH_SLH_DSA_SHA2_128S_SHA256, PQ_SIGN_ML_DSA_44_EXTERNAL_MU,
* PQ_SIGN_ML_DSA_65_EXTERNAL_MU, PQ_SIGN_ML_DSA_87_EXTERNAL_MU
*
* @param self::ALGORITHM_* $algorithm
*/
public function setAlgorithm($algorithm)
{
$this->algorithm = $algorithm;
}
/**
* @return self::ALGORITHM_*
*/
public function getAlgorithm()
{
return $this->algorithm;
}
/**
* ProtectionLevel to use when creating a CryptoKeyVersion based on this
* template. Immutable. Defaults to SOFTWARE.
*
* Accepted values: PROTECTION_LEVEL_UNSPECIFIED, SOFTWARE, HSM, EXTERNAL,
* EXTERNAL_VPC, HSM_SINGLE_TENANT
*
* @param self::PROTECTION_LEVEL_* $protectionLevel
*/
public function setProtectionLevel($protectionLevel)
{
$this->protectionLevel = $protectionLevel;
}
/**
* @return self::PROTECTION_LEVEL_*
*/
public function getProtectionLevel()
{
return $this->protectionLevel;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(CryptoKeyVersionTemplate::class, 'Google_Service_CloudKMS_CryptoKeyVersionTemplate');
@@ -0,0 +1,94 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class DecapsulateRequest extends \Google\Model
{
/**
* Required. The ciphertext produced from encapsulation with the named
* CryptoKeyVersion public key(s).
*
* @var string
*/
public $ciphertext;
/**
* Optional. A CRC32C checksum of the DecapsulateRequest.ciphertext. If
* specified, KeyManagementService will verify the integrity of the received
* DecapsulateRequest.ciphertext using this checksum. KeyManagementService
* will report an error if the checksum verification fails. If you receive a
* checksum error, your client should verify that
* CRC32C(DecapsulateRequest.ciphertext) is equal to
* DecapsulateRequest.ciphertext_crc32c, and if so, perform a limited number
* of retries. A persistent mismatch may indicate an issue in your computation
* of the CRC32C checksum. Note: This field is defined as int64 for reasons of
* compatibility across different languages. However, it is a non-negative
* integer, which will never exceed 2^32-1, and can be safely downconverted to
* uint32 in languages that support this type.
*
* @var string
*/
public $ciphertextCrc32c;
/**
* Required. The ciphertext produced from encapsulation with the named
* CryptoKeyVersion public key(s).
*
* @param string $ciphertext
*/
public function setCiphertext($ciphertext)
{
$this->ciphertext = $ciphertext;
}
/**
* @return string
*/
public function getCiphertext()
{
return $this->ciphertext;
}
/**
* Optional. A CRC32C checksum of the DecapsulateRequest.ciphertext. If
* specified, KeyManagementService will verify the integrity of the received
* DecapsulateRequest.ciphertext using this checksum. KeyManagementService
* will report an error if the checksum verification fails. If you receive a
* checksum error, your client should verify that
* CRC32C(DecapsulateRequest.ciphertext) is equal to
* DecapsulateRequest.ciphertext_crc32c, and if so, perform a limited number
* of retries. A persistent mismatch may indicate an issue in your computation
* of the CRC32C checksum. Note: This field is defined as int64 for reasons of
* compatibility across different languages. However, it is a non-negative
* integer, which will never exceed 2^32-1, and can be safely downconverted to
* uint32 in languages that support this type.
*
* @param string $ciphertextCrc32c
*/
public function setCiphertextCrc32c($ciphertextCrc32c)
{
$this->ciphertextCrc32c = $ciphertextCrc32c;
}
/**
* @return string
*/
public function getCiphertextCrc32c()
{
return $this->ciphertextCrc32c;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(DecapsulateRequest::class, 'Google_Service_CloudKMS_DecapsulateRequest');
@@ -0,0 +1,201 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class DecapsulateResponse extends \Google\Model
{
/**
* Not specified.
*/
public const PROTECTION_LEVEL_PROTECTION_LEVEL_UNSPECIFIED = 'PROTECTION_LEVEL_UNSPECIFIED';
/**
* Crypto operations are performed in software.
*/
public const PROTECTION_LEVEL_SOFTWARE = 'SOFTWARE';
/**
* Crypto operations are performed in a Hardware Security Module.
*/
public const PROTECTION_LEVEL_HSM = 'HSM';
/**
* Crypto operations are performed by an external key manager.
*/
public const PROTECTION_LEVEL_EXTERNAL = 'EXTERNAL';
/**
* Crypto operations are performed in an EKM-over-VPC backend.
*/
public const PROTECTION_LEVEL_EXTERNAL_VPC = 'EXTERNAL_VPC';
/**
* Crypto operations are performed in a single-tenant HSM.
*/
public const PROTECTION_LEVEL_HSM_SINGLE_TENANT = 'HSM_SINGLE_TENANT';
/**
* The resource name of the CryptoKeyVersion used for decapsulation. Check
* this field to verify that the intended resource was used for decapsulation.
*
* @var string
*/
public $name;
/**
* The ProtectionLevel of the CryptoKeyVersion used in decapsulation.
*
* @var string
*/
public $protectionLevel;
/**
* The decapsulated shared_secret originally encapsulated with the matching
* public key.
*
* @var string
*/
public $sharedSecret;
/**
* Integrity verification field. A CRC32C checksum of the returned
* DecapsulateResponse.shared_secret. An integrity check of
* DecapsulateResponse.shared_secret can be performed by computing the CRC32C
* checksum of DecapsulateResponse.shared_secret and comparing your results to
* this field. Discard the response in case of non-matching checksum values,
* and perform a limited number of retries. A persistent mismatch may indicate
* an issue in your computation of the CRC32C checksum. Note: receiving this
* response message indicates that KeyManagementService is able to
* successfully decrypt the ciphertext. Note: This field is defined as int64
* for reasons of compatibility across different languages. However, it is a
* non-negative integer, which will never exceed 2^32-1, and can be safely
* downconverted to uint32 in languages that support this type.
*
* @var string
*/
public $sharedSecretCrc32c;
/**
* Integrity verification field. A flag indicating whether
* DecapsulateRequest.ciphertext_crc32c was received by KeyManagementService
* and used for the integrity verification of the ciphertext. A false value of
* this field indicates either that DecapsulateRequest.ciphertext_crc32c was
* left unset or that it was not delivered to KeyManagementService. If you've
* set DecapsulateRequest.ciphertext_crc32c but this field is still false,
* discard the response and perform a limited number of retries.
*
* @var bool
*/
public $verifiedCiphertextCrc32c;
/**
* The resource name of the CryptoKeyVersion used for decapsulation. Check
* this field to verify that the intended resource was used for decapsulation.
*
* @param string $name
*/
public function setName($name)
{
$this->name = $name;
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* The ProtectionLevel of the CryptoKeyVersion used in decapsulation.
*
* Accepted values: PROTECTION_LEVEL_UNSPECIFIED, SOFTWARE, HSM, EXTERNAL,
* EXTERNAL_VPC, HSM_SINGLE_TENANT
*
* @param self::PROTECTION_LEVEL_* $protectionLevel
*/
public function setProtectionLevel($protectionLevel)
{
$this->protectionLevel = $protectionLevel;
}
/**
* @return self::PROTECTION_LEVEL_*
*/
public function getProtectionLevel()
{
return $this->protectionLevel;
}
/**
* The decapsulated shared_secret originally encapsulated with the matching
* public key.
*
* @param string $sharedSecret
*/
public function setSharedSecret($sharedSecret)
{
$this->sharedSecret = $sharedSecret;
}
/**
* @return string
*/
public function getSharedSecret()
{
return $this->sharedSecret;
}
/**
* Integrity verification field. A CRC32C checksum of the returned
* DecapsulateResponse.shared_secret. An integrity check of
* DecapsulateResponse.shared_secret can be performed by computing the CRC32C
* checksum of DecapsulateResponse.shared_secret and comparing your results to
* this field. Discard the response in case of non-matching checksum values,
* and perform a limited number of retries. A persistent mismatch may indicate
* an issue in your computation of the CRC32C checksum. Note: receiving this
* response message indicates that KeyManagementService is able to
* successfully decrypt the ciphertext. Note: This field is defined as int64
* for reasons of compatibility across different languages. However, it is a
* non-negative integer, which will never exceed 2^32-1, and can be safely
* downconverted to uint32 in languages that support this type.
*
* @param string $sharedSecretCrc32c
*/
public function setSharedSecretCrc32c($sharedSecretCrc32c)
{
$this->sharedSecretCrc32c = $sharedSecretCrc32c;
}
/**
* @return string
*/
public function getSharedSecretCrc32c()
{
return $this->sharedSecretCrc32c;
}
/**
* Integrity verification field. A flag indicating whether
* DecapsulateRequest.ciphertext_crc32c was received by KeyManagementService
* and used for the integrity verification of the ciphertext. A false value of
* this field indicates either that DecapsulateRequest.ciphertext_crc32c was
* left unset or that it was not delivered to KeyManagementService. If you've
* set DecapsulateRequest.ciphertext_crc32c but this field is still false,
* discard the response and perform a limited number of retries.
*
* @param bool $verifiedCiphertextCrc32c
*/
public function setVerifiedCiphertextCrc32c($verifiedCiphertextCrc32c)
{
$this->verifiedCiphertextCrc32c = $verifiedCiphertextCrc32c;
}
/**
* @return bool
*/
public function getVerifiedCiphertextCrc32c()
{
return $this->verifiedCiphertextCrc32c;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(DecapsulateResponse::class, 'Google_Service_CloudKMS_DecapsulateResponse');
@@ -0,0 +1,164 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class DecryptRequest extends \Google\Model
{
/**
* Optional. Optional data that must match the data originally supplied in
* EncryptRequest.additional_authenticated_data.
*
* @var string
*/
public $additionalAuthenticatedData;
/**
* Optional. An optional CRC32C checksum of the
* DecryptRequest.additional_authenticated_data. If specified,
* KeyManagementService will verify the integrity of the received
* DecryptRequest.additional_authenticated_data using this checksum.
* KeyManagementService will report an error if the checksum verification
* fails. If you receive a checksum error, your client should verify that
* CRC32C(DecryptRequest.additional_authenticated_data) is equal to
* DecryptRequest.additional_authenticated_data_crc32c, and if so, perform a
* limited number of retries. A persistent mismatch may indicate an issue in
* your computation of the CRC32C checksum. Note: This field is defined as
* int64 for reasons of compatibility across different languages. However, it
* is a non-negative integer, which will never exceed 2^32-1, and can be
* safely downconverted to uint32 in languages that support this type.
*
* @var string
*/
public $additionalAuthenticatedDataCrc32c;
/**
* Required. The encrypted data originally returned in
* EncryptResponse.ciphertext.
*
* @var string
*/
public $ciphertext;
/**
* Optional. An optional CRC32C checksum of the DecryptRequest.ciphertext. If
* specified, KeyManagementService will verify the integrity of the received
* DecryptRequest.ciphertext using this checksum. KeyManagementService will
* report an error if the checksum verification fails. If you receive a
* checksum error, your client should verify that
* CRC32C(DecryptRequest.ciphertext) is equal to
* DecryptRequest.ciphertext_crc32c, and if so, perform a limited number of
* retries. A persistent mismatch may indicate an issue in your computation of
* the CRC32C checksum. Note: This field is defined as int64 for reasons of
* compatibility across different languages. However, it is a non-negative
* integer, which will never exceed 2^32-1, and can be safely downconverted to
* uint32 in languages that support this type.
*
* @var string
*/
public $ciphertextCrc32c;
/**
* Optional. Optional data that must match the data originally supplied in
* EncryptRequest.additional_authenticated_data.
*
* @param string $additionalAuthenticatedData
*/
public function setAdditionalAuthenticatedData($additionalAuthenticatedData)
{
$this->additionalAuthenticatedData = $additionalAuthenticatedData;
}
/**
* @return string
*/
public function getAdditionalAuthenticatedData()
{
return $this->additionalAuthenticatedData;
}
/**
* Optional. An optional CRC32C checksum of the
* DecryptRequest.additional_authenticated_data. If specified,
* KeyManagementService will verify the integrity of the received
* DecryptRequest.additional_authenticated_data using this checksum.
* KeyManagementService will report an error if the checksum verification
* fails. If you receive a checksum error, your client should verify that
* CRC32C(DecryptRequest.additional_authenticated_data) is equal to
* DecryptRequest.additional_authenticated_data_crc32c, and if so, perform a
* limited number of retries. A persistent mismatch may indicate an issue in
* your computation of the CRC32C checksum. Note: This field is defined as
* int64 for reasons of compatibility across different languages. However, it
* is a non-negative integer, which will never exceed 2^32-1, and can be
* safely downconverted to uint32 in languages that support this type.
*
* @param string $additionalAuthenticatedDataCrc32c
*/
public function setAdditionalAuthenticatedDataCrc32c($additionalAuthenticatedDataCrc32c)
{
$this->additionalAuthenticatedDataCrc32c = $additionalAuthenticatedDataCrc32c;
}
/**
* @return string
*/
public function getAdditionalAuthenticatedDataCrc32c()
{
return $this->additionalAuthenticatedDataCrc32c;
}
/**
* Required. The encrypted data originally returned in
* EncryptResponse.ciphertext.
*
* @param string $ciphertext
*/
public function setCiphertext($ciphertext)
{
$this->ciphertext = $ciphertext;
}
/**
* @return string
*/
public function getCiphertext()
{
return $this->ciphertext;
}
/**
* Optional. An optional CRC32C checksum of the DecryptRequest.ciphertext. If
* specified, KeyManagementService will verify the integrity of the received
* DecryptRequest.ciphertext using this checksum. KeyManagementService will
* report an error if the checksum verification fails. If you receive a
* checksum error, your client should verify that
* CRC32C(DecryptRequest.ciphertext) is equal to
* DecryptRequest.ciphertext_crc32c, and if so, perform a limited number of
* retries. A persistent mismatch may indicate an issue in your computation of
* the CRC32C checksum. Note: This field is defined as int64 for reasons of
* compatibility across different languages. However, it is a non-negative
* integer, which will never exceed 2^32-1, and can be safely downconverted to
* uint32 in languages that support this type.
*
* @param string $ciphertextCrc32c
*/
public function setCiphertextCrc32c($ciphertextCrc32c)
{
$this->ciphertextCrc32c = $ciphertextCrc32c;
}
/**
* @return string
*/
public function getCiphertextCrc32c()
{
return $this->ciphertextCrc32c;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(DecryptRequest::class, 'Google_Service_CloudKMS_DecryptRequest');
@@ -0,0 +1,163 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class DecryptResponse extends \Google\Model
{
/**
* Not specified.
*/
public const PROTECTION_LEVEL_PROTECTION_LEVEL_UNSPECIFIED = 'PROTECTION_LEVEL_UNSPECIFIED';
/**
* Crypto operations are performed in software.
*/
public const PROTECTION_LEVEL_SOFTWARE = 'SOFTWARE';
/**
* Crypto operations are performed in a Hardware Security Module.
*/
public const PROTECTION_LEVEL_HSM = 'HSM';
/**
* Crypto operations are performed by an external key manager.
*/
public const PROTECTION_LEVEL_EXTERNAL = 'EXTERNAL';
/**
* Crypto operations are performed in an EKM-over-VPC backend.
*/
public const PROTECTION_LEVEL_EXTERNAL_VPC = 'EXTERNAL_VPC';
/**
* Crypto operations are performed in a single-tenant HSM.
*/
public const PROTECTION_LEVEL_HSM_SINGLE_TENANT = 'HSM_SINGLE_TENANT';
/**
* The decrypted data originally supplied in EncryptRequest.plaintext.
*
* @var string
*/
public $plaintext;
/**
* Integrity verification field. A CRC32C checksum of the returned
* DecryptResponse.plaintext. An integrity check of DecryptResponse.plaintext
* can be performed by computing the CRC32C checksum of
* DecryptResponse.plaintext and comparing your results to this field. Discard
* the response in case of non-matching checksum values, and perform a limited
* number of retries. A persistent mismatch may indicate an issue in your
* computation of the CRC32C checksum. Note: receiving this response message
* indicates that KeyManagementService is able to successfully decrypt the
* ciphertext. Note: This field is defined as int64 for reasons of
* compatibility across different languages. However, it is a non-negative
* integer, which will never exceed 2^32-1, and can be safely downconverted to
* uint32 in languages that support this type.
*
* @var string
*/
public $plaintextCrc32c;
/**
* The ProtectionLevel of the CryptoKeyVersion used in decryption.
*
* @var string
*/
public $protectionLevel;
/**
* Whether the Decryption was performed using the primary key version.
*
* @var bool
*/
public $usedPrimary;
/**
* The decrypted data originally supplied in EncryptRequest.plaintext.
*
* @param string $plaintext
*/
public function setPlaintext($plaintext)
{
$this->plaintext = $plaintext;
}
/**
* @return string
*/
public function getPlaintext()
{
return $this->plaintext;
}
/**
* Integrity verification field. A CRC32C checksum of the returned
* DecryptResponse.plaintext. An integrity check of DecryptResponse.plaintext
* can be performed by computing the CRC32C checksum of
* DecryptResponse.plaintext and comparing your results to this field. Discard
* the response in case of non-matching checksum values, and perform a limited
* number of retries. A persistent mismatch may indicate an issue in your
* computation of the CRC32C checksum. Note: receiving this response message
* indicates that KeyManagementService is able to successfully decrypt the
* ciphertext. Note: This field is defined as int64 for reasons of
* compatibility across different languages. However, it is a non-negative
* integer, which will never exceed 2^32-1, and can be safely downconverted to
* uint32 in languages that support this type.
*
* @param string $plaintextCrc32c
*/
public function setPlaintextCrc32c($plaintextCrc32c)
{
$this->plaintextCrc32c = $plaintextCrc32c;
}
/**
* @return string
*/
public function getPlaintextCrc32c()
{
return $this->plaintextCrc32c;
}
/**
* The ProtectionLevel of the CryptoKeyVersion used in decryption.
*
* Accepted values: PROTECTION_LEVEL_UNSPECIFIED, SOFTWARE, HSM, EXTERNAL,
* EXTERNAL_VPC, HSM_SINGLE_TENANT
*
* @param self::PROTECTION_LEVEL_* $protectionLevel
*/
public function setProtectionLevel($protectionLevel)
{
$this->protectionLevel = $protectionLevel;
}
/**
* @return self::PROTECTION_LEVEL_*
*/
public function getProtectionLevel()
{
return $this->protectionLevel;
}
/**
* Whether the Decryption was performed using the primary key version.
*
* @param bool $usedPrimary
*/
public function setUsedPrimary($usedPrimary)
{
$this->usedPrimary = $usedPrimary;
}
/**
* @return bool
*/
public function getUsedPrimary()
{
return $this->usedPrimary;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(DecryptResponse::class, 'Google_Service_CloudKMS_DecryptResponse');
@@ -0,0 +1,25 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class DeleteSingleTenantHsmInstance extends \Google\Model
{
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(DeleteSingleTenantHsmInstance::class, 'Google_Service_CloudKMS_DeleteSingleTenantHsmInstance');
@@ -0,0 +1,25 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class DestroyCryptoKeyVersionRequest extends \Google\Model
{
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(DestroyCryptoKeyVersionRequest::class, 'Google_Service_CloudKMS_DestroyCryptoKeyVersionRequest');
+118
View File
@@ -0,0 +1,118 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class Digest extends \Google\Model
{
/**
* A message digest produced with SHAKE-256, to be used with ML-DSA external-μ
* algorithms only. See "message representative" note in section 6.2,
* algorithm 7 of the FIPS-204 standard: https://doi.org/10.6028/nist.fips.204
*
* @var string
*/
public $externalMu;
/**
* A message digest produced with the SHA-256 algorithm.
*
* @var string
*/
public $sha256;
/**
* A message digest produced with the SHA-384 algorithm.
*
* @var string
*/
public $sha384;
/**
* A message digest produced with the SHA-512 algorithm.
*
* @var string
*/
public $sha512;
/**
* A message digest produced with SHAKE-256, to be used with ML-DSA external-μ
* algorithms only. See "message representative" note in section 6.2,
* algorithm 7 of the FIPS-204 standard: https://doi.org/10.6028/nist.fips.204
*
* @param string $externalMu
*/
public function setExternalMu($externalMu)
{
$this->externalMu = $externalMu;
}
/**
* @return string
*/
public function getExternalMu()
{
return $this->externalMu;
}
/**
* A message digest produced with the SHA-256 algorithm.
*
* @param string $sha256
*/
public function setSha256($sha256)
{
$this->sha256 = $sha256;
}
/**
* @return string
*/
public function getSha256()
{
return $this->sha256;
}
/**
* A message digest produced with the SHA-384 algorithm.
*
* @param string $sha384
*/
public function setSha384($sha384)
{
$this->sha384 = $sha384;
}
/**
* @return string
*/
public function getSha384()
{
return $this->sha384;
}
/**
* A message digest produced with the SHA-512 algorithm.
*
* @param string $sha512
*/
public function setSha512($sha512)
{
$this->sha512 = $sha512;
}
/**
* @return string
*/
public function getSha512()
{
return $this->sha512;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Digest::class, 'Google_Service_CloudKMS_Digest');
@@ -0,0 +1,25 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class DisableSingleTenantHsmInstance extends \Google\Model
{
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(DisableSingleTenantHsmInstance::class, 'Google_Service_CloudKMS_DisableSingleTenantHsmInstance');
@@ -0,0 +1,74 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class EkmConfig extends \Google\Model
{
/**
* Optional. Resource name of the default EkmConnection. Setting this field to
* the empty string removes the default.
*
* @var string
*/
public $defaultEkmConnection;
/**
* Output only. The resource name for the EkmConfig in the format
* `projects/locations/ekmConfig`.
*
* @var string
*/
public $name;
/**
* Optional. Resource name of the default EkmConnection. Setting this field to
* the empty string removes the default.
*
* @param string $defaultEkmConnection
*/
public function setDefaultEkmConnection($defaultEkmConnection)
{
$this->defaultEkmConnection = $defaultEkmConnection;
}
/**
* @return string
*/
public function getDefaultEkmConnection()
{
return $this->defaultEkmConnection;
}
/**
* Output only. The resource name for the EkmConfig in the format
* `projects/locations/ekmConfig`.
*
* @param string $name
*/
public function setName($name)
{
$this->name = $name;
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(EkmConfig::class, 'Google_Service_CloudKMS_EkmConfig');
@@ -0,0 +1,191 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class EkmConnection extends \Google\Collection
{
/**
* Not specified.
*/
public const KEY_MANAGEMENT_MODE_KEY_MANAGEMENT_MODE_UNSPECIFIED = 'KEY_MANAGEMENT_MODE_UNSPECIFIED';
/**
* EKM-side key management operations on CryptoKeys created with this
* EkmConnection must be initiated from the EKM directly and cannot be
* performed from Cloud KMS. This means that: * When creating a
* CryptoKeyVersion associated with this EkmConnection, the caller must supply
* the key path of pre-existing external key material that will be linked to
* the CryptoKeyVersion. * Destruction of external key material cannot be
* requested via the Cloud KMS API and must be performed directly in the EKM.
* * Automatic rotation of key material is not supported.
*/
public const KEY_MANAGEMENT_MODE_MANUAL = 'MANUAL';
/**
* All CryptoKeys created with this EkmConnection use EKM-side key management
* operations initiated from Cloud KMS. This means that: * When a
* CryptoKeyVersion associated with this EkmConnection is created, the EKM
* automatically generates new key material and a new key path. The caller
* cannot supply the key path of pre-existing external key material. *
* Destruction of external key material associated with this EkmConnection can
* be requested by calling DestroyCryptoKeyVersion. * Automatic rotation of
* key material is supported.
*/
public const KEY_MANAGEMENT_MODE_CLOUD_KMS = 'CLOUD_KMS';
protected $collection_key = 'serviceResolvers';
/**
* Output only. The time at which the EkmConnection was created.
*
* @var string
*/
public $createTime;
/**
* Optional. Identifies the EKM Crypto Space that this EkmConnection maps to.
* Note: This field is required if KeyManagementMode is CLOUD_KMS.
*
* @var string
*/
public $cryptoSpacePath;
/**
* Optional. Etag of the currently stored EkmConnection.
*
* @var string
*/
public $etag;
/**
* Optional. Describes who can perform control plane operations on the EKM. If
* unset, this defaults to MANUAL.
*
* @var string
*/
public $keyManagementMode;
/**
* Output only. The resource name for the EkmConnection in the format
* `projects/locations/ekmConnections`.
*
* @var string
*/
public $name;
protected $serviceResolversType = ServiceResolver::class;
protected $serviceResolversDataType = 'array';
/**
* Output only. The time at which the EkmConnection was created.
*
* @param string $createTime
*/
public function setCreateTime($createTime)
{
$this->createTime = $createTime;
}
/**
* @return string
*/
public function getCreateTime()
{
return $this->createTime;
}
/**
* Optional. Identifies the EKM Crypto Space that this EkmConnection maps to.
* Note: This field is required if KeyManagementMode is CLOUD_KMS.
*
* @param string $cryptoSpacePath
*/
public function setCryptoSpacePath($cryptoSpacePath)
{
$this->cryptoSpacePath = $cryptoSpacePath;
}
/**
* @return string
*/
public function getCryptoSpacePath()
{
return $this->cryptoSpacePath;
}
/**
* Optional. Etag of the currently stored EkmConnection.
*
* @param string $etag
*/
public function setEtag($etag)
{
$this->etag = $etag;
}
/**
* @return string
*/
public function getEtag()
{
return $this->etag;
}
/**
* Optional. Describes who can perform control plane operations on the EKM. If
* unset, this defaults to MANUAL.
*
* Accepted values: KEY_MANAGEMENT_MODE_UNSPECIFIED, MANUAL, CLOUD_KMS
*
* @param self::KEY_MANAGEMENT_MODE_* $keyManagementMode
*/
public function setKeyManagementMode($keyManagementMode)
{
$this->keyManagementMode = $keyManagementMode;
}
/**
* @return self::KEY_MANAGEMENT_MODE_*
*/
public function getKeyManagementMode()
{
return $this->keyManagementMode;
}
/**
* Output only. The resource name for the EkmConnection in the format
* `projects/locations/ekmConnections`.
*
* @param string $name
*/
public function setName($name)
{
$this->name = $name;
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* Optional. A list of ServiceResolvers where the EKM can be reached. There
* should be one ServiceResolver per EKM replica. Currently, only a single
* ServiceResolver is supported.
*
* @param ServiceResolver[] $serviceResolvers
*/
public function setServiceResolvers($serviceResolvers)
{
$this->serviceResolvers = $serviceResolvers;
}
/**
* @return ServiceResolver[]
*/
public function getServiceResolvers()
{
return $this->serviceResolvers;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(EkmConnection::class, 'Google_Service_CloudKMS_EkmConnection');
@@ -0,0 +1,25 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class EnableSingleTenantHsmInstance extends \Google\Model
{
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(EnableSingleTenantHsmInstance::class, 'Google_Service_CloudKMS_EnableSingleTenantHsmInstance');
@@ -0,0 +1,178 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class EncryptRequest extends \Google\Model
{
/**
* Optional. Optional data that, if specified, must also be provided during
* decryption through DecryptRequest.additional_authenticated_data. The
* maximum size depends on the key version's protection_level. For SOFTWARE,
* EXTERNAL, and EXTERNAL_VPC keys the AAD must be no larger than 64KiB. For
* HSM keys, the combined length of the plaintext and
* additional_authenticated_data fields must be no larger than 8KiB.
*
* @var string
*/
public $additionalAuthenticatedData;
/**
* Optional. An optional CRC32C checksum of the
* EncryptRequest.additional_authenticated_data. If specified,
* KeyManagementService will verify the integrity of the received
* EncryptRequest.additional_authenticated_data using this checksum.
* KeyManagementService will report an error if the checksum verification
* fails. If you receive a checksum error, your client should verify that
* CRC32C(EncryptRequest.additional_authenticated_data) is equal to
* EncryptRequest.additional_authenticated_data_crc32c, and if so, perform a
* limited number of retries. A persistent mismatch may indicate an issue in
* your computation of the CRC32C checksum. Note: This field is defined as
* int64 for reasons of compatibility across different languages. However, it
* is a non-negative integer, which will never exceed 2^32-1, and can be
* safely downconverted to uint32 in languages that support this type.
*
* @var string
*/
public $additionalAuthenticatedDataCrc32c;
/**
* Required. The data to encrypt. Must be no larger than 64KiB. The maximum
* size depends on the key version's protection_level. For SOFTWARE, EXTERNAL,
* and EXTERNAL_VPC keys, the plaintext must be no larger than 64KiB. For HSM
* keys, the combined length of the plaintext and
* additional_authenticated_data fields must be no larger than 8KiB.
*
* @var string
*/
public $plaintext;
/**
* Optional. An optional CRC32C checksum of the EncryptRequest.plaintext. If
* specified, KeyManagementService will verify the integrity of the received
* EncryptRequest.plaintext using this checksum. KeyManagementService will
* report an error if the checksum verification fails. If you receive a
* checksum error, your client should verify that
* CRC32C(EncryptRequest.plaintext) is equal to
* EncryptRequest.plaintext_crc32c, and if so, perform a limited number of
* retries. A persistent mismatch may indicate an issue in your computation of
* the CRC32C checksum. Note: This field is defined as int64 for reasons of
* compatibility across different languages. However, it is a non-negative
* integer, which will never exceed 2^32-1, and can be safely downconverted to
* uint32 in languages that support this type.
*
* @var string
*/
public $plaintextCrc32c;
/**
* Optional. Optional data that, if specified, must also be provided during
* decryption through DecryptRequest.additional_authenticated_data. The
* maximum size depends on the key version's protection_level. For SOFTWARE,
* EXTERNAL, and EXTERNAL_VPC keys the AAD must be no larger than 64KiB. For
* HSM keys, the combined length of the plaintext and
* additional_authenticated_data fields must be no larger than 8KiB.
*
* @param string $additionalAuthenticatedData
*/
public function setAdditionalAuthenticatedData($additionalAuthenticatedData)
{
$this->additionalAuthenticatedData = $additionalAuthenticatedData;
}
/**
* @return string
*/
public function getAdditionalAuthenticatedData()
{
return $this->additionalAuthenticatedData;
}
/**
* Optional. An optional CRC32C checksum of the
* EncryptRequest.additional_authenticated_data. If specified,
* KeyManagementService will verify the integrity of the received
* EncryptRequest.additional_authenticated_data using this checksum.
* KeyManagementService will report an error if the checksum verification
* fails. If you receive a checksum error, your client should verify that
* CRC32C(EncryptRequest.additional_authenticated_data) is equal to
* EncryptRequest.additional_authenticated_data_crc32c, and if so, perform a
* limited number of retries. A persistent mismatch may indicate an issue in
* your computation of the CRC32C checksum. Note: This field is defined as
* int64 for reasons of compatibility across different languages. However, it
* is a non-negative integer, which will never exceed 2^32-1, and can be
* safely downconverted to uint32 in languages that support this type.
*
* @param string $additionalAuthenticatedDataCrc32c
*/
public function setAdditionalAuthenticatedDataCrc32c($additionalAuthenticatedDataCrc32c)
{
$this->additionalAuthenticatedDataCrc32c = $additionalAuthenticatedDataCrc32c;
}
/**
* @return string
*/
public function getAdditionalAuthenticatedDataCrc32c()
{
return $this->additionalAuthenticatedDataCrc32c;
}
/**
* Required. The data to encrypt. Must be no larger than 64KiB. The maximum
* size depends on the key version's protection_level. For SOFTWARE, EXTERNAL,
* and EXTERNAL_VPC keys, the plaintext must be no larger than 64KiB. For HSM
* keys, the combined length of the plaintext and
* additional_authenticated_data fields must be no larger than 8KiB.
*
* @param string $plaintext
*/
public function setPlaintext($plaintext)
{
$this->plaintext = $plaintext;
}
/**
* @return string
*/
public function getPlaintext()
{
return $this->plaintext;
}
/**
* Optional. An optional CRC32C checksum of the EncryptRequest.plaintext. If
* specified, KeyManagementService will verify the integrity of the received
* EncryptRequest.plaintext using this checksum. KeyManagementService will
* report an error if the checksum verification fails. If you receive a
* checksum error, your client should verify that
* CRC32C(EncryptRequest.plaintext) is equal to
* EncryptRequest.plaintext_crc32c, and if so, perform a limited number of
* retries. A persistent mismatch may indicate an issue in your computation of
* the CRC32C checksum. Note: This field is defined as int64 for reasons of
* compatibility across different languages. However, it is a non-negative
* integer, which will never exceed 2^32-1, and can be safely downconverted to
* uint32 in languages that support this type.
*
* @param string $plaintextCrc32c
*/
public function setPlaintextCrc32c($plaintextCrc32c)
{
$this->plaintextCrc32c = $plaintextCrc32c;
}
/**
* @return string
*/
public function getPlaintextCrc32c()
{
return $this->plaintextCrc32c;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(EncryptRequest::class, 'Google_Service_CloudKMS_EncryptRequest');
@@ -0,0 +1,231 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class EncryptResponse extends \Google\Model
{
/**
* Not specified.
*/
public const PROTECTION_LEVEL_PROTECTION_LEVEL_UNSPECIFIED = 'PROTECTION_LEVEL_UNSPECIFIED';
/**
* Crypto operations are performed in software.
*/
public const PROTECTION_LEVEL_SOFTWARE = 'SOFTWARE';
/**
* Crypto operations are performed in a Hardware Security Module.
*/
public const PROTECTION_LEVEL_HSM = 'HSM';
/**
* Crypto operations are performed by an external key manager.
*/
public const PROTECTION_LEVEL_EXTERNAL = 'EXTERNAL';
/**
* Crypto operations are performed in an EKM-over-VPC backend.
*/
public const PROTECTION_LEVEL_EXTERNAL_VPC = 'EXTERNAL_VPC';
/**
* Crypto operations are performed in a single-tenant HSM.
*/
public const PROTECTION_LEVEL_HSM_SINGLE_TENANT = 'HSM_SINGLE_TENANT';
/**
* The encrypted data.
*
* @var string
*/
public $ciphertext;
/**
* Integrity verification field. A CRC32C checksum of the returned
* EncryptResponse.ciphertext. An integrity check of
* EncryptResponse.ciphertext can be performed by computing the CRC32C
* checksum of EncryptResponse.ciphertext and comparing your results to this
* field. Discard the response in case of non-matching checksum values, and
* perform a limited number of retries. A persistent mismatch may indicate an
* issue in your computation of the CRC32C checksum. Note: This field is
* defined as int64 for reasons of compatibility across different languages.
* However, it is a non-negative integer, which will never exceed 2^32-1, and
* can be safely downconverted to uint32 in languages that support this type.
*
* @var string
*/
public $ciphertextCrc32c;
/**
* The resource name of the CryptoKeyVersion used in encryption. Check this
* field to verify that the intended resource was used for encryption.
*
* @var string
*/
public $name;
/**
* The ProtectionLevel of the CryptoKeyVersion used in encryption.
*
* @var string
*/
public $protectionLevel;
/**
* Integrity verification field. A flag indicating whether
* EncryptRequest.additional_authenticated_data_crc32c was received by
* KeyManagementService and used for the integrity verification of the AAD. A
* false value of this field indicates either that
* EncryptRequest.additional_authenticated_data_crc32c was left unset or that
* it was not delivered to KeyManagementService. If you've set
* EncryptRequest.additional_authenticated_data_crc32c but this field is still
* false, discard the response and perform a limited number of retries.
*
* @var bool
*/
public $verifiedAdditionalAuthenticatedDataCrc32c;
/**
* Integrity verification field. A flag indicating whether
* EncryptRequest.plaintext_crc32c was received by KeyManagementService and
* used for the integrity verification of the plaintext. A false value of this
* field indicates either that EncryptRequest.plaintext_crc32c was left unset
* or that it was not delivered to KeyManagementService. If you've set
* EncryptRequest.plaintext_crc32c but this field is still false, discard the
* response and perform a limited number of retries.
*
* @var bool
*/
public $verifiedPlaintextCrc32c;
/**
* The encrypted data.
*
* @param string $ciphertext
*/
public function setCiphertext($ciphertext)
{
$this->ciphertext = $ciphertext;
}
/**
* @return string
*/
public function getCiphertext()
{
return $this->ciphertext;
}
/**
* Integrity verification field. A CRC32C checksum of the returned
* EncryptResponse.ciphertext. An integrity check of
* EncryptResponse.ciphertext can be performed by computing the CRC32C
* checksum of EncryptResponse.ciphertext and comparing your results to this
* field. Discard the response in case of non-matching checksum values, and
* perform a limited number of retries. A persistent mismatch may indicate an
* issue in your computation of the CRC32C checksum. Note: This field is
* defined as int64 for reasons of compatibility across different languages.
* However, it is a non-negative integer, which will never exceed 2^32-1, and
* can be safely downconverted to uint32 in languages that support this type.
*
* @param string $ciphertextCrc32c
*/
public function setCiphertextCrc32c($ciphertextCrc32c)
{
$this->ciphertextCrc32c = $ciphertextCrc32c;
}
/**
* @return string
*/
public function getCiphertextCrc32c()
{
return $this->ciphertextCrc32c;
}
/**
* The resource name of the CryptoKeyVersion used in encryption. Check this
* field to verify that the intended resource was used for encryption.
*
* @param string $name
*/
public function setName($name)
{
$this->name = $name;
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* The ProtectionLevel of the CryptoKeyVersion used in encryption.
*
* Accepted values: PROTECTION_LEVEL_UNSPECIFIED, SOFTWARE, HSM, EXTERNAL,
* EXTERNAL_VPC, HSM_SINGLE_TENANT
*
* @param self::PROTECTION_LEVEL_* $protectionLevel
*/
public function setProtectionLevel($protectionLevel)
{
$this->protectionLevel = $protectionLevel;
}
/**
* @return self::PROTECTION_LEVEL_*
*/
public function getProtectionLevel()
{
return $this->protectionLevel;
}
/**
* Integrity verification field. A flag indicating whether
* EncryptRequest.additional_authenticated_data_crc32c was received by
* KeyManagementService and used for the integrity verification of the AAD. A
* false value of this field indicates either that
* EncryptRequest.additional_authenticated_data_crc32c was left unset or that
* it was not delivered to KeyManagementService. If you've set
* EncryptRequest.additional_authenticated_data_crc32c but this field is still
* false, discard the response and perform a limited number of retries.
*
* @param bool $verifiedAdditionalAuthenticatedDataCrc32c
*/
public function setVerifiedAdditionalAuthenticatedDataCrc32c($verifiedAdditionalAuthenticatedDataCrc32c)
{
$this->verifiedAdditionalAuthenticatedDataCrc32c = $verifiedAdditionalAuthenticatedDataCrc32c;
}
/**
* @return bool
*/
public function getVerifiedAdditionalAuthenticatedDataCrc32c()
{
return $this->verifiedAdditionalAuthenticatedDataCrc32c;
}
/**
* Integrity verification field. A flag indicating whether
* EncryptRequest.plaintext_crc32c was received by KeyManagementService and
* used for the integrity verification of the plaintext. A false value of this
* field indicates either that EncryptRequest.plaintext_crc32c was left unset
* or that it was not delivered to KeyManagementService. If you've set
* EncryptRequest.plaintext_crc32c but this field is still false, discard the
* response and perform a limited number of retries.
*
* @param bool $verifiedPlaintextCrc32c
*/
public function setVerifiedPlaintextCrc32c($verifiedPlaintextCrc32c)
{
$this->verifiedPlaintextCrc32c = $verifiedPlaintextCrc32c;
}
/**
* @return bool
*/
public function getVerifiedPlaintextCrc32c()
{
return $this->verifiedPlaintextCrc32c;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(EncryptResponse::class, 'Google_Service_CloudKMS_EncryptResponse');
@@ -0,0 +1,25 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class ExecuteSingleTenantHsmInstanceProposalRequest extends \Google\Model
{
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ExecuteSingleTenantHsmInstanceProposalRequest::class, 'Google_Service_CloudKMS_ExecuteSingleTenantHsmInstanceProposalRequest');
+122
View File
@@ -0,0 +1,122 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class Expr extends \Google\Model
{
/**
* Optional. Description of the expression. This is a longer text which
* describes the expression, e.g. when hovered over it in a UI.
*
* @var string
*/
public $description;
/**
* Textual representation of an expression in Common Expression Language
* syntax.
*
* @var string
*/
public $expression;
/**
* Optional. String indicating the location of the expression for error
* reporting, e.g. a file name and a position in the file.
*
* @var string
*/
public $location;
/**
* Optional. Title for the expression, i.e. a short string describing its
* purpose. This can be used e.g. in UIs which allow to enter the expression.
*
* @var string
*/
public $title;
/**
* Optional. Description of the expression. This is a longer text which
* describes the expression, e.g. when hovered over it in a UI.
*
* @param string $description
*/
public function setDescription($description)
{
$this->description = $description;
}
/**
* @return string
*/
public function getDescription()
{
return $this->description;
}
/**
* Textual representation of an expression in Common Expression Language
* syntax.
*
* @param string $expression
*/
public function setExpression($expression)
{
$this->expression = $expression;
}
/**
* @return string
*/
public function getExpression()
{
return $this->expression;
}
/**
* Optional. String indicating the location of the expression for error
* reporting, e.g. a file name and a position in the file.
*
* @param string $location
*/
public function setLocation($location)
{
$this->location = $location;
}
/**
* @return string
*/
public function getLocation()
{
return $this->location;
}
/**
* Optional. Title for the expression, i.e. a short string describing its
* purpose. This can be used e.g. in UIs which allow to enter the expression.
*
* @param string $title
*/
public function setTitle($title)
{
$this->title = $title;
}
/**
* @return string
*/
public function getTitle()
{
return $this->title;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Expr::class, 'Google_Service_CloudKMS_Expr');
@@ -0,0 +1,74 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class ExternalProtectionLevelOptions extends \Google\Model
{
/**
* The path to the external key material on the EKM when using EkmConnection
* e.g., "v0/my/key". Set this field instead of external_key_uri when using an
* EkmConnection.
*
* @var string
*/
public $ekmConnectionKeyPath;
/**
* The URI for an external resource that this CryptoKeyVersion represents.
*
* @var string
*/
public $externalKeyUri;
/**
* The path to the external key material on the EKM when using EkmConnection
* e.g., "v0/my/key". Set this field instead of external_key_uri when using an
* EkmConnection.
*
* @param string $ekmConnectionKeyPath
*/
public function setEkmConnectionKeyPath($ekmConnectionKeyPath)
{
$this->ekmConnectionKeyPath = $ekmConnectionKeyPath;
}
/**
* @return string
*/
public function getEkmConnectionKeyPath()
{
return $this->ekmConnectionKeyPath;
}
/**
* The URI for an external resource that this CryptoKeyVersion represents.
*
* @param string $externalKeyUri
*/
public function setExternalKeyUri($externalKeyUri)
{
$this->externalKeyUri = $externalKeyUri;
}
/**
* @return string
*/
public function getExternalKeyUri()
{
return $this->externalKeyUri;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ExternalProtectionLevelOptions::class, 'Google_Service_CloudKMS_ExternalProtectionLevelOptions');
@@ -0,0 +1,101 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class GenerateRandomBytesRequest extends \Google\Model
{
/**
* Not specified.
*/
public const PROTECTION_LEVEL_PROTECTION_LEVEL_UNSPECIFIED = 'PROTECTION_LEVEL_UNSPECIFIED';
/**
* Crypto operations are performed in software.
*/
public const PROTECTION_LEVEL_SOFTWARE = 'SOFTWARE';
/**
* Crypto operations are performed in a Hardware Security Module.
*/
public const PROTECTION_LEVEL_HSM = 'HSM';
/**
* Crypto operations are performed by an external key manager.
*/
public const PROTECTION_LEVEL_EXTERNAL = 'EXTERNAL';
/**
* Crypto operations are performed in an EKM-over-VPC backend.
*/
public const PROTECTION_LEVEL_EXTERNAL_VPC = 'EXTERNAL_VPC';
/**
* Crypto operations are performed in a single-tenant HSM.
*/
public const PROTECTION_LEVEL_HSM_SINGLE_TENANT = 'HSM_SINGLE_TENANT';
/**
* The length in bytes of the amount of randomness to retrieve. Minimum 8
* bytes, maximum 1024 bytes.
*
* @var int
*/
public $lengthBytes;
/**
* The ProtectionLevel to use when generating the random data. Currently, only
* HSM protection level is supported.
*
* @var string
*/
public $protectionLevel;
/**
* The length in bytes of the amount of randomness to retrieve. Minimum 8
* bytes, maximum 1024 bytes.
*
* @param int $lengthBytes
*/
public function setLengthBytes($lengthBytes)
{
$this->lengthBytes = $lengthBytes;
}
/**
* @return int
*/
public function getLengthBytes()
{
return $this->lengthBytes;
}
/**
* The ProtectionLevel to use when generating the random data. Currently, only
* HSM protection level is supported.
*
* Accepted values: PROTECTION_LEVEL_UNSPECIFIED, SOFTWARE, HSM, EXTERNAL,
* EXTERNAL_VPC, HSM_SINGLE_TENANT
*
* @param self::PROTECTION_LEVEL_* $protectionLevel
*/
public function setProtectionLevel($protectionLevel)
{
$this->protectionLevel = $protectionLevel;
}
/**
* @return self::PROTECTION_LEVEL_*
*/
public function getProtectionLevel()
{
return $this->protectionLevel;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GenerateRandomBytesRequest::class, 'Google_Service_CloudKMS_GenerateRandomBytesRequest');
@@ -0,0 +1,88 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class GenerateRandomBytesResponse extends \Google\Model
{
/**
* The generated data.
*
* @var string
*/
public $data;
/**
* Integrity verification field. A CRC32C checksum of the returned
* GenerateRandomBytesResponse.data. An integrity check of
* GenerateRandomBytesResponse.data can be performed by computing the CRC32C
* checksum of GenerateRandomBytesResponse.data and comparing your results to
* this field. Discard the response in case of non-matching checksum values,
* and perform a limited number of retries. A persistent mismatch may indicate
* an issue in your computation of the CRC32C checksum. Note: This field is
* defined as int64 for reasons of compatibility across different languages.
* However, it is a non-negative integer, which will never exceed 2^32-1, and
* can be safely downconverted to uint32 in languages that support this type.
*
* @var string
*/
public $dataCrc32c;
/**
* The generated data.
*
* @param string $data
*/
public function setData($data)
{
$this->data = $data;
}
/**
* @return string
*/
public function getData()
{
return $this->data;
}
/**
* Integrity verification field. A CRC32C checksum of the returned
* GenerateRandomBytesResponse.data. An integrity check of
* GenerateRandomBytesResponse.data can be performed by computing the CRC32C
* checksum of GenerateRandomBytesResponse.data and comparing your results to
* this field. Discard the response in case of non-matching checksum values,
* and perform a limited number of retries. A persistent mismatch may indicate
* an issue in your computation of the CRC32C checksum. Note: This field is
* defined as int64 for reasons of compatibility across different languages.
* However, it is a non-negative integer, which will never exceed 2^32-1, and
* can be safely downconverted to uint32 in languages that support this type.
*
* @param string $dataCrc32c
*/
public function setDataCrc32c($dataCrc32c)
{
$this->dataCrc32c = $dataCrc32c;
}
/**
* @return string
*/
public function getDataCrc32c()
{
return $this->dataCrc32c;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GenerateRandomBytesResponse::class, 'Google_Service_CloudKMS_GenerateRandomBytesResponse');
@@ -0,0 +1,416 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class ImportCryptoKeyVersionRequest extends \Google\Model
{
/**
* Not specified.
*/
public const ALGORITHM_CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED = 'CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED';
/**
* Creates symmetric encryption keys.
*/
public const ALGORITHM_GOOGLE_SYMMETRIC_ENCRYPTION = 'GOOGLE_SYMMETRIC_ENCRYPTION';
/**
* AES-GCM (Galois Counter Mode) using 128-bit keys.
*/
public const ALGORITHM_AES_128_GCM = 'AES_128_GCM';
/**
* AES-GCM (Galois Counter Mode) using 256-bit keys.
*/
public const ALGORITHM_AES_256_GCM = 'AES_256_GCM';
/**
* AES-CBC (Cipher Block Chaining Mode) using 128-bit keys.
*/
public const ALGORITHM_AES_128_CBC = 'AES_128_CBC';
/**
* AES-CBC (Cipher Block Chaining Mode) using 256-bit keys.
*/
public const ALGORITHM_AES_256_CBC = 'AES_256_CBC';
/**
* AES-CTR (Counter Mode) using 128-bit keys.
*/
public const ALGORITHM_AES_128_CTR = 'AES_128_CTR';
/**
* AES-CTR (Counter Mode) using 256-bit keys.
*/
public const ALGORITHM_AES_256_CTR = 'AES_256_CTR';
/**
* RSASSA-PSS 2048 bit key with a SHA256 digest.
*/
public const ALGORITHM_RSA_SIGN_PSS_2048_SHA256 = 'RSA_SIGN_PSS_2048_SHA256';
/**
* RSASSA-PSS 3072 bit key with a SHA256 digest.
*/
public const ALGORITHM_RSA_SIGN_PSS_3072_SHA256 = 'RSA_SIGN_PSS_3072_SHA256';
/**
* RSASSA-PSS 4096 bit key with a SHA256 digest.
*/
public const ALGORITHM_RSA_SIGN_PSS_4096_SHA256 = 'RSA_SIGN_PSS_4096_SHA256';
/**
* RSASSA-PSS 4096 bit key with a SHA512 digest.
*/
public const ALGORITHM_RSA_SIGN_PSS_4096_SHA512 = 'RSA_SIGN_PSS_4096_SHA512';
/**
* RSASSA-PKCS1-v1_5 with a 2048 bit key and a SHA256 digest.
*/
public const ALGORITHM_RSA_SIGN_PKCS1_2048_SHA256 = 'RSA_SIGN_PKCS1_2048_SHA256';
/**
* RSASSA-PKCS1-v1_5 with a 3072 bit key and a SHA256 digest.
*/
public const ALGORITHM_RSA_SIGN_PKCS1_3072_SHA256 = 'RSA_SIGN_PKCS1_3072_SHA256';
/**
* RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA256 digest.
*/
public const ALGORITHM_RSA_SIGN_PKCS1_4096_SHA256 = 'RSA_SIGN_PKCS1_4096_SHA256';
/**
* RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA512 digest.
*/
public const ALGORITHM_RSA_SIGN_PKCS1_4096_SHA512 = 'RSA_SIGN_PKCS1_4096_SHA512';
/**
* RSASSA-PKCS1-v1_5 signing without encoding, with a 2048 bit key.
*/
public const ALGORITHM_RSA_SIGN_RAW_PKCS1_2048 = 'RSA_SIGN_RAW_PKCS1_2048';
/**
* RSASSA-PKCS1-v1_5 signing without encoding, with a 3072 bit key.
*/
public const ALGORITHM_RSA_SIGN_RAW_PKCS1_3072 = 'RSA_SIGN_RAW_PKCS1_3072';
/**
* RSASSA-PKCS1-v1_5 signing without encoding, with a 4096 bit key.
*/
public const ALGORITHM_RSA_SIGN_RAW_PKCS1_4096 = 'RSA_SIGN_RAW_PKCS1_4096';
/**
* RSAES-OAEP 2048 bit key with a SHA256 digest.
*/
public const ALGORITHM_RSA_DECRYPT_OAEP_2048_SHA256 = 'RSA_DECRYPT_OAEP_2048_SHA256';
/**
* RSAES-OAEP 3072 bit key with a SHA256 digest.
*/
public const ALGORITHM_RSA_DECRYPT_OAEP_3072_SHA256 = 'RSA_DECRYPT_OAEP_3072_SHA256';
/**
* RSAES-OAEP 4096 bit key with a SHA256 digest.
*/
public const ALGORITHM_RSA_DECRYPT_OAEP_4096_SHA256 = 'RSA_DECRYPT_OAEP_4096_SHA256';
/**
* RSAES-OAEP 4096 bit key with a SHA512 digest.
*/
public const ALGORITHM_RSA_DECRYPT_OAEP_4096_SHA512 = 'RSA_DECRYPT_OAEP_4096_SHA512';
/**
* RSAES-OAEP 2048 bit key with a SHA1 digest.
*/
public const ALGORITHM_RSA_DECRYPT_OAEP_2048_SHA1 = 'RSA_DECRYPT_OAEP_2048_SHA1';
/**
* RSAES-OAEP 3072 bit key with a SHA1 digest.
*/
public const ALGORITHM_RSA_DECRYPT_OAEP_3072_SHA1 = 'RSA_DECRYPT_OAEP_3072_SHA1';
/**
* RSAES-OAEP 4096 bit key with a SHA1 digest.
*/
public const ALGORITHM_RSA_DECRYPT_OAEP_4096_SHA1 = 'RSA_DECRYPT_OAEP_4096_SHA1';
/**
* ECDSA on the NIST P-256 curve with a SHA256 digest. Other hash functions
* can also be used: https://cloud.google.com/kms/docs/create-validate-
* signatures#ecdsa_support_for_other_hash_algorithms
*/
public const ALGORITHM_EC_SIGN_P256_SHA256 = 'EC_SIGN_P256_SHA256';
/**
* ECDSA on the NIST P-384 curve with a SHA384 digest. Other hash functions
* can also be used: https://cloud.google.com/kms/docs/create-validate-
* signatures#ecdsa_support_for_other_hash_algorithms
*/
public const ALGORITHM_EC_SIGN_P384_SHA384 = 'EC_SIGN_P384_SHA384';
/**
* ECDSA on the non-NIST secp256k1 curve. This curve is only supported for HSM
* protection level. Other hash functions can also be used:
* https://cloud.google.com/kms/docs/create-validate-
* signatures#ecdsa_support_for_other_hash_algorithms
*/
public const ALGORITHM_EC_SIGN_SECP256K1_SHA256 = 'EC_SIGN_SECP256K1_SHA256';
/**
* EdDSA on the Curve25519 in pure mode (taking data as input).
*/
public const ALGORITHM_EC_SIGN_ED25519 = 'EC_SIGN_ED25519';
/**
* HMAC-SHA256 signing with a 256 bit key.
*/
public const ALGORITHM_HMAC_SHA256 = 'HMAC_SHA256';
/**
* HMAC-SHA1 signing with a 160 bit key.
*/
public const ALGORITHM_HMAC_SHA1 = 'HMAC_SHA1';
/**
* HMAC-SHA384 signing with a 384 bit key.
*/
public const ALGORITHM_HMAC_SHA384 = 'HMAC_SHA384';
/**
* HMAC-SHA512 signing with a 512 bit key.
*/
public const ALGORITHM_HMAC_SHA512 = 'HMAC_SHA512';
/**
* HMAC-SHA224 signing with a 224 bit key.
*/
public const ALGORITHM_HMAC_SHA224 = 'HMAC_SHA224';
/**
* Algorithm representing symmetric encryption by an external key manager.
*/
public const ALGORITHM_EXTERNAL_SYMMETRIC_ENCRYPTION = 'EXTERNAL_SYMMETRIC_ENCRYPTION';
/**
* ML-KEM-768 (FIPS 203)
*/
public const ALGORITHM_ML_KEM_768 = 'ML_KEM_768';
/**
* ML-KEM-1024 (FIPS 203)
*/
public const ALGORITHM_ML_KEM_1024 = 'ML_KEM_1024';
/**
* X-Wing hybrid KEM combining ML-KEM-768 with X25519 following
* datatracker.ietf.org/doc/draft-connolly-cfrg-xwing-kem/.
*/
public const ALGORITHM_KEM_XWING = 'KEM_XWING';
/**
* The post-quantum Module-Lattice-Based Digital Signature Algorithm, at
* security level 1. Randomized version.
*/
public const ALGORITHM_PQ_SIGN_ML_DSA_44 = 'PQ_SIGN_ML_DSA_44';
/**
* The post-quantum Module-Lattice-Based Digital Signature Algorithm, at
* security level 3. Randomized version.
*/
public const ALGORITHM_PQ_SIGN_ML_DSA_65 = 'PQ_SIGN_ML_DSA_65';
/**
* The post-quantum Module-Lattice-Based Digital Signature Algorithm, at
* security level 5. Randomized version.
*/
public const ALGORITHM_PQ_SIGN_ML_DSA_87 = 'PQ_SIGN_ML_DSA_87';
/**
* The post-quantum stateless hash-based digital signature algorithm, at
* security level 1. Randomized version.
*/
public const ALGORITHM_PQ_SIGN_SLH_DSA_SHA2_128S = 'PQ_SIGN_SLH_DSA_SHA2_128S';
/**
* The post-quantum stateless hash-based digital signature algorithm, at
* security level 1. Randomized pre-hash version supporting SHA256 digests.
*/
public const ALGORITHM_PQ_SIGN_HASH_SLH_DSA_SHA2_128S_SHA256 = 'PQ_SIGN_HASH_SLH_DSA_SHA2_128S_SHA256';
/**
* The post-quantum Module-Lattice-Based Digital Signature Algorithm, at
* security level 1. Randomized version supporting externally-computed message
* representatives.
*/
public const ALGORITHM_PQ_SIGN_ML_DSA_44_EXTERNAL_MU = 'PQ_SIGN_ML_DSA_44_EXTERNAL_MU';
/**
* The post-quantum Module-Lattice-Based Digital Signature Algorithm, at
* security level 3. Randomized version supporting externally-computed message
* representatives.
*/
public const ALGORITHM_PQ_SIGN_ML_DSA_65_EXTERNAL_MU = 'PQ_SIGN_ML_DSA_65_EXTERNAL_MU';
/**
* The post-quantum Module-Lattice-Based Digital Signature Algorithm, at
* security level 5. Randomized version supporting externally-computed message
* representatives.
*/
public const ALGORITHM_PQ_SIGN_ML_DSA_87_EXTERNAL_MU = 'PQ_SIGN_ML_DSA_87_EXTERNAL_MU';
/**
* Required. The algorithm of the key being imported. This does not need to
* match the version_template of the CryptoKey this version imports into.
*
* @var string
*/
public $algorithm;
/**
* Optional. The optional name of an existing CryptoKeyVersion to target for
* an import operation. If this field is not present, a new CryptoKeyVersion
* containing the supplied key material is created. If this field is present,
* the supplied key material is imported into the existing CryptoKeyVersion.
* To import into an existing CryptoKeyVersion, the CryptoKeyVersion must be a
* child of ImportCryptoKeyVersionRequest.parent, have been previously created
* via ImportCryptoKeyVersion, and be in DESTROYED or IMPORT_FAILED state. The
* key material and algorithm must match the previous CryptoKeyVersion exactly
* if the CryptoKeyVersion has ever contained key material.
*
* @var string
*/
public $cryptoKeyVersion;
/**
* Required. The name of the ImportJob that was used to wrap this key
* material.
*
* @var string
*/
public $importJob;
/**
* Optional. This field has the same meaning as wrapped_key. Prefer to use
* that field in new work. Either that field or this field (but not both) must
* be specified.
*
* @var string
*/
public $rsaAesWrappedKey;
/**
* Optional. The wrapped key material to import. Before wrapping, key material
* must be formatted. If importing symmetric key material, the expected key
* material format is plain bytes. If importing asymmetric key material, the
* expected key material format is PKCS#8-encoded DER (the PrivateKeyInfo
* structure from RFC 5208). When wrapping with import methods
* (RSA_OAEP_3072_SHA1_AES_256 or RSA_OAEP_4096_SHA1_AES_256 or
* RSA_OAEP_3072_SHA256_AES_256 or RSA_OAEP_4096_SHA256_AES_256), this field
* must contain the concatenation of: 1. An ephemeral AES-256 wrapping key
* wrapped with the public_key using RSAES-OAEP with SHA-1/SHA-256, MGF1 with
* SHA-1/SHA-256, and an empty label. 2. The formatted key to be imported,
* wrapped with the ephemeral AES-256 key using AES-KWP (RFC 5649). This
* format is the same as the format produced by PKCS#11 mechanism
* CKM_RSA_AES_KEY_WRAP. When wrapping with import methods
* (RSA_OAEP_3072_SHA256 or RSA_OAEP_4096_SHA256), this field must contain the
* formatted key to be imported, wrapped with the public_key using RSAES-OAEP
* with SHA-256, MGF1 with SHA-256, and an empty label.
*
* @var string
*/
public $wrappedKey;
/**
* Required. The algorithm of the key being imported. This does not need to
* match the version_template of the CryptoKey this version imports into.
*
* Accepted values: CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED,
* GOOGLE_SYMMETRIC_ENCRYPTION, AES_128_GCM, AES_256_GCM, AES_128_CBC,
* AES_256_CBC, AES_128_CTR, AES_256_CTR, RSA_SIGN_PSS_2048_SHA256,
* RSA_SIGN_PSS_3072_SHA256, RSA_SIGN_PSS_4096_SHA256,
* RSA_SIGN_PSS_4096_SHA512, RSA_SIGN_PKCS1_2048_SHA256,
* RSA_SIGN_PKCS1_3072_SHA256, RSA_SIGN_PKCS1_4096_SHA256,
* RSA_SIGN_PKCS1_4096_SHA512, RSA_SIGN_RAW_PKCS1_2048,
* RSA_SIGN_RAW_PKCS1_3072, RSA_SIGN_RAW_PKCS1_4096,
* RSA_DECRYPT_OAEP_2048_SHA256, RSA_DECRYPT_OAEP_3072_SHA256,
* RSA_DECRYPT_OAEP_4096_SHA256, RSA_DECRYPT_OAEP_4096_SHA512,
* RSA_DECRYPT_OAEP_2048_SHA1, RSA_DECRYPT_OAEP_3072_SHA1,
* RSA_DECRYPT_OAEP_4096_SHA1, EC_SIGN_P256_SHA256, EC_SIGN_P384_SHA384,
* EC_SIGN_SECP256K1_SHA256, EC_SIGN_ED25519, HMAC_SHA256, HMAC_SHA1,
* HMAC_SHA384, HMAC_SHA512, HMAC_SHA224, EXTERNAL_SYMMETRIC_ENCRYPTION,
* ML_KEM_768, ML_KEM_1024, KEM_XWING, PQ_SIGN_ML_DSA_44, PQ_SIGN_ML_DSA_65,
* PQ_SIGN_ML_DSA_87, PQ_SIGN_SLH_DSA_SHA2_128S,
* PQ_SIGN_HASH_SLH_DSA_SHA2_128S_SHA256, PQ_SIGN_ML_DSA_44_EXTERNAL_MU,
* PQ_SIGN_ML_DSA_65_EXTERNAL_MU, PQ_SIGN_ML_DSA_87_EXTERNAL_MU
*
* @param self::ALGORITHM_* $algorithm
*/
public function setAlgorithm($algorithm)
{
$this->algorithm = $algorithm;
}
/**
* @return self::ALGORITHM_*
*/
public function getAlgorithm()
{
return $this->algorithm;
}
/**
* Optional. The optional name of an existing CryptoKeyVersion to target for
* an import operation. If this field is not present, a new CryptoKeyVersion
* containing the supplied key material is created. If this field is present,
* the supplied key material is imported into the existing CryptoKeyVersion.
* To import into an existing CryptoKeyVersion, the CryptoKeyVersion must be a
* child of ImportCryptoKeyVersionRequest.parent, have been previously created
* via ImportCryptoKeyVersion, and be in DESTROYED or IMPORT_FAILED state. The
* key material and algorithm must match the previous CryptoKeyVersion exactly
* if the CryptoKeyVersion has ever contained key material.
*
* @param string $cryptoKeyVersion
*/
public function setCryptoKeyVersion($cryptoKeyVersion)
{
$this->cryptoKeyVersion = $cryptoKeyVersion;
}
/**
* @return string
*/
public function getCryptoKeyVersion()
{
return $this->cryptoKeyVersion;
}
/**
* Required. The name of the ImportJob that was used to wrap this key
* material.
*
* @param string $importJob
*/
public function setImportJob($importJob)
{
$this->importJob = $importJob;
}
/**
* @return string
*/
public function getImportJob()
{
return $this->importJob;
}
/**
* Optional. This field has the same meaning as wrapped_key. Prefer to use
* that field in new work. Either that field or this field (but not both) must
* be specified.
*
* @param string $rsaAesWrappedKey
*/
public function setRsaAesWrappedKey($rsaAesWrappedKey)
{
$this->rsaAesWrappedKey = $rsaAesWrappedKey;
}
/**
* @return string
*/
public function getRsaAesWrappedKey()
{
return $this->rsaAesWrappedKey;
}
/**
* Optional. The wrapped key material to import. Before wrapping, key material
* must be formatted. If importing symmetric key material, the expected key
* material format is plain bytes. If importing asymmetric key material, the
* expected key material format is PKCS#8-encoded DER (the PrivateKeyInfo
* structure from RFC 5208). When wrapping with import methods
* (RSA_OAEP_3072_SHA1_AES_256 or RSA_OAEP_4096_SHA1_AES_256 or
* RSA_OAEP_3072_SHA256_AES_256 or RSA_OAEP_4096_SHA256_AES_256), this field
* must contain the concatenation of: 1. An ephemeral AES-256 wrapping key
* wrapped with the public_key using RSAES-OAEP with SHA-1/SHA-256, MGF1 with
* SHA-1/SHA-256, and an empty label. 2. The formatted key to be imported,
* wrapped with the ephemeral AES-256 key using AES-KWP (RFC 5649). This
* format is the same as the format produced by PKCS#11 mechanism
* CKM_RSA_AES_KEY_WRAP. When wrapping with import methods
* (RSA_OAEP_3072_SHA256 or RSA_OAEP_4096_SHA256), this field must contain the
* formatted key to be imported, wrapped with the public_key using RSAES-OAEP
* with SHA-256, MGF1 with SHA-256, and an empty label.
*
* @param string $wrappedKey
*/
public function setWrappedKey($wrappedKey)
{
$this->wrappedKey = $wrappedKey;
}
/**
* @return string
*/
public function getWrappedKey()
{
return $this->wrappedKey;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ImportCryptoKeyVersionRequest::class, 'Google_Service_CloudKMS_ImportCryptoKeyVersionRequest');
@@ -0,0 +1,486 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class ImportJob extends \Google\Model
{
/**
* Not specified.
*/
public const IMPORT_METHOD_IMPORT_METHOD_UNSPECIFIED = 'IMPORT_METHOD_UNSPECIFIED';
/**
* This ImportMethod represents the CKM_RSA_AES_KEY_WRAP key wrapping scheme
* defined in the PKCS #11 standard. In summary, this involves wrapping the
* raw key with an ephemeral AES key, and wrapping the ephemeral AES key with
* a 3072 bit RSA key. For more details, see [RSA AES key wrap
* mechanism](http://docs.oasis-open.org/pkcs11/pkcs11-
* curr/v2.40/cos01/pkcs11-curr-v2.40-cos01.html#_Toc408226908).
*/
public const IMPORT_METHOD_RSA_OAEP_3072_SHA1_AES_256 = 'RSA_OAEP_3072_SHA1_AES_256';
/**
* This ImportMethod represents the CKM_RSA_AES_KEY_WRAP key wrapping scheme
* defined in the PKCS #11 standard. In summary, this involves wrapping the
* raw key with an ephemeral AES key, and wrapping the ephemeral AES key with
* a 4096 bit RSA key. For more details, see [RSA AES key wrap
* mechanism](http://docs.oasis-open.org/pkcs11/pkcs11-
* curr/v2.40/cos01/pkcs11-curr-v2.40-cos01.html#_Toc408226908).
*/
public const IMPORT_METHOD_RSA_OAEP_4096_SHA1_AES_256 = 'RSA_OAEP_4096_SHA1_AES_256';
/**
* This ImportMethod represents the CKM_RSA_AES_KEY_WRAP key wrapping scheme
* defined in the PKCS #11 standard. In summary, this involves wrapping the
* raw key with an ephemeral AES key, and wrapping the ephemeral AES key with
* a 3072 bit RSA key. For more details, see [RSA AES key wrap
* mechanism](http://docs.oasis-open.org/pkcs11/pkcs11-
* curr/v2.40/cos01/pkcs11-curr-v2.40-cos01.html#_Toc408226908).
*/
public const IMPORT_METHOD_RSA_OAEP_3072_SHA256_AES_256 = 'RSA_OAEP_3072_SHA256_AES_256';
/**
* This ImportMethod represents the CKM_RSA_AES_KEY_WRAP key wrapping scheme
* defined in the PKCS #11 standard. In summary, this involves wrapping the
* raw key with an ephemeral AES key, and wrapping the ephemeral AES key with
* a 4096 bit RSA key. For more details, see [RSA AES key wrap
* mechanism](http://docs.oasis-open.org/pkcs11/pkcs11-
* curr/v2.40/cos01/pkcs11-curr-v2.40-cos01.html#_Toc408226908).
*/
public const IMPORT_METHOD_RSA_OAEP_4096_SHA256_AES_256 = 'RSA_OAEP_4096_SHA256_AES_256';
/**
* This ImportMethod represents RSAES-OAEP with a 3072 bit RSA key. The key
* material to be imported is wrapped directly with the RSA key. Due to
* technical limitations of RSA wrapping, this method cannot be used to wrap
* RSA keys for import.
*/
public const IMPORT_METHOD_RSA_OAEP_3072_SHA256 = 'RSA_OAEP_3072_SHA256';
/**
* This ImportMethod represents RSAES-OAEP with a 4096 bit RSA key. The key
* material to be imported is wrapped directly with the RSA key. Due to
* technical limitations of RSA wrapping, this method cannot be used to wrap
* RSA keys for import.
*/
public const IMPORT_METHOD_RSA_OAEP_4096_SHA256 = 'RSA_OAEP_4096_SHA256';
/**
* Represents the Hybrid Public Key Encryption (HPKE) Scheme originally
* defined in [RFC 9180](https://www.rfc-editor.org/rfc/rfc9180). It involves
* wrapping the raw key with an ephemeral AES key, derived with HKDF-SHA256
* from an encryption context, that is, in turn obtained from the receivers
* public key with the help of the ML-KEM-768 KEM. For more details, see the
* [ML-KEM HPKE standard](http://datatracker.ietf.org/doc/draft-ietf-hpke-
* pq/01/).
*/
public const IMPORT_METHOD_HPKE_KEM_ML_KEM_768_HKDF_SHA256_AES_256_GCM = 'HPKE_KEM_ML_KEM_768_HKDF_SHA256_AES_256_GCM';
/**
* Represents the Hybrid Public Key Encryption (HPKE) Scheme originally
* defined in [RFC 9180](https://www.rfc-editor.org/rfc/rfc9180). It involves
* wrapping the raw key with an ephemeral AES key, derived with HKDF-SHA256
* from an encryption context, that is, in turn obtained from the receivers
* public key with the help of the ML-KEM-1024 KEM. For more details, see the
* [ML-KEM HPKE standard](http://datatracker.ietf.org/doc/draft-ietf-hpke-
* pq/01/).
*/
public const IMPORT_METHOD_HPKE_KEM_ML_KEM_1024_HKDF_SHA256_AES_256_GCM = 'HPKE_KEM_ML_KEM_1024_HKDF_SHA256_AES_256_GCM';
/**
* Represents the Hybrid Public Key Encryption (HPKE) Scheme originally
* defined in [RFC 9180](https://www.rfc-editor.org/rfc/rfc9180). It involves
* wrapping the raw key with an ephemeral AES key, derived with HKDF-SHA256
* from an encryption context, that is, in turn obtained from the receivers
* public key with the help of the X-Wing hybrid KEM. For more details, see
* the [X-Wing standard](http://datatracker.ietf.org/doc/draft-connolly-cfrg-
* xwing-kem/09/).
*/
public const IMPORT_METHOD_HPKE_KEM_XWING_HKDF_SHA256_AES_256_GCM = 'HPKE_KEM_XWING_HKDF_SHA256_AES_256_GCM';
/**
* Not specified.
*/
public const PROTECTION_LEVEL_PROTECTION_LEVEL_UNSPECIFIED = 'PROTECTION_LEVEL_UNSPECIFIED';
/**
* Crypto operations are performed in software.
*/
public const PROTECTION_LEVEL_SOFTWARE = 'SOFTWARE';
/**
* Crypto operations are performed in a Hardware Security Module.
*/
public const PROTECTION_LEVEL_HSM = 'HSM';
/**
* Crypto operations are performed by an external key manager.
*/
public const PROTECTION_LEVEL_EXTERNAL = 'EXTERNAL';
/**
* Crypto operations are performed in an EKM-over-VPC backend.
*/
public const PROTECTION_LEVEL_EXTERNAL_VPC = 'EXTERNAL_VPC';
/**
* Crypto operations are performed in a single-tenant HSM.
*/
public const PROTECTION_LEVEL_HSM_SINGLE_TENANT = 'HSM_SINGLE_TENANT';
/**
* If the public_key_format field is not specified: - For PQC algorithms, an
* error will be returned. - For non-PQC algorithms, the default format is
* PEM, and the field pem will be populated. Otherwise, the public key will be
* exported through the public_key field in the requested format.
*/
public const PUBLIC_KEY_FORMAT_PUBLIC_KEY_FORMAT_UNSPECIFIED = 'PUBLIC_KEY_FORMAT_UNSPECIFIED';
/**
* The returned public key will be encoded in PEM format. See the
* [RFC7468](https://tools.ietf.org/html/rfc7468) sections for [General
* Considerations](https://tools.ietf.org/html/rfc7468#section-2) and [Textual
* Encoding of Subject Public Key Info]
* (https://tools.ietf.org/html/rfc7468#section-13) for more information.
*/
public const PUBLIC_KEY_FORMAT_PEM = 'PEM';
/**
* The returned public key will be encoded in DER format (the PrivateKeyInfo
* structure from RFC 5208).
*/
public const PUBLIC_KEY_FORMAT_DER = 'DER';
/**
* This is supported only for PQC algorithms. The key material is returned in
* the format defined by NIST PQC standards (FIPS 203, FIPS 204, and FIPS
* 205).
*/
public const PUBLIC_KEY_FORMAT_NIST_PQC = 'NIST_PQC';
/**
* The returned public key is in raw bytes format defined in its standard
* https://datatracker.ietf.org/doc/draft-connolly-cfrg-xwing-kem.
*/
public const PUBLIC_KEY_FORMAT_XWING_RAW_BYTES = 'XWING_RAW_BYTES';
/**
* Not specified.
*/
public const STATE_IMPORT_JOB_STATE_UNSPECIFIED = 'IMPORT_JOB_STATE_UNSPECIFIED';
/**
* The wrapping key for this job is still being generated. It may not be used.
* Cloud KMS will automatically mark this job as ACTIVE as soon as the
* wrapping key is generated.
*/
public const STATE_PENDING_GENERATION = 'PENDING_GENERATION';
/**
* This job may be used in CreateCryptoKey and CreateCryptoKeyVersion
* requests.
*/
public const STATE_ACTIVE = 'ACTIVE';
/**
* This job can no longer be used and may not leave this state once entered.
*/
public const STATE_EXPIRED = 'EXPIRED';
protected $attestationType = KeyOperationAttestation::class;
protected $attestationDataType = '';
/**
* Output only. The time at which this ImportJob was created.
*
* @var string
*/
public $createTime;
/**
* Immutable. The resource name of the backend environment where the key
* material for the wrapping key resides and where all related cryptographic
* operations are performed. Currently, this field is only populated for keys
* stored in HSM_SINGLE_TENANT. Note, this list is non-exhaustive and may
* apply to additional ProtectionLevels in the future. Supported resources: *
* `"projects/locations/singleTenantHsmInstances"`
*
* @var string
*/
public $cryptoKeyBackend;
/**
* Output only. The time this ImportJob expired. Only present if state is
* EXPIRED.
*
* @var string
*/
public $expireEventTime;
/**
* Output only. The time at which this ImportJob is scheduled for expiration
* and can no longer be used to import key material.
*
* @var string
*/
public $expireTime;
/**
* Output only. The time this ImportJob's key material was generated.
*
* @var string
*/
public $generateTime;
/**
* Required. Immutable. The wrapping method to be used for incoming key
* material.
*
* @var string
*/
public $importMethod;
/**
* Output only. The resource name for this ImportJob in the format
* `projects/locations/keyRings/importJobs`.
*
* @var string
*/
public $name;
/**
* Required. Immutable. The protection level of the ImportJob. This must match
* the protection_level of the version_template on the CryptoKey you attempt
* to import into.
*
* @var string
*/
public $protectionLevel;
protected $publicKeyType = WrappingPublicKey::class;
protected $publicKeyDataType = '';
/**
* Output only. Specifies the WrappingPublicKey format provided by the
* customer in the KeyManagementService.GetImportJob request.
*
* @var string
*/
public $publicKeyFormat;
/**
* Output only. The current state of the ImportJob, indicating if it can be
* used.
*
* @var string
*/
public $state;
/**
* Output only. Statement that was generated and signed by the key creator
* (for example, an HSM) at key creation time. Use this statement to verify
* attributes of the key as stored on the HSM, independently of Google. Only
* present if the chosen ImportMethod is one with a protection level of HSM.
*
* @param KeyOperationAttestation $attestation
*/
public function setAttestation(KeyOperationAttestation $attestation)
{
$this->attestation = $attestation;
}
/**
* @return KeyOperationAttestation
*/
public function getAttestation()
{
return $this->attestation;
}
/**
* Output only. The time at which this ImportJob was created.
*
* @param string $createTime
*/
public function setCreateTime($createTime)
{
$this->createTime = $createTime;
}
/**
* @return string
*/
public function getCreateTime()
{
return $this->createTime;
}
/**
* Immutable. The resource name of the backend environment where the key
* material for the wrapping key resides and where all related cryptographic
* operations are performed. Currently, this field is only populated for keys
* stored in HSM_SINGLE_TENANT. Note, this list is non-exhaustive and may
* apply to additional ProtectionLevels in the future. Supported resources: *
* `"projects/locations/singleTenantHsmInstances"`
*
* @param string $cryptoKeyBackend
*/
public function setCryptoKeyBackend($cryptoKeyBackend)
{
$this->cryptoKeyBackend = $cryptoKeyBackend;
}
/**
* @return string
*/
public function getCryptoKeyBackend()
{
return $this->cryptoKeyBackend;
}
/**
* Output only. The time this ImportJob expired. Only present if state is
* EXPIRED.
*
* @param string $expireEventTime
*/
public function setExpireEventTime($expireEventTime)
{
$this->expireEventTime = $expireEventTime;
}
/**
* @return string
*/
public function getExpireEventTime()
{
return $this->expireEventTime;
}
/**
* Output only. The time at which this ImportJob is scheduled for expiration
* and can no longer be used to import key material.
*
* @param string $expireTime
*/
public function setExpireTime($expireTime)
{
$this->expireTime = $expireTime;
}
/**
* @return string
*/
public function getExpireTime()
{
return $this->expireTime;
}
/**
* Output only. The time this ImportJob's key material was generated.
*
* @param string $generateTime
*/
public function setGenerateTime($generateTime)
{
$this->generateTime = $generateTime;
}
/**
* @return string
*/
public function getGenerateTime()
{
return $this->generateTime;
}
/**
* Required. Immutable. The wrapping method to be used for incoming key
* material.
*
* Accepted values: IMPORT_METHOD_UNSPECIFIED, RSA_OAEP_3072_SHA1_AES_256,
* RSA_OAEP_4096_SHA1_AES_256, RSA_OAEP_3072_SHA256_AES_256,
* RSA_OAEP_4096_SHA256_AES_256, RSA_OAEP_3072_SHA256, RSA_OAEP_4096_SHA256,
* HPKE_KEM_ML_KEM_768_HKDF_SHA256_AES_256_GCM,
* HPKE_KEM_ML_KEM_1024_HKDF_SHA256_AES_256_GCM,
* HPKE_KEM_XWING_HKDF_SHA256_AES_256_GCM
*
* @param self::IMPORT_METHOD_* $importMethod
*/
public function setImportMethod($importMethod)
{
$this->importMethod = $importMethod;
}
/**
* @return self::IMPORT_METHOD_*
*/
public function getImportMethod()
{
return $this->importMethod;
}
/**
* Output only. The resource name for this ImportJob in the format
* `projects/locations/keyRings/importJobs`.
*
* @param string $name
*/
public function setName($name)
{
$this->name = $name;
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* Required. Immutable. The protection level of the ImportJob. This must match
* the protection_level of the version_template on the CryptoKey you attempt
* to import into.
*
* Accepted values: PROTECTION_LEVEL_UNSPECIFIED, SOFTWARE, HSM, EXTERNAL,
* EXTERNAL_VPC, HSM_SINGLE_TENANT
*
* @param self::PROTECTION_LEVEL_* $protectionLevel
*/
public function setProtectionLevel($protectionLevel)
{
$this->protectionLevel = $protectionLevel;
}
/**
* @return self::PROTECTION_LEVEL_*
*/
public function getProtectionLevel()
{
return $this->protectionLevel;
}
/**
* Output only. The public key with which to wrap key material prior to
* import. Only returned if state is ACTIVE.
*
* @param WrappingPublicKey $publicKey
*/
public function setPublicKey(WrappingPublicKey $publicKey)
{
$this->publicKey = $publicKey;
}
/**
* @return WrappingPublicKey
*/
public function getPublicKey()
{
return $this->publicKey;
}
/**
* Output only. Specifies the WrappingPublicKey format provided by the
* customer in the KeyManagementService.GetImportJob request.
*
* Accepted values: PUBLIC_KEY_FORMAT_UNSPECIFIED, PEM, DER, NIST_PQC,
* XWING_RAW_BYTES
*
* @param self::PUBLIC_KEY_FORMAT_* $publicKeyFormat
*/
public function setPublicKeyFormat($publicKeyFormat)
{
$this->publicKeyFormat = $publicKeyFormat;
}
/**
* @return self::PUBLIC_KEY_FORMAT_*
*/
public function getPublicKeyFormat()
{
return $this->publicKeyFormat;
}
/**
* Output only. The current state of the ImportJob, indicating if it can be
* used.
*
* Accepted values: IMPORT_JOB_STATE_UNSPECIFIED, PENDING_GENERATION, ACTIVE,
* EXPIRED
*
* @param self::STATE_* $state
*/
public function setState($state)
{
$this->state = $state;
}
/**
* @return self::STATE_*
*/
public function getState()
{
return $this->state;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ImportJob::class, 'Google_Service_CloudKMS_ImportJob');
@@ -0,0 +1,70 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class KeyAccessJustificationsEnrollmentConfig extends \Google\Model
{
/**
* Indicates whether the project has KAJ logging enabled.
*
* @var bool
*/
public $auditLogging;
/**
* Indicates whether the project is enrolled in KAJ policy enforcement.
*
* @var bool
*/
public $policyEnforcement;
/**
* Indicates whether the project has KAJ logging enabled.
*
* @param bool $auditLogging
*/
public function setAuditLogging($auditLogging)
{
$this->auditLogging = $auditLogging;
}
/**
* @return bool
*/
public function getAuditLogging()
{
return $this->auditLogging;
}
/**
* Indicates whether the project is enrolled in KAJ policy enforcement.
*
* @param bool $policyEnforcement
*/
public function setPolicyEnforcement($policyEnforcement)
{
$this->policyEnforcement = $policyEnforcement;
}
/**
* @return bool
*/
public function getPolicyEnforcement()
{
return $this->policyEnforcement;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(KeyAccessJustificationsEnrollmentConfig::class, 'Google_Service_CloudKMS_KeyAccessJustificationsEnrollmentConfig');
@@ -0,0 +1,55 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class KeyAccessJustificationsPolicy extends \Google\Collection
{
protected $collection_key = 'allowedAccessReasons';
/**
* The list of allowed reasons for access to a CryptoKey. Note that empty
* allowed_access_reasons has a different meaning depending on where this
* message appears. If this is under KeyAccessJustificationsPolicyConfig, it
* means allow-all. If this is under CryptoKey, it means deny-all.
*
* @var string[]
*/
public $allowedAccessReasons;
/**
* The list of allowed reasons for access to a CryptoKey. Note that empty
* allowed_access_reasons has a different meaning depending on where this
* message appears. If this is under KeyAccessJustificationsPolicyConfig, it
* means allow-all. If this is under CryptoKey, it means deny-all.
*
* @param string[] $allowedAccessReasons
*/
public function setAllowedAccessReasons($allowedAccessReasons)
{
$this->allowedAccessReasons = $allowedAccessReasons;
}
/**
* @return string[]
*/
public function getAllowedAccessReasons()
{
return $this->allowedAccessReasons;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(KeyAccessJustificationsPolicy::class, 'Google_Service_CloudKMS_KeyAccessJustificationsPolicy');
@@ -0,0 +1,105 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class KeyAccessJustificationsPolicyConfig extends \Google\Model
{
protected $defaultKeyAccessJustificationPolicyType = KeyAccessJustificationsPolicy::class;
protected $defaultKeyAccessJustificationPolicyDataType = '';
/**
* Output only. Indicates whether this parent resource is available to default
* policy feature. Please consult [the prerequisite of default policy
* feature](https://cloud.google.com/assured-workloads/key-access-
* justifications/docs/set-default-policy#before) for more details.
*
* @var bool
*/
public $defaultPolicyAvailable;
/**
* Identifier. Represents the resource name for this
* KeyAccessJustificationsPolicyConfig in the format of
* "{organizations|folders|projects}/kajPolicyConfig".
*
* @var string
*/
public $name;
/**
* Optional. Specifies the default key access justifications (KAJ) policy used
* when a CryptoKey is created in this folder. This is only used when a Key
* Access Justifications policy is not provided in the CreateCryptoKeyRequest.
* This overrides any default policies in its ancestry. If this field is
* unset, or is set but contains an empty allowed_access_reasons list, no
* default Key Access Justifications (KAJ) policy configuration is active. In
* this scenario, all newly created keys will default to an "allow-all"
* policy.
*
* @param KeyAccessJustificationsPolicy $defaultKeyAccessJustificationPolicy
*/
public function setDefaultKeyAccessJustificationPolicy(KeyAccessJustificationsPolicy $defaultKeyAccessJustificationPolicy)
{
$this->defaultKeyAccessJustificationPolicy = $defaultKeyAccessJustificationPolicy;
}
/**
* @return KeyAccessJustificationsPolicy
*/
public function getDefaultKeyAccessJustificationPolicy()
{
return $this->defaultKeyAccessJustificationPolicy;
}
/**
* Output only. Indicates whether this parent resource is available to default
* policy feature. Please consult [the prerequisite of default policy
* feature](https://cloud.google.com/assured-workloads/key-access-
* justifications/docs/set-default-policy#before) for more details.
*
* @param bool $defaultPolicyAvailable
*/
public function setDefaultPolicyAvailable($defaultPolicyAvailable)
{
$this->defaultPolicyAvailable = $defaultPolicyAvailable;
}
/**
* @return bool
*/
public function getDefaultPolicyAvailable()
{
return $this->defaultPolicyAvailable;
}
/**
* Identifier. Represents the resource name for this
* KeyAccessJustificationsPolicyConfig in the format of
* "{organizations|folders|projects}/kajPolicyConfig".
*
* @param string $name
*/
public function setName($name)
{
$this->name = $name;
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(KeyAccessJustificationsPolicyConfig::class, 'Google_Service_CloudKMS_KeyAccessJustificationsPolicyConfig');
@@ -0,0 +1,108 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class KeyHandle extends \Google\Model
{
/**
* Output only. Name of a CryptoKey that has been provisioned for Customer
* Managed Encryption Key (CMEK) use in the KeyHandle project and location for
* the requested resource type. The CryptoKey project will reflect the value
* configured in the AutokeyConfig on the resource project's ancestor folder
* at the time of the KeyHandle creation. If more than one ancestor folder has
* a configured AutokeyConfig, the nearest of these configurations is used.
*
* @var string
*/
public $kmsKey;
/**
* Identifier. Name of the KeyHandle resource, e.g.
* `projects/{PROJECT_ID}/locations/{LOCATION}/keyHandles/{KEY_HANDLE_ID}`.
*
* @var string
*/
public $name;
/**
* Required. Indicates the resource type that the resulting CryptoKey is meant
* to protect, e.g. `{SERVICE}.googleapis.com/{TYPE}`. See documentation for
* supported resource types.
*
* @var string
*/
public $resourceTypeSelector;
/**
* Output only. Name of a CryptoKey that has been provisioned for Customer
* Managed Encryption Key (CMEK) use in the KeyHandle project and location for
* the requested resource type. The CryptoKey project will reflect the value
* configured in the AutokeyConfig on the resource project's ancestor folder
* at the time of the KeyHandle creation. If more than one ancestor folder has
* a configured AutokeyConfig, the nearest of these configurations is used.
*
* @param string $kmsKey
*/
public function setKmsKey($kmsKey)
{
$this->kmsKey = $kmsKey;
}
/**
* @return string
*/
public function getKmsKey()
{
return $this->kmsKey;
}
/**
* Identifier. Name of the KeyHandle resource, e.g.
* `projects/{PROJECT_ID}/locations/{LOCATION}/keyHandles/{KEY_HANDLE_ID}`.
*
* @param string $name
*/
public function setName($name)
{
$this->name = $name;
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* Required. Indicates the resource type that the resulting CryptoKey is meant
* to protect, e.g. `{SERVICE}.googleapis.com/{TYPE}`. See documentation for
* supported resource types.
*
* @param string $resourceTypeSelector
*/
public function setResourceTypeSelector($resourceTypeSelector)
{
$this->resourceTypeSelector = $resourceTypeSelector;
}
/**
* @return string
*/
public function getResourceTypeSelector()
{
return $this->resourceTypeSelector;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(KeyHandle::class, 'Google_Service_CloudKMS_KeyHandle');
@@ -0,0 +1,109 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class KeyOperationAttestation extends \Google\Model
{
/**
* Not specified.
*/
public const FORMAT_ATTESTATION_FORMAT_UNSPECIFIED = 'ATTESTATION_FORMAT_UNSPECIFIED';
/**
* Cavium HSM attestation compressed with gzip. Note that this format is
* defined by Cavium and subject to change at any time. See
* https://www.marvell.com/products/security-solutions/nitrox-hs-
* adapters/software-key-attestation.html.
*/
public const FORMAT_CAVIUM_V1_COMPRESSED = 'CAVIUM_V1_COMPRESSED';
/**
* Cavium HSM attestation V2 compressed with gzip. This is a new format
* introduced in Cavium's version 3.2-08.
*/
public const FORMAT_CAVIUM_V2_COMPRESSED = 'CAVIUM_V2_COMPRESSED';
protected $certChainsType = CertificateChains::class;
protected $certChainsDataType = '';
/**
* Output only. The attestation data provided by the HSM when the key
* operation was performed.
*
* @var string
*/
public $content;
/**
* Output only. The format of the attestation data.
*
* @var string
*/
public $format;
/**
* Output only. The certificate chains needed to validate the attestation
*
* @param CertificateChains $certChains
*/
public function setCertChains(CertificateChains $certChains)
{
$this->certChains = $certChains;
}
/**
* @return CertificateChains
*/
public function getCertChains()
{
return $this->certChains;
}
/**
* Output only. The attestation data provided by the HSM when the key
* operation was performed.
*
* @param string $content
*/
public function setContent($content)
{
$this->content = $content;
}
/**
* @return string
*/
public function getContent()
{
return $this->content;
}
/**
* Output only. The format of the attestation data.
*
* Accepted values: ATTESTATION_FORMAT_UNSPECIFIED, CAVIUM_V1_COMPRESSED,
* CAVIUM_V2_COMPRESSED
*
* @param self::FORMAT_* $format
*/
public function setFormat($format)
{
$this->format = $format;
}
/**
* @return self::FORMAT_*
*/
public function getFormat()
{
return $this->format;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(KeyOperationAttestation::class, 'Google_Service_CloudKMS_KeyOperationAttestation');
@@ -0,0 +1,72 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class KeyRing extends \Google\Model
{
/**
* Output only. The time at which this KeyRing was created.
*
* @var string
*/
public $createTime;
/**
* Output only. The resource name for the KeyRing in the format
* `projects/locations/keyRings`.
*
* @var string
*/
public $name;
/**
* Output only. The time at which this KeyRing was created.
*
* @param string $createTime
*/
public function setCreateTime($createTime)
{
$this->createTime = $createTime;
}
/**
* @return string
*/
public function getCreateTime()
{
return $this->createTime;
}
/**
* Output only. The resource name for the KeyRing in the format
* `projects/locations/keyRings`.
*
* @param string $name
*/
public function setName($name)
{
$this->name = $name;
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(KeyRing::class, 'Google_Service_CloudKMS_KeyRing');
@@ -0,0 +1,95 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class ListCryptoKeyVersionsResponse extends \Google\Collection
{
protected $collection_key = 'cryptoKeyVersions';
protected $cryptoKeyVersionsType = CryptoKeyVersion::class;
protected $cryptoKeyVersionsDataType = 'array';
/**
* A token to retrieve next page of results. Pass this value in
* ListCryptoKeyVersionsRequest.page_token to retrieve the next page of
* results.
*
* @var string
*/
public $nextPageToken;
/**
* The total number of CryptoKeyVersions that matched the query. This field is
* not populated if ListCryptoKeyVersionsRequest.filter is applied.
*
* @var int
*/
public $totalSize;
/**
* The list of CryptoKeyVersions.
*
* @param CryptoKeyVersion[] $cryptoKeyVersions
*/
public function setCryptoKeyVersions($cryptoKeyVersions)
{
$this->cryptoKeyVersions = $cryptoKeyVersions;
}
/**
* @return CryptoKeyVersion[]
*/
public function getCryptoKeyVersions()
{
return $this->cryptoKeyVersions;
}
/**
* A token to retrieve next page of results. Pass this value in
* ListCryptoKeyVersionsRequest.page_token to retrieve the next page of
* results.
*
* @param string $nextPageToken
*/
public function setNextPageToken($nextPageToken)
{
$this->nextPageToken = $nextPageToken;
}
/**
* @return string
*/
public function getNextPageToken()
{
return $this->nextPageToken;
}
/**
* The total number of CryptoKeyVersions that matched the query. This field is
* not populated if ListCryptoKeyVersionsRequest.filter is applied.
*
* @param int $totalSize
*/
public function setTotalSize($totalSize)
{
$this->totalSize = $totalSize;
}
/**
* @return int
*/
public function getTotalSize()
{
return $this->totalSize;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ListCryptoKeyVersionsResponse::class, 'Google_Service_CloudKMS_ListCryptoKeyVersionsResponse');
@@ -0,0 +1,93 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class ListCryptoKeysResponse extends \Google\Collection
{
protected $collection_key = 'cryptoKeys';
protected $cryptoKeysType = CryptoKey::class;
protected $cryptoKeysDataType = 'array';
/**
* A token to retrieve next page of results. Pass this value in
* ListCryptoKeysRequest.page_token to retrieve the next page of results.
*
* @var string
*/
public $nextPageToken;
/**
* The total number of CryptoKeys that matched the query. This field is not
* populated if ListCryptoKeysRequest.filter is applied.
*
* @var int
*/
public $totalSize;
/**
* The list of CryptoKeys.
*
* @param CryptoKey[] $cryptoKeys
*/
public function setCryptoKeys($cryptoKeys)
{
$this->cryptoKeys = $cryptoKeys;
}
/**
* @return CryptoKey[]
*/
public function getCryptoKeys()
{
return $this->cryptoKeys;
}
/**
* A token to retrieve next page of results. Pass this value in
* ListCryptoKeysRequest.page_token to retrieve the next page of results.
*
* @param string $nextPageToken
*/
public function setNextPageToken($nextPageToken)
{
$this->nextPageToken = $nextPageToken;
}
/**
* @return string
*/
public function getNextPageToken()
{
return $this->nextPageToken;
}
/**
* The total number of CryptoKeys that matched the query. This field is not
* populated if ListCryptoKeysRequest.filter is applied.
*
* @param int $totalSize
*/
public function setTotalSize($totalSize)
{
$this->totalSize = $totalSize;
}
/**
* @return int
*/
public function getTotalSize()
{
return $this->totalSize;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ListCryptoKeysResponse::class, 'Google_Service_CloudKMS_ListCryptoKeysResponse');
@@ -0,0 +1,93 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class ListEkmConnectionsResponse extends \Google\Collection
{
protected $collection_key = 'ekmConnections';
protected $ekmConnectionsType = EkmConnection::class;
protected $ekmConnectionsDataType = 'array';
/**
* A token to retrieve next page of results. Pass this value in
* ListEkmConnectionsRequest.page_token to retrieve the next page of results.
*
* @var string
*/
public $nextPageToken;
/**
* The total number of EkmConnections that matched the query. This field is
* not populated if ListEkmConnectionsRequest.filter is applied.
*
* @var int
*/
public $totalSize;
/**
* The list of EkmConnections.
*
* @param EkmConnection[] $ekmConnections
*/
public function setEkmConnections($ekmConnections)
{
$this->ekmConnections = $ekmConnections;
}
/**
* @return EkmConnection[]
*/
public function getEkmConnections()
{
return $this->ekmConnections;
}
/**
* A token to retrieve next page of results. Pass this value in
* ListEkmConnectionsRequest.page_token to retrieve the next page of results.
*
* @param string $nextPageToken
*/
public function setNextPageToken($nextPageToken)
{
$this->nextPageToken = $nextPageToken;
}
/**
* @return string
*/
public function getNextPageToken()
{
return $this->nextPageToken;
}
/**
* The total number of EkmConnections that matched the query. This field is
* not populated if ListEkmConnectionsRequest.filter is applied.
*
* @param int $totalSize
*/
public function setTotalSize($totalSize)
{
$this->totalSize = $totalSize;
}
/**
* @return int
*/
public function getTotalSize()
{
return $this->totalSize;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ListEkmConnectionsResponse::class, 'Google_Service_CloudKMS_ListEkmConnectionsResponse');
@@ -0,0 +1,93 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class ListImportJobsResponse extends \Google\Collection
{
protected $collection_key = 'importJobs';
protected $importJobsType = ImportJob::class;
protected $importJobsDataType = 'array';
/**
* A token to retrieve next page of results. Pass this value in
* ListImportJobsRequest.page_token to retrieve the next page of results.
*
* @var string
*/
public $nextPageToken;
/**
* The total number of ImportJobs that matched the query. This field is not
* populated if ListImportJobsRequest.filter is applied.
*
* @var int
*/
public $totalSize;
/**
* The list of ImportJobs.
*
* @param ImportJob[] $importJobs
*/
public function setImportJobs($importJobs)
{
$this->importJobs = $importJobs;
}
/**
* @return ImportJob[]
*/
public function getImportJobs()
{
return $this->importJobs;
}
/**
* A token to retrieve next page of results. Pass this value in
* ListImportJobsRequest.page_token to retrieve the next page of results.
*
* @param string $nextPageToken
*/
public function setNextPageToken($nextPageToken)
{
$this->nextPageToken = $nextPageToken;
}
/**
* @return string
*/
public function getNextPageToken()
{
return $this->nextPageToken;
}
/**
* The total number of ImportJobs that matched the query. This field is not
* populated if ListImportJobsRequest.filter is applied.
*
* @param int $totalSize
*/
public function setTotalSize($totalSize)
{
$this->totalSize = $totalSize;
}
/**
* @return int
*/
public function getTotalSize()
{
return $this->totalSize;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ListImportJobsResponse::class, 'Google_Service_CloudKMS_ListImportJobsResponse');
@@ -0,0 +1,69 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class ListKeyHandlesResponse extends \Google\Collection
{
protected $collection_key = 'keyHandles';
protected $keyHandlesType = KeyHandle::class;
protected $keyHandlesDataType = 'array';
/**
* A token to retrieve next page of results. Pass this value in
* ListKeyHandlesRequest.page_token to retrieve the next page of results.
*
* @var string
*/
public $nextPageToken;
/**
* Resulting KeyHandles.
*
* @param KeyHandle[] $keyHandles
*/
public function setKeyHandles($keyHandles)
{
$this->keyHandles = $keyHandles;
}
/**
* @return KeyHandle[]
*/
public function getKeyHandles()
{
return $this->keyHandles;
}
/**
* A token to retrieve next page of results. Pass this value in
* ListKeyHandlesRequest.page_token to retrieve the next page of results.
*
* @param string $nextPageToken
*/
public function setNextPageToken($nextPageToken)
{
$this->nextPageToken = $nextPageToken;
}
/**
* @return string
*/
public function getNextPageToken()
{
return $this->nextPageToken;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ListKeyHandlesResponse::class, 'Google_Service_CloudKMS_ListKeyHandlesResponse');
@@ -0,0 +1,93 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class ListKeyRingsResponse extends \Google\Collection
{
protected $collection_key = 'keyRings';
protected $keyRingsType = KeyRing::class;
protected $keyRingsDataType = 'array';
/**
* A token to retrieve next page of results. Pass this value in
* ListKeyRingsRequest.page_token to retrieve the next page of results.
*
* @var string
*/
public $nextPageToken;
/**
* The total number of KeyRings that matched the query. This field is not
* populated if ListKeyRingsRequest.filter is applied.
*
* @var int
*/
public $totalSize;
/**
* The list of KeyRings.
*
* @param KeyRing[] $keyRings
*/
public function setKeyRings($keyRings)
{
$this->keyRings = $keyRings;
}
/**
* @return KeyRing[]
*/
public function getKeyRings()
{
return $this->keyRings;
}
/**
* A token to retrieve next page of results. Pass this value in
* ListKeyRingsRequest.page_token to retrieve the next page of results.
*
* @param string $nextPageToken
*/
public function setNextPageToken($nextPageToken)
{
$this->nextPageToken = $nextPageToken;
}
/**
* @return string
*/
public function getNextPageToken()
{
return $this->nextPageToken;
}
/**
* The total number of KeyRings that matched the query. This field is not
* populated if ListKeyRingsRequest.filter is applied.
*
* @param int $totalSize
*/
public function setTotalSize($totalSize)
{
$this->totalSize = $totalSize;
}
/**
* @return int
*/
public function getTotalSize()
{
return $this->totalSize;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ListKeyRingsResponse::class, 'Google_Service_CloudKMS_ListKeyRingsResponse');
@@ -0,0 +1,67 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class ListLocationsResponse extends \Google\Collection
{
protected $collection_key = 'locations';
protected $locationsType = Location::class;
protected $locationsDataType = 'array';
/**
* The standard List next-page token.
*
* @var string
*/
public $nextPageToken;
/**
* A list of locations that matches the specified filter in the request.
*
* @param Location[] $locations
*/
public function setLocations($locations)
{
$this->locations = $locations;
}
/**
* @return Location[]
*/
public function getLocations()
{
return $this->locations;
}
/**
* The standard List next-page token.
*
* @param string $nextPageToken
*/
public function setNextPageToken($nextPageToken)
{
$this->nextPageToken = $nextPageToken;
}
/**
* @return string
*/
public function getNextPageToken()
{
return $this->nextPageToken;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ListLocationsResponse::class, 'Google_Service_CloudKMS_ListLocationsResponse');
@@ -0,0 +1,93 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class ListRetiredResourcesResponse extends \Google\Collection
{
protected $collection_key = 'retiredResources';
/**
* A token to retrieve the next page of results. Pass this value in
* ListRetiredResourcesRequest.page_token to retrieve the next page of
* results.
*
* @var string
*/
public $nextPageToken;
protected $retiredResourcesType = RetiredResource::class;
protected $retiredResourcesDataType = 'array';
/**
* The total number of RetiredResources that matched the query.
*
* @var string
*/
public $totalSize;
/**
* A token to retrieve the next page of results. Pass this value in
* ListRetiredResourcesRequest.page_token to retrieve the next page of
* results.
*
* @param string $nextPageToken
*/
public function setNextPageToken($nextPageToken)
{
$this->nextPageToken = $nextPageToken;
}
/**
* @return string
*/
public function getNextPageToken()
{
return $this->nextPageToken;
}
/**
* The list of RetiredResources.
*
* @param RetiredResource[] $retiredResources
*/
public function setRetiredResources($retiredResources)
{
$this->retiredResources = $retiredResources;
}
/**
* @return RetiredResource[]
*/
public function getRetiredResources()
{
return $this->retiredResources;
}
/**
* The total number of RetiredResources that matched the query.
*
* @param string $totalSize
*/
public function setTotalSize($totalSize)
{
$this->totalSize = $totalSize;
}
/**
* @return string
*/
public function getTotalSize()
{
return $this->totalSize;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ListRetiredResourcesResponse::class, 'Google_Service_CloudKMS_ListRetiredResourcesResponse');
@@ -0,0 +1,97 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class ListSingleTenantHsmInstanceProposalsResponse extends \Google\Collection
{
protected $collection_key = 'singleTenantHsmInstanceProposals';
/**
* A token to retrieve next page of results. Pass this value in
* ListSingleTenantHsmInstanceProposalsRequest.page_token to retrieve the next
* page of results.
*
* @var string
*/
public $nextPageToken;
protected $singleTenantHsmInstanceProposalsType = SingleTenantHsmInstanceProposal::class;
protected $singleTenantHsmInstanceProposalsDataType = 'array';
/**
* The total number of SingleTenantHsmInstanceProposals that matched the
* query. This field is not populated if
* ListSingleTenantHsmInstanceProposalsRequest.filter is applied.
*
* @var int
*/
public $totalSize;
/**
* A token to retrieve next page of results. Pass this value in
* ListSingleTenantHsmInstanceProposalsRequest.page_token to retrieve the next
* page of results.
*
* @param string $nextPageToken
*/
public function setNextPageToken($nextPageToken)
{
$this->nextPageToken = $nextPageToken;
}
/**
* @return string
*/
public function getNextPageToken()
{
return $this->nextPageToken;
}
/**
* The list of SingleTenantHsmInstanceProposals.
*
* @param SingleTenantHsmInstanceProposal[] $singleTenantHsmInstanceProposals
*/
public function setSingleTenantHsmInstanceProposals($singleTenantHsmInstanceProposals)
{
$this->singleTenantHsmInstanceProposals = $singleTenantHsmInstanceProposals;
}
/**
* @return SingleTenantHsmInstanceProposal[]
*/
public function getSingleTenantHsmInstanceProposals()
{
return $this->singleTenantHsmInstanceProposals;
}
/**
* The total number of SingleTenantHsmInstanceProposals that matched the
* query. This field is not populated if
* ListSingleTenantHsmInstanceProposalsRequest.filter is applied.
*
* @param int $totalSize
*/
public function setTotalSize($totalSize)
{
$this->totalSize = $totalSize;
}
/**
* @return int
*/
public function getTotalSize()
{
return $this->totalSize;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ListSingleTenantHsmInstanceProposalsResponse::class, 'Google_Service_CloudKMS_ListSingleTenantHsmInstanceProposalsResponse');
@@ -0,0 +1,97 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class ListSingleTenantHsmInstancesResponse extends \Google\Collection
{
protected $collection_key = 'singleTenantHsmInstances';
/**
* A token to retrieve next page of results. Pass this value in
* ListSingleTenantHsmInstancesRequest.page_token to retrieve the next page of
* results.
*
* @var string
*/
public $nextPageToken;
protected $singleTenantHsmInstancesType = SingleTenantHsmInstance::class;
protected $singleTenantHsmInstancesDataType = 'array';
/**
* The total number of SingleTenantHsmInstances that matched the query. This
* field is not populated if ListSingleTenantHsmInstancesRequest.filter is
* applied.
*
* @var int
*/
public $totalSize;
/**
* A token to retrieve next page of results. Pass this value in
* ListSingleTenantHsmInstancesRequest.page_token to retrieve the next page of
* results.
*
* @param string $nextPageToken
*/
public function setNextPageToken($nextPageToken)
{
$this->nextPageToken = $nextPageToken;
}
/**
* @return string
*/
public function getNextPageToken()
{
return $this->nextPageToken;
}
/**
* The list of SingleTenantHsmInstances.
*
* @param SingleTenantHsmInstance[] $singleTenantHsmInstances
*/
public function setSingleTenantHsmInstances($singleTenantHsmInstances)
{
$this->singleTenantHsmInstances = $singleTenantHsmInstances;
}
/**
* @return SingleTenantHsmInstance[]
*/
public function getSingleTenantHsmInstances()
{
return $this->singleTenantHsmInstances;
}
/**
* The total number of SingleTenantHsmInstances that matched the query. This
* field is not populated if ListSingleTenantHsmInstancesRequest.filter is
* applied.
*
* @param int $totalSize
*/
public function setTotalSize($totalSize)
{
$this->totalSize = $totalSize;
}
/**
* @return int
*/
public function getTotalSize()
{
return $this->totalSize;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ListSingleTenantHsmInstancesResponse::class, 'Google_Service_CloudKMS_ListSingleTenantHsmInstancesResponse');
@@ -0,0 +1,144 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class Location extends \Google\Model
{
/**
* The friendly name for this location, typically a nearby city name. For
* example, "Tokyo".
*
* @var string
*/
public $displayName;
/**
* Cross-service attributes for the location. For example
* {"cloud.googleapis.com/region": "us-east1"}
*
* @var string[]
*/
public $labels;
/**
* The canonical id for this location. For example: `"us-east1"`.
*
* @var string
*/
public $locationId;
/**
* Service-specific metadata. For example the available capacity at the given
* location.
*
* @var array[]
*/
public $metadata;
/**
* Resource name for the location, which may vary between implementations. For
* example: `"projects/example-project/locations/us-east1"`
*
* @var string
*/
public $name;
/**
* The friendly name for this location, typically a nearby city name. For
* example, "Tokyo".
*
* @param string $displayName
*/
public function setDisplayName($displayName)
{
$this->displayName = $displayName;
}
/**
* @return string
*/
public function getDisplayName()
{
return $this->displayName;
}
/**
* Cross-service attributes for the location. For example
* {"cloud.googleapis.com/region": "us-east1"}
*
* @param string[] $labels
*/
public function setLabels($labels)
{
$this->labels = $labels;
}
/**
* @return string[]
*/
public function getLabels()
{
return $this->labels;
}
/**
* The canonical id for this location. For example: `"us-east1"`.
*
* @param string $locationId
*/
public function setLocationId($locationId)
{
$this->locationId = $locationId;
}
/**
* @return string
*/
public function getLocationId()
{
return $this->locationId;
}
/**
* Service-specific metadata. For example the available capacity at the given
* location.
*
* @param array[] $metadata
*/
public function setMetadata($metadata)
{
$this->metadata = $metadata;
}
/**
* @return array[]
*/
public function getMetadata()
{
return $this->metadata;
}
/**
* Resource name for the location, which may vary between implementations. For
* example: `"projects/example-project/locations/us-east1"`
*
* @param string $name
*/
public function setName($name)
{
$this->name = $name;
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Location::class, 'Google_Service_CloudKMS_Location');
@@ -0,0 +1,98 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class LocationMetadata extends \Google\Model
{
/**
* Indicates whether CryptoKeys with protection_level EXTERNAL can be created
* in this location.
*
* @var bool
*/
public $ekmAvailable;
/**
* Indicates whether CryptoKeys with protection_level HSM can be created in
* this location.
*
* @var bool
*/
public $hsmAvailable;
/**
* Indicates whether CryptoKeys with protection_level HSM_SINGLE_TENANT can be
* created in this location.
*
* @var bool
*/
public $hsmSingleTenantAvailable;
/**
* Indicates whether CryptoKeys with protection_level EXTERNAL can be created
* in this location.
*
* @param bool $ekmAvailable
*/
public function setEkmAvailable($ekmAvailable)
{
$this->ekmAvailable = $ekmAvailable;
}
/**
* @return bool
*/
public function getEkmAvailable()
{
return $this->ekmAvailable;
}
/**
* Indicates whether CryptoKeys with protection_level HSM can be created in
* this location.
*
* @param bool $hsmAvailable
*/
public function setHsmAvailable($hsmAvailable)
{
$this->hsmAvailable = $hsmAvailable;
}
/**
* @return bool
*/
public function getHsmAvailable()
{
return $this->hsmAvailable;
}
/**
* Indicates whether CryptoKeys with protection_level HSM_SINGLE_TENANT can be
* created in this location.
*
* @param bool $hsmSingleTenantAvailable
*/
public function setHsmSingleTenantAvailable($hsmSingleTenantAvailable)
{
$this->hsmSingleTenantAvailable = $hsmSingleTenantAvailable;
}
/**
* @return bool
*/
public function getHsmSingleTenantAvailable()
{
return $this->hsmSingleTenantAvailable;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(LocationMetadata::class, 'Google_Service_CloudKMS_LocationMetadata');
@@ -0,0 +1,92 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class MacSignRequest extends \Google\Model
{
/**
* Required. The data to sign. The MAC tag is computed over this data field
* based on the specific algorithm.
*
* @var string
*/
public $data;
/**
* Optional. An optional CRC32C checksum of the MacSignRequest.data. If
* specified, KeyManagementService will verify the integrity of the received
* MacSignRequest.data using this checksum. KeyManagementService will report
* an error if the checksum verification fails. If you receive a checksum
* error, your client should verify that CRC32C(MacSignRequest.data) is equal
* to MacSignRequest.data_crc32c, and if so, perform a limited number of
* retries. A persistent mismatch may indicate an issue in your computation of
* the CRC32C checksum. Note: This field is defined as int64 for reasons of
* compatibility across different languages. However, it is a non-negative
* integer, which will never exceed 2^32-1, and can be safely downconverted to
* uint32 in languages that support this type.
*
* @var string
*/
public $dataCrc32c;
/**
* Required. The data to sign. The MAC tag is computed over this data field
* based on the specific algorithm.
*
* @param string $data
*/
public function setData($data)
{
$this->data = $data;
}
/**
* @return string
*/
public function getData()
{
return $this->data;
}
/**
* Optional. An optional CRC32C checksum of the MacSignRequest.data. If
* specified, KeyManagementService will verify the integrity of the received
* MacSignRequest.data using this checksum. KeyManagementService will report
* an error if the checksum verification fails. If you receive a checksum
* error, your client should verify that CRC32C(MacSignRequest.data) is equal
* to MacSignRequest.data_crc32c, and if so, perform a limited number of
* retries. A persistent mismatch may indicate an issue in your computation of
* the CRC32C checksum. Note: This field is defined as int64 for reasons of
* compatibility across different languages. However, it is a non-negative
* integer, which will never exceed 2^32-1, and can be safely downconverted to
* uint32 in languages that support this type.
*
* @param string $dataCrc32c
*/
public function setDataCrc32c($dataCrc32c)
{
$this->dataCrc32c = $dataCrc32c;
}
/**
* @return string
*/
public function getDataCrc32c()
{
return $this->dataCrc32c;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(MacSignRequest::class, 'Google_Service_CloudKMS_MacSignRequest');
@@ -0,0 +1,195 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class MacSignResponse extends \Google\Model
{
/**
* Not specified.
*/
public const PROTECTION_LEVEL_PROTECTION_LEVEL_UNSPECIFIED = 'PROTECTION_LEVEL_UNSPECIFIED';
/**
* Crypto operations are performed in software.
*/
public const PROTECTION_LEVEL_SOFTWARE = 'SOFTWARE';
/**
* Crypto operations are performed in a Hardware Security Module.
*/
public const PROTECTION_LEVEL_HSM = 'HSM';
/**
* Crypto operations are performed by an external key manager.
*/
public const PROTECTION_LEVEL_EXTERNAL = 'EXTERNAL';
/**
* Crypto operations are performed in an EKM-over-VPC backend.
*/
public const PROTECTION_LEVEL_EXTERNAL_VPC = 'EXTERNAL_VPC';
/**
* Crypto operations are performed in a single-tenant HSM.
*/
public const PROTECTION_LEVEL_HSM_SINGLE_TENANT = 'HSM_SINGLE_TENANT';
/**
* The created signature.
*
* @var string
*/
public $mac;
/**
* Integrity verification field. A CRC32C checksum of the returned
* MacSignResponse.mac. An integrity check of MacSignResponse.mac can be
* performed by computing the CRC32C checksum of MacSignResponse.mac and
* comparing your results to this field. Discard the response in case of non-
* matching checksum values, and perform a limited number of retries. A
* persistent mismatch may indicate an issue in your computation of the CRC32C
* checksum. Note: This field is defined as int64 for reasons of compatibility
* across different languages. However, it is a non-negative integer, which
* will never exceed 2^32-1, and can be safely downconverted to uint32 in
* languages that support this type.
*
* @var string
*/
public $macCrc32c;
/**
* The resource name of the CryptoKeyVersion used for signing. Check this
* field to verify that the intended resource was used for signing.
*
* @var string
*/
public $name;
/**
* The ProtectionLevel of the CryptoKeyVersion used for signing.
*
* @var string
*/
public $protectionLevel;
/**
* Integrity verification field. A flag indicating whether
* MacSignRequest.data_crc32c was received by KeyManagementService and used
* for the integrity verification of the data. A false value of this field
* indicates either that MacSignRequest.data_crc32c was left unset or that it
* was not delivered to KeyManagementService. If you've set
* MacSignRequest.data_crc32c but this field is still false, discard the
* response and perform a limited number of retries.
*
* @var bool
*/
public $verifiedDataCrc32c;
/**
* The created signature.
*
* @param string $mac
*/
public function setMac($mac)
{
$this->mac = $mac;
}
/**
* @return string
*/
public function getMac()
{
return $this->mac;
}
/**
* Integrity verification field. A CRC32C checksum of the returned
* MacSignResponse.mac. An integrity check of MacSignResponse.mac can be
* performed by computing the CRC32C checksum of MacSignResponse.mac and
* comparing your results to this field. Discard the response in case of non-
* matching checksum values, and perform a limited number of retries. A
* persistent mismatch may indicate an issue in your computation of the CRC32C
* checksum. Note: This field is defined as int64 for reasons of compatibility
* across different languages. However, it is a non-negative integer, which
* will never exceed 2^32-1, and can be safely downconverted to uint32 in
* languages that support this type.
*
* @param string $macCrc32c
*/
public function setMacCrc32c($macCrc32c)
{
$this->macCrc32c = $macCrc32c;
}
/**
* @return string
*/
public function getMacCrc32c()
{
return $this->macCrc32c;
}
/**
* The resource name of the CryptoKeyVersion used for signing. Check this
* field to verify that the intended resource was used for signing.
*
* @param string $name
*/
public function setName($name)
{
$this->name = $name;
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* The ProtectionLevel of the CryptoKeyVersion used for signing.
*
* Accepted values: PROTECTION_LEVEL_UNSPECIFIED, SOFTWARE, HSM, EXTERNAL,
* EXTERNAL_VPC, HSM_SINGLE_TENANT
*
* @param self::PROTECTION_LEVEL_* $protectionLevel
*/
public function setProtectionLevel($protectionLevel)
{
$this->protectionLevel = $protectionLevel;
}
/**
* @return self::PROTECTION_LEVEL_*
*/
public function getProtectionLevel()
{
return $this->protectionLevel;
}
/**
* Integrity verification field. A flag indicating whether
* MacSignRequest.data_crc32c was received by KeyManagementService and used
* for the integrity verification of the data. A false value of this field
* indicates either that MacSignRequest.data_crc32c was left unset or that it
* was not delivered to KeyManagementService. If you've set
* MacSignRequest.data_crc32c but this field is still false, discard the
* response and perform a limited number of retries.
*
* @param bool $verifiedDataCrc32c
*/
public function setVerifiedDataCrc32c($verifiedDataCrc32c)
{
$this->verifiedDataCrc32c = $verifiedDataCrc32c;
}
/**
* @return bool
*/
public function getVerifiedDataCrc32c()
{
return $this->verifiedDataCrc32c;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(MacSignResponse::class, 'Google_Service_CloudKMS_MacSignResponse');
@@ -0,0 +1,156 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class MacVerifyRequest extends \Google\Model
{
/**
* Required. The data used previously as a MacSignRequest.data to generate the
* MAC tag.
*
* @var string
*/
public $data;
/**
* Optional. An optional CRC32C checksum of the MacVerifyRequest.data. If
* specified, KeyManagementService will verify the integrity of the received
* MacVerifyRequest.data using this checksum. KeyManagementService will report
* an error if the checksum verification fails. If you receive a checksum
* error, your client should verify that CRC32C(MacVerifyRequest.data) is
* equal to MacVerifyRequest.data_crc32c, and if so, perform a limited number
* of retries. A persistent mismatch may indicate an issue in your computation
* of the CRC32C checksum. Note: This field is defined as int64 for reasons of
* compatibility across different languages. However, it is a non-negative
* integer, which will never exceed 2^32-1, and can be safely downconverted to
* uint32 in languages that support this type.
*
* @var string
*/
public $dataCrc32c;
/**
* Required. The signature to verify.
*
* @var string
*/
public $mac;
/**
* Optional. An optional CRC32C checksum of the MacVerifyRequest.mac. If
* specified, KeyManagementService will verify the integrity of the received
* MacVerifyRequest.mac using this checksum. KeyManagementService will report
* an error if the checksum verification fails. If you receive a checksum
* error, your client should verify that CRC32C(MacVerifyRequest.mac) is equal
* to MacVerifyRequest.mac_crc32c, and if so, perform a limited number of
* retries. A persistent mismatch may indicate an issue in your computation of
* the CRC32C checksum. Note: This field is defined as int64 for reasons of
* compatibility across different languages. However, it is a non-negative
* integer, which will never exceed 2^32-1, and can be safely downconverted to
* uint32 in languages that support this type.
*
* @var string
*/
public $macCrc32c;
/**
* Required. The data used previously as a MacSignRequest.data to generate the
* MAC tag.
*
* @param string $data
*/
public function setData($data)
{
$this->data = $data;
}
/**
* @return string
*/
public function getData()
{
return $this->data;
}
/**
* Optional. An optional CRC32C checksum of the MacVerifyRequest.data. If
* specified, KeyManagementService will verify the integrity of the received
* MacVerifyRequest.data using this checksum. KeyManagementService will report
* an error if the checksum verification fails. If you receive a checksum
* error, your client should verify that CRC32C(MacVerifyRequest.data) is
* equal to MacVerifyRequest.data_crc32c, and if so, perform a limited number
* of retries. A persistent mismatch may indicate an issue in your computation
* of the CRC32C checksum. Note: This field is defined as int64 for reasons of
* compatibility across different languages. However, it is a non-negative
* integer, which will never exceed 2^32-1, and can be safely downconverted to
* uint32 in languages that support this type.
*
* @param string $dataCrc32c
*/
public function setDataCrc32c($dataCrc32c)
{
$this->dataCrc32c = $dataCrc32c;
}
/**
* @return string
*/
public function getDataCrc32c()
{
return $this->dataCrc32c;
}
/**
* Required. The signature to verify.
*
* @param string $mac
*/
public function setMac($mac)
{
$this->mac = $mac;
}
/**
* @return string
*/
public function getMac()
{
return $this->mac;
}
/**
* Optional. An optional CRC32C checksum of the MacVerifyRequest.mac. If
* specified, KeyManagementService will verify the integrity of the received
* MacVerifyRequest.mac using this checksum. KeyManagementService will report
* an error if the checksum verification fails. If you receive a checksum
* error, your client should verify that CRC32C(MacVerifyRequest.mac) is equal
* to MacVerifyRequest.mac_crc32c, and if so, perform a limited number of
* retries. A persistent mismatch may indicate an issue in your computation of
* the CRC32C checksum. Note: This field is defined as int64 for reasons of
* compatibility across different languages. However, it is a non-negative
* integer, which will never exceed 2^32-1, and can be safely downconverted to
* uint32 in languages that support this type.
*
* @param string $macCrc32c
*/
public function setMacCrc32c($macCrc32c)
{
$this->macCrc32c = $macCrc32c;
}
/**
* @return string
*/
public function getMacCrc32c()
{
return $this->macCrc32c;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(MacVerifyRequest::class, 'Google_Service_CloudKMS_MacVerifyRequest');
@@ -0,0 +1,219 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class MacVerifyResponse extends \Google\Model
{
/**
* Not specified.
*/
public const PROTECTION_LEVEL_PROTECTION_LEVEL_UNSPECIFIED = 'PROTECTION_LEVEL_UNSPECIFIED';
/**
* Crypto operations are performed in software.
*/
public const PROTECTION_LEVEL_SOFTWARE = 'SOFTWARE';
/**
* Crypto operations are performed in a Hardware Security Module.
*/
public const PROTECTION_LEVEL_HSM = 'HSM';
/**
* Crypto operations are performed by an external key manager.
*/
public const PROTECTION_LEVEL_EXTERNAL = 'EXTERNAL';
/**
* Crypto operations are performed in an EKM-over-VPC backend.
*/
public const PROTECTION_LEVEL_EXTERNAL_VPC = 'EXTERNAL_VPC';
/**
* Crypto operations are performed in a single-tenant HSM.
*/
public const PROTECTION_LEVEL_HSM_SINGLE_TENANT = 'HSM_SINGLE_TENANT';
/**
* The resource name of the CryptoKeyVersion used for verification. Check this
* field to verify that the intended resource was used for verification.
*
* @var string
*/
public $name;
/**
* The ProtectionLevel of the CryptoKeyVersion used for verification.
*
* @var string
*/
public $protectionLevel;
/**
* This field indicates whether or not the verification operation for
* MacVerifyRequest.mac over MacVerifyRequest.data was successful.
*
* @var bool
*/
public $success;
/**
* Integrity verification field. A flag indicating whether
* MacVerifyRequest.data_crc32c was received by KeyManagementService and used
* for the integrity verification of the data. A false value of this field
* indicates either that MacVerifyRequest.data_crc32c was left unset or that
* it was not delivered to KeyManagementService. If you've set
* MacVerifyRequest.data_crc32c but this field is still false, discard the
* response and perform a limited number of retries.
*
* @var bool
*/
public $verifiedDataCrc32c;
/**
* Integrity verification field. A flag indicating whether
* MacVerifyRequest.mac_crc32c was received by KeyManagementService and used
* for the integrity verification of the data. A false value of this field
* indicates either that MacVerifyRequest.mac_crc32c was left unset or that it
* was not delivered to KeyManagementService. If you've set
* MacVerifyRequest.mac_crc32c but this field is still false, discard the
* response and perform a limited number of retries.
*
* @var bool
*/
public $verifiedMacCrc32c;
/**
* Integrity verification field. This value is used for the integrity
* verification of [MacVerifyResponse.success]. If the value of this field
* contradicts the value of [MacVerifyResponse.success], discard the response
* and perform a limited number of retries.
*
* @var bool
*/
public $verifiedSuccessIntegrity;
/**
* The resource name of the CryptoKeyVersion used for verification. Check this
* field to verify that the intended resource was used for verification.
*
* @param string $name
*/
public function setName($name)
{
$this->name = $name;
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* The ProtectionLevel of the CryptoKeyVersion used for verification.
*
* Accepted values: PROTECTION_LEVEL_UNSPECIFIED, SOFTWARE, HSM, EXTERNAL,
* EXTERNAL_VPC, HSM_SINGLE_TENANT
*
* @param self::PROTECTION_LEVEL_* $protectionLevel
*/
public function setProtectionLevel($protectionLevel)
{
$this->protectionLevel = $protectionLevel;
}
/**
* @return self::PROTECTION_LEVEL_*
*/
public function getProtectionLevel()
{
return $this->protectionLevel;
}
/**
* This field indicates whether or not the verification operation for
* MacVerifyRequest.mac over MacVerifyRequest.data was successful.
*
* @param bool $success
*/
public function setSuccess($success)
{
$this->success = $success;
}
/**
* @return bool
*/
public function getSuccess()
{
return $this->success;
}
/**
* Integrity verification field. A flag indicating whether
* MacVerifyRequest.data_crc32c was received by KeyManagementService and used
* for the integrity verification of the data. A false value of this field
* indicates either that MacVerifyRequest.data_crc32c was left unset or that
* it was not delivered to KeyManagementService. If you've set
* MacVerifyRequest.data_crc32c but this field is still false, discard the
* response and perform a limited number of retries.
*
* @param bool $verifiedDataCrc32c
*/
public function setVerifiedDataCrc32c($verifiedDataCrc32c)
{
$this->verifiedDataCrc32c = $verifiedDataCrc32c;
}
/**
* @return bool
*/
public function getVerifiedDataCrc32c()
{
return $this->verifiedDataCrc32c;
}
/**
* Integrity verification field. A flag indicating whether
* MacVerifyRequest.mac_crc32c was received by KeyManagementService and used
* for the integrity verification of the data. A false value of this field
* indicates either that MacVerifyRequest.mac_crc32c was left unset or that it
* was not delivered to KeyManagementService. If you've set
* MacVerifyRequest.mac_crc32c but this field is still false, discard the
* response and perform a limited number of retries.
*
* @param bool $verifiedMacCrc32c
*/
public function setVerifiedMacCrc32c($verifiedMacCrc32c)
{
$this->verifiedMacCrc32c = $verifiedMacCrc32c;
}
/**
* @return bool
*/
public function getVerifiedMacCrc32c()
{
return $this->verifiedMacCrc32c;
}
/**
* Integrity verification field. This value is used for the integrity
* verification of [MacVerifyResponse.success]. If the value of this field
* contradicts the value of [MacVerifyResponse.success], discard the response
* and perform a limited number of retries.
*
* @param bool $verifiedSuccessIntegrity
*/
public function setVerifiedSuccessIntegrity($verifiedSuccessIntegrity)
{
$this->verifiedSuccessIntegrity = $verifiedSuccessIntegrity;
}
/**
* @return bool
*/
public function getVerifiedSuccessIntegrity()
{
return $this->verifiedSuccessIntegrity;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(MacVerifyResponse::class, 'Google_Service_CloudKMS_MacVerifyResponse');
@@ -0,0 +1,158 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class Operation extends \Google\Model
{
/**
* If the value is `false`, it means the operation is still in progress. If
* `true`, the operation is completed, and either `error` or `response` is
* available.
*
* @var bool
*/
public $done;
protected $errorType = Status::class;
protected $errorDataType = '';
/**
* Service-specific metadata associated with the operation. It typically
* contains progress information and common metadata such as create time. Some
* services might not provide such metadata. Any method that returns a long-
* running operation should document the metadata type, if any.
*
* @var array[]
*/
public $metadata;
/**
* The server-assigned name, which is only unique within the same service that
* originally returns it. If you use the default HTTP mapping, the `name`
* should be a resource name ending with `operations/{unique_id}`.
*
* @var string
*/
public $name;
/**
* The normal, successful response of the operation. If the original method
* returns no data on success, such as `Delete`, the response is
* `google.protobuf.Empty`. If the original method is standard
* `Get`/`Create`/`Update`, the response should be the resource. For other
* methods, the response should have the type `XxxResponse`, where `Xxx` is
* the original method name. For example, if the original method name is
* `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
*
* @var array[]
*/
public $response;
/**
* If the value is `false`, it means the operation is still in progress. If
* `true`, the operation is completed, and either `error` or `response` is
* available.
*
* @param bool $done
*/
public function setDone($done)
{
$this->done = $done;
}
/**
* @return bool
*/
public function getDone()
{
return $this->done;
}
/**
* The error result of the operation in case of failure or cancellation.
*
* @param Status $error
*/
public function setError(Status $error)
{
$this->error = $error;
}
/**
* @return Status
*/
public function getError()
{
return $this->error;
}
/**
* Service-specific metadata associated with the operation. It typically
* contains progress information and common metadata such as create time. Some
* services might not provide such metadata. Any method that returns a long-
* running operation should document the metadata type, if any.
*
* @param array[] $metadata
*/
public function setMetadata($metadata)
{
$this->metadata = $metadata;
}
/**
* @return array[]
*/
public function getMetadata()
{
return $this->metadata;
}
/**
* The server-assigned name, which is only unique within the same service that
* originally returns it. If you use the default HTTP mapping, the `name`
* should be a resource name ending with `operations/{unique_id}`.
*
* @param string $name
*/
public function setName($name)
{
$this->name = $name;
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* The normal, successful response of the operation. If the original method
* returns no data on success, such as `Delete`, the response is
* `google.protobuf.Empty`. If the original method is standard
* `Get`/`Create`/`Update`, the response should be the resource. For other
* methods, the response should have the type `XxxResponse`, where `Xxx` is
* the original method name. For example, if the original method name is
* `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
*
* @param array[] $response
*/
public function setResponse($response)
{
$this->response = $response;
}
/**
* @return array[]
*/
public function getResponse()
{
return $this->response;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Operation::class, 'Google_Service_CloudKMS_Operation');
+165
View File
@@ -0,0 +1,165 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class Policy extends \Google\Collection
{
protected $collection_key = 'bindings';
protected $auditConfigsType = AuditConfig::class;
protected $auditConfigsDataType = 'array';
protected $bindingsType = Binding::class;
protected $bindingsDataType = 'array';
/**
* `etag` is used for optimistic concurrency control as a way to help prevent
* simultaneous updates of a policy from overwriting each other. It is
* strongly suggested that systems make use of the `etag` in the read-modify-
* write cycle to perform policy updates in order to avoid race conditions: An
* `etag` is returned in the response to `getIamPolicy`, and systems are
* expected to put that etag in the request to `setIamPolicy` to ensure that
* their change will be applied to the same version of the policy.
* **Important:** If you use IAM Conditions, you must include the `etag` field
* whenever you call `setIamPolicy`. If you omit this field, then IAM allows
* you to overwrite a version `3` policy with a version `1` policy, and all of
* the conditions in the version `3` policy are lost.
*
* @var string
*/
public $etag;
/**
* Specifies the format of the policy. Valid values are `0`, `1`, and `3`.
* Requests that specify an invalid value are rejected. Any operation that
* affects conditional role bindings must specify version `3`. This
* requirement applies to the following operations: * Getting a policy that
* includes a conditional role binding * Adding a conditional role binding to
* a policy * Changing a conditional role binding in a policy * Removing any
* role binding, with or without a condition, from a policy that includes
* conditions **Important:** If you use IAM Conditions, you must include the
* `etag` field whenever you call `setIamPolicy`. If you omit this field, then
* IAM allows you to overwrite a version `3` policy with a version `1` policy,
* and all of the conditions in the version `3` policy are lost. If a policy
* does not include any conditions, operations on that policy may specify any
* valid version or leave the field unset. To learn which resources support
* conditions in their IAM policies, see the [IAM
* documentation](https://cloud.google.com/iam/help/conditions/resource-
* policies).
*
* @var int
*/
public $version;
/**
* Specifies cloud audit logging configuration for this policy.
*
* @param AuditConfig[] $auditConfigs
*/
public function setAuditConfigs($auditConfigs)
{
$this->auditConfigs = $auditConfigs;
}
/**
* @return AuditConfig[]
*/
public function getAuditConfigs()
{
return $this->auditConfigs;
}
/**
* Associates a list of `members`, or principals, with a `role`. Optionally,
* may specify a `condition` that determines how and when the `bindings` are
* applied. Each of the `bindings` must contain at least one principal. The
* `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of
* these principals can be Google groups. Each occurrence of a principal
* counts towards these limits. For example, if the `bindings` grant 50
* different roles to `user:alice@example.com`, and not to any other
* principal, then you can add another 1,450 principals to the `bindings` in
* the `Policy`.
*
* @param Binding[] $bindings
*/
public function setBindings($bindings)
{
$this->bindings = $bindings;
}
/**
* @return Binding[]
*/
public function getBindings()
{
return $this->bindings;
}
/**
* `etag` is used for optimistic concurrency control as a way to help prevent
* simultaneous updates of a policy from overwriting each other. It is
* strongly suggested that systems make use of the `etag` in the read-modify-
* write cycle to perform policy updates in order to avoid race conditions: An
* `etag` is returned in the response to `getIamPolicy`, and systems are
* expected to put that etag in the request to `setIamPolicy` to ensure that
* their change will be applied to the same version of the policy.
* **Important:** If you use IAM Conditions, you must include the `etag` field
* whenever you call `setIamPolicy`. If you omit this field, then IAM allows
* you to overwrite a version `3` policy with a version `1` policy, and all of
* the conditions in the version `3` policy are lost.
*
* @param string $etag
*/
public function setEtag($etag)
{
$this->etag = $etag;
}
/**
* @return string
*/
public function getEtag()
{
return $this->etag;
}
/**
* Specifies the format of the policy. Valid values are `0`, `1`, and `3`.
* Requests that specify an invalid value are rejected. Any operation that
* affects conditional role bindings must specify version `3`. This
* requirement applies to the following operations: * Getting a policy that
* includes a conditional role binding * Adding a conditional role binding to
* a policy * Changing a conditional role binding in a policy * Removing any
* role binding, with or without a condition, from a policy that includes
* conditions **Important:** If you use IAM Conditions, you must include the
* `etag` field whenever you call `setIamPolicy`. If you omit this field, then
* IAM allows you to overwrite a version `3` policy with a version `1` policy,
* and all of the conditions in the version `3` policy are lost. If a policy
* does not include any conditions, operations on that policy may specify any
* valid version or leave the field unset. To learn which resources support
* conditions in their IAM policies, see the [IAM
* documentation](https://cloud.google.com/iam/help/conditions/resource-
* policies).
*
* @param int $version
*/
public function setVersion($version)
{
$this->version = $version;
}
/**
* @return int
*/
public function getVersion()
{
return $this->version;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Policy::class, 'Google_Service_CloudKMS_Policy');
@@ -0,0 +1,494 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class PublicKey extends \Google\Model
{
/**
* Not specified.
*/
public const ALGORITHM_CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED = 'CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED';
/**
* Creates symmetric encryption keys.
*/
public const ALGORITHM_GOOGLE_SYMMETRIC_ENCRYPTION = 'GOOGLE_SYMMETRIC_ENCRYPTION';
/**
* AES-GCM (Galois Counter Mode) using 128-bit keys.
*/
public const ALGORITHM_AES_128_GCM = 'AES_128_GCM';
/**
* AES-GCM (Galois Counter Mode) using 256-bit keys.
*/
public const ALGORITHM_AES_256_GCM = 'AES_256_GCM';
/**
* AES-CBC (Cipher Block Chaining Mode) using 128-bit keys.
*/
public const ALGORITHM_AES_128_CBC = 'AES_128_CBC';
/**
* AES-CBC (Cipher Block Chaining Mode) using 256-bit keys.
*/
public const ALGORITHM_AES_256_CBC = 'AES_256_CBC';
/**
* AES-CTR (Counter Mode) using 128-bit keys.
*/
public const ALGORITHM_AES_128_CTR = 'AES_128_CTR';
/**
* AES-CTR (Counter Mode) using 256-bit keys.
*/
public const ALGORITHM_AES_256_CTR = 'AES_256_CTR';
/**
* RSASSA-PSS 2048 bit key with a SHA256 digest.
*/
public const ALGORITHM_RSA_SIGN_PSS_2048_SHA256 = 'RSA_SIGN_PSS_2048_SHA256';
/**
* RSASSA-PSS 3072 bit key with a SHA256 digest.
*/
public const ALGORITHM_RSA_SIGN_PSS_3072_SHA256 = 'RSA_SIGN_PSS_3072_SHA256';
/**
* RSASSA-PSS 4096 bit key with a SHA256 digest.
*/
public const ALGORITHM_RSA_SIGN_PSS_4096_SHA256 = 'RSA_SIGN_PSS_4096_SHA256';
/**
* RSASSA-PSS 4096 bit key with a SHA512 digest.
*/
public const ALGORITHM_RSA_SIGN_PSS_4096_SHA512 = 'RSA_SIGN_PSS_4096_SHA512';
/**
* RSASSA-PKCS1-v1_5 with a 2048 bit key and a SHA256 digest.
*/
public const ALGORITHM_RSA_SIGN_PKCS1_2048_SHA256 = 'RSA_SIGN_PKCS1_2048_SHA256';
/**
* RSASSA-PKCS1-v1_5 with a 3072 bit key and a SHA256 digest.
*/
public const ALGORITHM_RSA_SIGN_PKCS1_3072_SHA256 = 'RSA_SIGN_PKCS1_3072_SHA256';
/**
* RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA256 digest.
*/
public const ALGORITHM_RSA_SIGN_PKCS1_4096_SHA256 = 'RSA_SIGN_PKCS1_4096_SHA256';
/**
* RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA512 digest.
*/
public const ALGORITHM_RSA_SIGN_PKCS1_4096_SHA512 = 'RSA_SIGN_PKCS1_4096_SHA512';
/**
* RSASSA-PKCS1-v1_5 signing without encoding, with a 2048 bit key.
*/
public const ALGORITHM_RSA_SIGN_RAW_PKCS1_2048 = 'RSA_SIGN_RAW_PKCS1_2048';
/**
* RSASSA-PKCS1-v1_5 signing without encoding, with a 3072 bit key.
*/
public const ALGORITHM_RSA_SIGN_RAW_PKCS1_3072 = 'RSA_SIGN_RAW_PKCS1_3072';
/**
* RSASSA-PKCS1-v1_5 signing without encoding, with a 4096 bit key.
*/
public const ALGORITHM_RSA_SIGN_RAW_PKCS1_4096 = 'RSA_SIGN_RAW_PKCS1_4096';
/**
* RSAES-OAEP 2048 bit key with a SHA256 digest.
*/
public const ALGORITHM_RSA_DECRYPT_OAEP_2048_SHA256 = 'RSA_DECRYPT_OAEP_2048_SHA256';
/**
* RSAES-OAEP 3072 bit key with a SHA256 digest.
*/
public const ALGORITHM_RSA_DECRYPT_OAEP_3072_SHA256 = 'RSA_DECRYPT_OAEP_3072_SHA256';
/**
* RSAES-OAEP 4096 bit key with a SHA256 digest.
*/
public const ALGORITHM_RSA_DECRYPT_OAEP_4096_SHA256 = 'RSA_DECRYPT_OAEP_4096_SHA256';
/**
* RSAES-OAEP 4096 bit key with a SHA512 digest.
*/
public const ALGORITHM_RSA_DECRYPT_OAEP_4096_SHA512 = 'RSA_DECRYPT_OAEP_4096_SHA512';
/**
* RSAES-OAEP 2048 bit key with a SHA1 digest.
*/
public const ALGORITHM_RSA_DECRYPT_OAEP_2048_SHA1 = 'RSA_DECRYPT_OAEP_2048_SHA1';
/**
* RSAES-OAEP 3072 bit key with a SHA1 digest.
*/
public const ALGORITHM_RSA_DECRYPT_OAEP_3072_SHA1 = 'RSA_DECRYPT_OAEP_3072_SHA1';
/**
* RSAES-OAEP 4096 bit key with a SHA1 digest.
*/
public const ALGORITHM_RSA_DECRYPT_OAEP_4096_SHA1 = 'RSA_DECRYPT_OAEP_4096_SHA1';
/**
* ECDSA on the NIST P-256 curve with a SHA256 digest. Other hash functions
* can also be used: https://cloud.google.com/kms/docs/create-validate-
* signatures#ecdsa_support_for_other_hash_algorithms
*/
public const ALGORITHM_EC_SIGN_P256_SHA256 = 'EC_SIGN_P256_SHA256';
/**
* ECDSA on the NIST P-384 curve with a SHA384 digest. Other hash functions
* can also be used: https://cloud.google.com/kms/docs/create-validate-
* signatures#ecdsa_support_for_other_hash_algorithms
*/
public const ALGORITHM_EC_SIGN_P384_SHA384 = 'EC_SIGN_P384_SHA384';
/**
* ECDSA on the non-NIST secp256k1 curve. This curve is only supported for HSM
* protection level. Other hash functions can also be used:
* https://cloud.google.com/kms/docs/create-validate-
* signatures#ecdsa_support_for_other_hash_algorithms
*/
public const ALGORITHM_EC_SIGN_SECP256K1_SHA256 = 'EC_SIGN_SECP256K1_SHA256';
/**
* EdDSA on the Curve25519 in pure mode (taking data as input).
*/
public const ALGORITHM_EC_SIGN_ED25519 = 'EC_SIGN_ED25519';
/**
* HMAC-SHA256 signing with a 256 bit key.
*/
public const ALGORITHM_HMAC_SHA256 = 'HMAC_SHA256';
/**
* HMAC-SHA1 signing with a 160 bit key.
*/
public const ALGORITHM_HMAC_SHA1 = 'HMAC_SHA1';
/**
* HMAC-SHA384 signing with a 384 bit key.
*/
public const ALGORITHM_HMAC_SHA384 = 'HMAC_SHA384';
/**
* HMAC-SHA512 signing with a 512 bit key.
*/
public const ALGORITHM_HMAC_SHA512 = 'HMAC_SHA512';
/**
* HMAC-SHA224 signing with a 224 bit key.
*/
public const ALGORITHM_HMAC_SHA224 = 'HMAC_SHA224';
/**
* Algorithm representing symmetric encryption by an external key manager.
*/
public const ALGORITHM_EXTERNAL_SYMMETRIC_ENCRYPTION = 'EXTERNAL_SYMMETRIC_ENCRYPTION';
/**
* ML-KEM-768 (FIPS 203)
*/
public const ALGORITHM_ML_KEM_768 = 'ML_KEM_768';
/**
* ML-KEM-1024 (FIPS 203)
*/
public const ALGORITHM_ML_KEM_1024 = 'ML_KEM_1024';
/**
* X-Wing hybrid KEM combining ML-KEM-768 with X25519 following
* datatracker.ietf.org/doc/draft-connolly-cfrg-xwing-kem/.
*/
public const ALGORITHM_KEM_XWING = 'KEM_XWING';
/**
* The post-quantum Module-Lattice-Based Digital Signature Algorithm, at
* security level 1. Randomized version.
*/
public const ALGORITHM_PQ_SIGN_ML_DSA_44 = 'PQ_SIGN_ML_DSA_44';
/**
* The post-quantum Module-Lattice-Based Digital Signature Algorithm, at
* security level 3. Randomized version.
*/
public const ALGORITHM_PQ_SIGN_ML_DSA_65 = 'PQ_SIGN_ML_DSA_65';
/**
* The post-quantum Module-Lattice-Based Digital Signature Algorithm, at
* security level 5. Randomized version.
*/
public const ALGORITHM_PQ_SIGN_ML_DSA_87 = 'PQ_SIGN_ML_DSA_87';
/**
* The post-quantum stateless hash-based digital signature algorithm, at
* security level 1. Randomized version.
*/
public const ALGORITHM_PQ_SIGN_SLH_DSA_SHA2_128S = 'PQ_SIGN_SLH_DSA_SHA2_128S';
/**
* The post-quantum stateless hash-based digital signature algorithm, at
* security level 1. Randomized pre-hash version supporting SHA256 digests.
*/
public const ALGORITHM_PQ_SIGN_HASH_SLH_DSA_SHA2_128S_SHA256 = 'PQ_SIGN_HASH_SLH_DSA_SHA2_128S_SHA256';
/**
* The post-quantum Module-Lattice-Based Digital Signature Algorithm, at
* security level 1. Randomized version supporting externally-computed message
* representatives.
*/
public const ALGORITHM_PQ_SIGN_ML_DSA_44_EXTERNAL_MU = 'PQ_SIGN_ML_DSA_44_EXTERNAL_MU';
/**
* The post-quantum Module-Lattice-Based Digital Signature Algorithm, at
* security level 3. Randomized version supporting externally-computed message
* representatives.
*/
public const ALGORITHM_PQ_SIGN_ML_DSA_65_EXTERNAL_MU = 'PQ_SIGN_ML_DSA_65_EXTERNAL_MU';
/**
* The post-quantum Module-Lattice-Based Digital Signature Algorithm, at
* security level 5. Randomized version supporting externally-computed message
* representatives.
*/
public const ALGORITHM_PQ_SIGN_ML_DSA_87_EXTERNAL_MU = 'PQ_SIGN_ML_DSA_87_EXTERNAL_MU';
/**
* Not specified.
*/
public const PROTECTION_LEVEL_PROTECTION_LEVEL_UNSPECIFIED = 'PROTECTION_LEVEL_UNSPECIFIED';
/**
* Crypto operations are performed in software.
*/
public const PROTECTION_LEVEL_SOFTWARE = 'SOFTWARE';
/**
* Crypto operations are performed in a Hardware Security Module.
*/
public const PROTECTION_LEVEL_HSM = 'HSM';
/**
* Crypto operations are performed by an external key manager.
*/
public const PROTECTION_LEVEL_EXTERNAL = 'EXTERNAL';
/**
* Crypto operations are performed in an EKM-over-VPC backend.
*/
public const PROTECTION_LEVEL_EXTERNAL_VPC = 'EXTERNAL_VPC';
/**
* Crypto operations are performed in a single-tenant HSM.
*/
public const PROTECTION_LEVEL_HSM_SINGLE_TENANT = 'HSM_SINGLE_TENANT';
/**
* If the public_key_format field is not specified: - For PQC algorithms, an
* error will be returned. - For non-PQC algorithms, the default format is
* PEM, and the field pem will be populated. Otherwise, the public key will be
* exported through the public_key field in the requested format.
*/
public const PUBLIC_KEY_FORMAT_PUBLIC_KEY_FORMAT_UNSPECIFIED = 'PUBLIC_KEY_FORMAT_UNSPECIFIED';
/**
* The returned public key will be encoded in PEM format. See the
* [RFC7468](https://tools.ietf.org/html/rfc7468) sections for [General
* Considerations](https://tools.ietf.org/html/rfc7468#section-2) and [Textual
* Encoding of Subject Public Key Info]
* (https://tools.ietf.org/html/rfc7468#section-13) for more information.
*/
public const PUBLIC_KEY_FORMAT_PEM = 'PEM';
/**
* The returned public key will be encoded in DER format (the PrivateKeyInfo
* structure from RFC 5208).
*/
public const PUBLIC_KEY_FORMAT_DER = 'DER';
/**
* This is supported only for PQC algorithms. The key material is returned in
* the format defined by NIST PQC standards (FIPS 203, FIPS 204, and FIPS
* 205).
*/
public const PUBLIC_KEY_FORMAT_NIST_PQC = 'NIST_PQC';
/**
* The returned public key is in raw bytes format defined in its standard
* https://datatracker.ietf.org/doc/draft-connolly-cfrg-xwing-kem.
*/
public const PUBLIC_KEY_FORMAT_XWING_RAW_BYTES = 'XWING_RAW_BYTES';
/**
* The Algorithm associated with this key.
*
* @var string
*/
public $algorithm;
/**
* The name of the CryptoKeyVersion public key. Provided here for
* verification. NOTE: This field is in Beta.
*
* @var string
*/
public $name;
/**
* The public key, encoded in PEM format. For more information, see the [RFC
* 7468](https://tools.ietf.org/html/rfc7468) sections for [General
* Considerations](https://tools.ietf.org/html/rfc7468#section-2) and [Textual
* Encoding of Subject Public Key Info]
* (https://tools.ietf.org/html/rfc7468#section-13).
*
* @var string
*/
public $pem;
/**
* Integrity verification field. A CRC32C checksum of the returned
* PublicKey.pem. An integrity check of PublicKey.pem can be performed by
* computing the CRC32C checksum of PublicKey.pem and comparing your results
* to this field. Discard the response in case of non-matching checksum
* values, and perform a limited number of retries. A persistent mismatch may
* indicate an issue in your computation of the CRC32C checksum. Note: This
* field is defined as int64 for reasons of compatibility across different
* languages. However, it is a non-negative integer, which will never exceed
* `2^32-1`, and can be safely downconverted to uint32 in languages that
* support this type. NOTE: This field is in Beta.
*
* @var string
*/
public $pemCrc32c;
/**
* The ProtectionLevel of the CryptoKeyVersion public key.
*
* @var string
*/
public $protectionLevel;
protected $publicKeyType = ChecksummedData::class;
protected $publicKeyDataType = '';
/**
* The PublicKey format specified by the customer through the
* public_key_format field.
*
* @var string
*/
public $publicKeyFormat;
/**
* The Algorithm associated with this key.
*
* Accepted values: CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED,
* GOOGLE_SYMMETRIC_ENCRYPTION, AES_128_GCM, AES_256_GCM, AES_128_CBC,
* AES_256_CBC, AES_128_CTR, AES_256_CTR, RSA_SIGN_PSS_2048_SHA256,
* RSA_SIGN_PSS_3072_SHA256, RSA_SIGN_PSS_4096_SHA256,
* RSA_SIGN_PSS_4096_SHA512, RSA_SIGN_PKCS1_2048_SHA256,
* RSA_SIGN_PKCS1_3072_SHA256, RSA_SIGN_PKCS1_4096_SHA256,
* RSA_SIGN_PKCS1_4096_SHA512, RSA_SIGN_RAW_PKCS1_2048,
* RSA_SIGN_RAW_PKCS1_3072, RSA_SIGN_RAW_PKCS1_4096,
* RSA_DECRYPT_OAEP_2048_SHA256, RSA_DECRYPT_OAEP_3072_SHA256,
* RSA_DECRYPT_OAEP_4096_SHA256, RSA_DECRYPT_OAEP_4096_SHA512,
* RSA_DECRYPT_OAEP_2048_SHA1, RSA_DECRYPT_OAEP_3072_SHA1,
* RSA_DECRYPT_OAEP_4096_SHA1, EC_SIGN_P256_SHA256, EC_SIGN_P384_SHA384,
* EC_SIGN_SECP256K1_SHA256, EC_SIGN_ED25519, HMAC_SHA256, HMAC_SHA1,
* HMAC_SHA384, HMAC_SHA512, HMAC_SHA224, EXTERNAL_SYMMETRIC_ENCRYPTION,
* ML_KEM_768, ML_KEM_1024, KEM_XWING, PQ_SIGN_ML_DSA_44, PQ_SIGN_ML_DSA_65,
* PQ_SIGN_ML_DSA_87, PQ_SIGN_SLH_DSA_SHA2_128S,
* PQ_SIGN_HASH_SLH_DSA_SHA2_128S_SHA256, PQ_SIGN_ML_DSA_44_EXTERNAL_MU,
* PQ_SIGN_ML_DSA_65_EXTERNAL_MU, PQ_SIGN_ML_DSA_87_EXTERNAL_MU
*
* @param self::ALGORITHM_* $algorithm
*/
public function setAlgorithm($algorithm)
{
$this->algorithm = $algorithm;
}
/**
* @return self::ALGORITHM_*
*/
public function getAlgorithm()
{
return $this->algorithm;
}
/**
* The name of the CryptoKeyVersion public key. Provided here for
* verification. NOTE: This field is in Beta.
*
* @param string $name
*/
public function setName($name)
{
$this->name = $name;
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* The public key, encoded in PEM format. For more information, see the [RFC
* 7468](https://tools.ietf.org/html/rfc7468) sections for [General
* Considerations](https://tools.ietf.org/html/rfc7468#section-2) and [Textual
* Encoding of Subject Public Key Info]
* (https://tools.ietf.org/html/rfc7468#section-13).
*
* @param string $pem
*/
public function setPem($pem)
{
$this->pem = $pem;
}
/**
* @return string
*/
public function getPem()
{
return $this->pem;
}
/**
* Integrity verification field. A CRC32C checksum of the returned
* PublicKey.pem. An integrity check of PublicKey.pem can be performed by
* computing the CRC32C checksum of PublicKey.pem and comparing your results
* to this field. Discard the response in case of non-matching checksum
* values, and perform a limited number of retries. A persistent mismatch may
* indicate an issue in your computation of the CRC32C checksum. Note: This
* field is defined as int64 for reasons of compatibility across different
* languages. However, it is a non-negative integer, which will never exceed
* `2^32-1`, and can be safely downconverted to uint32 in languages that
* support this type. NOTE: This field is in Beta.
*
* @param string $pemCrc32c
*/
public function setPemCrc32c($pemCrc32c)
{
$this->pemCrc32c = $pemCrc32c;
}
/**
* @return string
*/
public function getPemCrc32c()
{
return $this->pemCrc32c;
}
/**
* The ProtectionLevel of the CryptoKeyVersion public key.
*
* Accepted values: PROTECTION_LEVEL_UNSPECIFIED, SOFTWARE, HSM, EXTERNAL,
* EXTERNAL_VPC, HSM_SINGLE_TENANT
*
* @param self::PROTECTION_LEVEL_* $protectionLevel
*/
public function setProtectionLevel($protectionLevel)
{
$this->protectionLevel = $protectionLevel;
}
/**
* @return self::PROTECTION_LEVEL_*
*/
public function getProtectionLevel()
{
return $this->protectionLevel;
}
/**
* This field contains the public key (with integrity verification), formatted
* according to the public_key_format field.
*
* @param ChecksummedData $publicKey
*/
public function setPublicKey(ChecksummedData $publicKey)
{
$this->publicKey = $publicKey;
}
/**
* @return ChecksummedData
*/
public function getPublicKey()
{
return $this->publicKey;
}
/**
* The PublicKey format specified by the customer through the
* public_key_format field.
*
* Accepted values: PUBLIC_KEY_FORMAT_UNSPECIFIED, PEM, DER, NIST_PQC,
* XWING_RAW_BYTES
*
* @param self::PUBLIC_KEY_FORMAT_* $publicKeyFormat
*/
public function setPublicKeyFormat($publicKeyFormat)
{
$this->publicKeyFormat = $publicKeyFormat;
}
/**
* @return self::PUBLIC_KEY_FORMAT_*
*/
public function getPublicKeyFormat()
{
return $this->publicKeyFormat;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(PublicKey::class, 'Google_Service_CloudKMS_PublicKey');
@@ -0,0 +1,103 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class QuorumAuth extends \Google\Collection
{
protected $collection_key = 'twoFactorPublicKeyPems';
/**
* Output only. The required numbers of approvers. The M value used for M of N
* quorum auth. Must be greater than or equal to 2 and less than or equal to
* total_approver_count - 1.
*
* @var int
*/
public $requiredApproverCount;
/**
* Required. The total number of approvers. This is the N value used for M of
* N quorum auth. Must be greater than or equal to 3 and less than or equal to
* 16.
*
* @var int
*/
public $totalApproverCount;
/**
* Output only. The public keys associated with the 2FA keys for M of N quorum
* auth.
*
* @var string[]
*/
public $twoFactorPublicKeyPems;
/**
* Output only. The required numbers of approvers. The M value used for M of N
* quorum auth. Must be greater than or equal to 2 and less than or equal to
* total_approver_count - 1.
*
* @param int $requiredApproverCount
*/
public function setRequiredApproverCount($requiredApproverCount)
{
$this->requiredApproverCount = $requiredApproverCount;
}
/**
* @return int
*/
public function getRequiredApproverCount()
{
return $this->requiredApproverCount;
}
/**
* Required. The total number of approvers. This is the N value used for M of
* N quorum auth. Must be greater than or equal to 3 and less than or equal to
* 16.
*
* @param int $totalApproverCount
*/
public function setTotalApproverCount($totalApproverCount)
{
$this->totalApproverCount = $totalApproverCount;
}
/**
* @return int
*/
public function getTotalApproverCount()
{
return $this->totalApproverCount;
}
/**
* Output only. The public keys associated with the 2FA keys for M of N quorum
* auth.
*
* @param string[] $twoFactorPublicKeyPems
*/
public function setTwoFactorPublicKeyPems($twoFactorPublicKeyPems)
{
$this->twoFactorPublicKeyPems = $twoFactorPublicKeyPems;
}
/**
* @return string[]
*/
public function getTwoFactorPublicKeyPems()
{
return $this->twoFactorPublicKeyPems;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(QuorumAuth::class, 'Google_Service_CloudKMS_QuorumAuth');
@@ -0,0 +1,94 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class QuorumParameters extends \Google\Collection
{
protected $collection_key = 'challenges';
/**
* Output only. The public keys associated with the 2FA keys that have already
* approved the SingleTenantHsmInstanceProposal by signing the challenge.
*
* @var string[]
*/
public $approvedTwoFactorPublicKeyPems;
protected $challengesType = Challenge::class;
protected $challengesDataType = 'array';
/**
* Output only. The required numbers of approvers. This is the M value used
* for M of N quorum auth. It is less than the number of public keys.
*
* @var int
*/
public $requiredApproverCount;
/**
* Output only. The public keys associated with the 2FA keys that have already
* approved the SingleTenantHsmInstanceProposal by signing the challenge.
*
* @param string[] $approvedTwoFactorPublicKeyPems
*/
public function setApprovedTwoFactorPublicKeyPems($approvedTwoFactorPublicKeyPems)
{
$this->approvedTwoFactorPublicKeyPems = $approvedTwoFactorPublicKeyPems;
}
/**
* @return string[]
*/
public function getApprovedTwoFactorPublicKeyPems()
{
return $this->approvedTwoFactorPublicKeyPems;
}
/**
* Output only. The challenges to be signed by 2FA keys for quorum auth. M of
* N of these challenges are required to be signed to approve the operation.
*
* @param Challenge[] $challenges
*/
public function setChallenges($challenges)
{
$this->challenges = $challenges;
}
/**
* @return Challenge[]
*/
public function getChallenges()
{
return $this->challenges;
}
/**
* Output only. The required numbers of approvers. This is the M value used
* for M of N quorum auth. It is less than the number of public keys.
*
* @param int $requiredApproverCount
*/
public function setRequiredApproverCount($requiredApproverCount)
{
$this->requiredApproverCount = $requiredApproverCount;
}
/**
* @return int
*/
public function getRequiredApproverCount()
{
return $this->requiredApproverCount;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(QuorumParameters::class, 'Google_Service_CloudKMS_QuorumParameters');
@@ -0,0 +1,47 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class QuorumReply extends \Google\Collection
{
protected $collection_key = 'challengeReplies';
protected $challengeRepliesType = ChallengeReply::class;
protected $challengeRepliesDataType = 'array';
/**
* Required. The challenge replies to approve the proposal. Challenge replies
* can be sent across multiple requests. The proposal will be approved when
* required_approver_count challenge replies are provided.
*
* @param ChallengeReply[] $challengeReplies
*/
public function setChallengeReplies($challengeReplies)
{
$this->challengeReplies = $challengeReplies;
}
/**
* @return ChallengeReply[]
*/
public function getChallengeReplies()
{
return $this->challengeReplies;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(QuorumReply::class, 'Google_Service_CloudKMS_QuorumReply');
@@ -0,0 +1,258 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class RawDecryptRequest extends \Google\Model
{
/**
* Optional. Optional data that must match the data originally supplied in
* RawEncryptRequest.additional_authenticated_data.
*
* @var string
*/
public $additionalAuthenticatedData;
/**
* Optional. An optional CRC32C checksum of the
* RawDecryptRequest.additional_authenticated_data. If specified,
* KeyManagementService will verify the integrity of the received
* additional_authenticated_data using this checksum. KeyManagementService
* will report an error if the checksum verification fails. If you receive a
* checksum error, your client should verify that
* CRC32C(additional_authenticated_data) is equal to
* additional_authenticated_data_crc32c, and if so, perform a limited number
* of retries. A persistent mismatch may indicate an issue in your computation
* of the CRC32C checksum. Note: This field is defined as int64 for reasons of
* compatibility across different languages. However, it is a non-negative
* integer, which will never exceed 2^32-1, and can be safely downconverted to
* uint32 in languages that support this type.
*
* @var string
*/
public $additionalAuthenticatedDataCrc32c;
/**
* Required. The encrypted data originally returned in
* RawEncryptResponse.ciphertext.
*
* @var string
*/
public $ciphertext;
/**
* Optional. An optional CRC32C checksum of the RawDecryptRequest.ciphertext.
* If specified, KeyManagementService will verify the integrity of the
* received ciphertext using this checksum. KeyManagementService will report
* an error if the checksum verification fails. If you receive a checksum
* error, your client should verify that CRC32C(ciphertext) is equal to
* ciphertext_crc32c, and if so, perform a limited number of retries. A
* persistent mismatch may indicate an issue in your computation of the CRC32C
* checksum. Note: This field is defined as int64 for reasons of compatibility
* across different languages. However, it is a non-negative integer, which
* will never exceed 2^32-1, and can be safely downconverted to uint32 in
* languages that support this type.
*
* @var string
*/
public $ciphertextCrc32c;
/**
* Required. The initialization vector (IV) used during encryption, which must
* match the data originally provided in
* RawEncryptResponse.initialization_vector.
*
* @var string
*/
public $initializationVector;
/**
* Optional. An optional CRC32C checksum of the
* RawDecryptRequest.initialization_vector. If specified, KeyManagementService
* will verify the integrity of the received initialization_vector using this
* checksum. KeyManagementService will report an error if the checksum
* verification fails. If you receive a checksum error, your client should
* verify that CRC32C(initialization_vector) is equal to
* initialization_vector_crc32c, and if so, perform a limited number of
* retries. A persistent mismatch may indicate an issue in your computation of
* the CRC32C checksum. Note: This field is defined as int64 for reasons of
* compatibility across different languages. However, it is a non-negative
* integer, which will never exceed 2^32-1, and can be safely downconverted to
* uint32 in languages that support this type.
*
* @var string
*/
public $initializationVectorCrc32c;
/**
* The length of the authentication tag that is appended to the end of the
* ciphertext. If unspecified (0), the default value for the key's algorithm
* will be used (for AES-GCM, the default value is 16).
*
* @var int
*/
public $tagLength;
/**
* Optional. Optional data that must match the data originally supplied in
* RawEncryptRequest.additional_authenticated_data.
*
* @param string $additionalAuthenticatedData
*/
public function setAdditionalAuthenticatedData($additionalAuthenticatedData)
{
$this->additionalAuthenticatedData = $additionalAuthenticatedData;
}
/**
* @return string
*/
public function getAdditionalAuthenticatedData()
{
return $this->additionalAuthenticatedData;
}
/**
* Optional. An optional CRC32C checksum of the
* RawDecryptRequest.additional_authenticated_data. If specified,
* KeyManagementService will verify the integrity of the received
* additional_authenticated_data using this checksum. KeyManagementService
* will report an error if the checksum verification fails. If you receive a
* checksum error, your client should verify that
* CRC32C(additional_authenticated_data) is equal to
* additional_authenticated_data_crc32c, and if so, perform a limited number
* of retries. A persistent mismatch may indicate an issue in your computation
* of the CRC32C checksum. Note: This field is defined as int64 for reasons of
* compatibility across different languages. However, it is a non-negative
* integer, which will never exceed 2^32-1, and can be safely downconverted to
* uint32 in languages that support this type.
*
* @param string $additionalAuthenticatedDataCrc32c
*/
public function setAdditionalAuthenticatedDataCrc32c($additionalAuthenticatedDataCrc32c)
{
$this->additionalAuthenticatedDataCrc32c = $additionalAuthenticatedDataCrc32c;
}
/**
* @return string
*/
public function getAdditionalAuthenticatedDataCrc32c()
{
return $this->additionalAuthenticatedDataCrc32c;
}
/**
* Required. The encrypted data originally returned in
* RawEncryptResponse.ciphertext.
*
* @param string $ciphertext
*/
public function setCiphertext($ciphertext)
{
$this->ciphertext = $ciphertext;
}
/**
* @return string
*/
public function getCiphertext()
{
return $this->ciphertext;
}
/**
* Optional. An optional CRC32C checksum of the RawDecryptRequest.ciphertext.
* If specified, KeyManagementService will verify the integrity of the
* received ciphertext using this checksum. KeyManagementService will report
* an error if the checksum verification fails. If you receive a checksum
* error, your client should verify that CRC32C(ciphertext) is equal to
* ciphertext_crc32c, and if so, perform a limited number of retries. A
* persistent mismatch may indicate an issue in your computation of the CRC32C
* checksum. Note: This field is defined as int64 for reasons of compatibility
* across different languages. However, it is a non-negative integer, which
* will never exceed 2^32-1, and can be safely downconverted to uint32 in
* languages that support this type.
*
* @param string $ciphertextCrc32c
*/
public function setCiphertextCrc32c($ciphertextCrc32c)
{
$this->ciphertextCrc32c = $ciphertextCrc32c;
}
/**
* @return string
*/
public function getCiphertextCrc32c()
{
return $this->ciphertextCrc32c;
}
/**
* Required. The initialization vector (IV) used during encryption, which must
* match the data originally provided in
* RawEncryptResponse.initialization_vector.
*
* @param string $initializationVector
*/
public function setInitializationVector($initializationVector)
{
$this->initializationVector = $initializationVector;
}
/**
* @return string
*/
public function getInitializationVector()
{
return $this->initializationVector;
}
/**
* Optional. An optional CRC32C checksum of the
* RawDecryptRequest.initialization_vector. If specified, KeyManagementService
* will verify the integrity of the received initialization_vector using this
* checksum. KeyManagementService will report an error if the checksum
* verification fails. If you receive a checksum error, your client should
* verify that CRC32C(initialization_vector) is equal to
* initialization_vector_crc32c, and if so, perform a limited number of
* retries. A persistent mismatch may indicate an issue in your computation of
* the CRC32C checksum. Note: This field is defined as int64 for reasons of
* compatibility across different languages. However, it is a non-negative
* integer, which will never exceed 2^32-1, and can be safely downconverted to
* uint32 in languages that support this type.
*
* @param string $initializationVectorCrc32c
*/
public function setInitializationVectorCrc32c($initializationVectorCrc32c)
{
$this->initializationVectorCrc32c = $initializationVectorCrc32c;
}
/**
* @return string
*/
public function getInitializationVectorCrc32c()
{
return $this->initializationVectorCrc32c;
}
/**
* The length of the authentication tag that is appended to the end of the
* ciphertext. If unspecified (0), the default value for the key's algorithm
* will be used (for AES-GCM, the default value is 16).
*
* @param int $tagLength
*/
public function setTagLength($tagLength)
{
$this->tagLength = $tagLength;
}
/**
* @return int
*/
public function getTagLength()
{
return $this->tagLength;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(RawDecryptRequest::class, 'Google_Service_CloudKMS_RawDecryptRequest');
@@ -0,0 +1,245 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class RawDecryptResponse extends \Google\Model
{
/**
* Not specified.
*/
public const PROTECTION_LEVEL_PROTECTION_LEVEL_UNSPECIFIED = 'PROTECTION_LEVEL_UNSPECIFIED';
/**
* Crypto operations are performed in software.
*/
public const PROTECTION_LEVEL_SOFTWARE = 'SOFTWARE';
/**
* Crypto operations are performed in a Hardware Security Module.
*/
public const PROTECTION_LEVEL_HSM = 'HSM';
/**
* Crypto operations are performed by an external key manager.
*/
public const PROTECTION_LEVEL_EXTERNAL = 'EXTERNAL';
/**
* Crypto operations are performed in an EKM-over-VPC backend.
*/
public const PROTECTION_LEVEL_EXTERNAL_VPC = 'EXTERNAL_VPC';
/**
* Crypto operations are performed in a single-tenant HSM.
*/
public const PROTECTION_LEVEL_HSM_SINGLE_TENANT = 'HSM_SINGLE_TENANT';
/**
* The decrypted data.
*
* @var string
*/
public $plaintext;
/**
* Integrity verification field. A CRC32C checksum of the returned
* RawDecryptResponse.plaintext. An integrity check of plaintext can be
* performed by computing the CRC32C checksum of plaintext and comparing your
* results to this field. Discard the response in case of non-matching
* checksum values, and perform a limited number of retries. A persistent
* mismatch may indicate an issue in your computation of the CRC32C checksum.
* Note: receiving this response message indicates that KeyManagementService
* is able to successfully decrypt the ciphertext. Note: This field is defined
* as int64 for reasons of compatibility across different languages. However,
* it is a non-negative integer, which will never exceed 2^32-1, and can be
* safely downconverted to uint32 in languages that support this type.
*
* @var string
*/
public $plaintextCrc32c;
/**
* The ProtectionLevel of the CryptoKeyVersion used in decryption.
*
* @var string
*/
public $protectionLevel;
/**
* Integrity verification field. A flag indicating whether
* RawDecryptRequest.additional_authenticated_data_crc32c was received by
* KeyManagementService and used for the integrity verification of
* additional_authenticated_data. A false value of this field indicates either
* that // RawDecryptRequest.additional_authenticated_data_crc32c was left
* unset or that it was not delivered to KeyManagementService. If you've set
* RawDecryptRequest.additional_authenticated_data_crc32c but this field is
* still false, discard the response and perform a limited number of retries.
*
* @var bool
*/
public $verifiedAdditionalAuthenticatedDataCrc32c;
/**
* Integrity verification field. A flag indicating whether
* RawDecryptRequest.ciphertext_crc32c was received by KeyManagementService
* and used for the integrity verification of the ciphertext. A false value of
* this field indicates either that RawDecryptRequest.ciphertext_crc32c was
* left unset or that it was not delivered to KeyManagementService. If you've
* set RawDecryptRequest.ciphertext_crc32c but this field is still false,
* discard the response and perform a limited number of retries.
*
* @var bool
*/
public $verifiedCiphertextCrc32c;
/**
* Integrity verification field. A flag indicating whether
* RawDecryptRequest.initialization_vector_crc32c was received by
* KeyManagementService and used for the integrity verification of
* initialization_vector. A false value of this field indicates either that
* RawDecryptRequest.initialization_vector_crc32c was left unset or that it
* was not delivered to KeyManagementService. If you've set
* RawDecryptRequest.initialization_vector_crc32c but this field is still
* false, discard the response and perform a limited number of retries.
*
* @var bool
*/
public $verifiedInitializationVectorCrc32c;
/**
* The decrypted data.
*
* @param string $plaintext
*/
public function setPlaintext($plaintext)
{
$this->plaintext = $plaintext;
}
/**
* @return string
*/
public function getPlaintext()
{
return $this->plaintext;
}
/**
* Integrity verification field. A CRC32C checksum of the returned
* RawDecryptResponse.plaintext. An integrity check of plaintext can be
* performed by computing the CRC32C checksum of plaintext and comparing your
* results to this field. Discard the response in case of non-matching
* checksum values, and perform a limited number of retries. A persistent
* mismatch may indicate an issue in your computation of the CRC32C checksum.
* Note: receiving this response message indicates that KeyManagementService
* is able to successfully decrypt the ciphertext. Note: This field is defined
* as int64 for reasons of compatibility across different languages. However,
* it is a non-negative integer, which will never exceed 2^32-1, and can be
* safely downconverted to uint32 in languages that support this type.
*
* @param string $plaintextCrc32c
*/
public function setPlaintextCrc32c($plaintextCrc32c)
{
$this->plaintextCrc32c = $plaintextCrc32c;
}
/**
* @return string
*/
public function getPlaintextCrc32c()
{
return $this->plaintextCrc32c;
}
/**
* The ProtectionLevel of the CryptoKeyVersion used in decryption.
*
* Accepted values: PROTECTION_LEVEL_UNSPECIFIED, SOFTWARE, HSM, EXTERNAL,
* EXTERNAL_VPC, HSM_SINGLE_TENANT
*
* @param self::PROTECTION_LEVEL_* $protectionLevel
*/
public function setProtectionLevel($protectionLevel)
{
$this->protectionLevel = $protectionLevel;
}
/**
* @return self::PROTECTION_LEVEL_*
*/
public function getProtectionLevel()
{
return $this->protectionLevel;
}
/**
* Integrity verification field. A flag indicating whether
* RawDecryptRequest.additional_authenticated_data_crc32c was received by
* KeyManagementService and used for the integrity verification of
* additional_authenticated_data. A false value of this field indicates either
* that // RawDecryptRequest.additional_authenticated_data_crc32c was left
* unset or that it was not delivered to KeyManagementService. If you've set
* RawDecryptRequest.additional_authenticated_data_crc32c but this field is
* still false, discard the response and perform a limited number of retries.
*
* @param bool $verifiedAdditionalAuthenticatedDataCrc32c
*/
public function setVerifiedAdditionalAuthenticatedDataCrc32c($verifiedAdditionalAuthenticatedDataCrc32c)
{
$this->verifiedAdditionalAuthenticatedDataCrc32c = $verifiedAdditionalAuthenticatedDataCrc32c;
}
/**
* @return bool
*/
public function getVerifiedAdditionalAuthenticatedDataCrc32c()
{
return $this->verifiedAdditionalAuthenticatedDataCrc32c;
}
/**
* Integrity verification field. A flag indicating whether
* RawDecryptRequest.ciphertext_crc32c was received by KeyManagementService
* and used for the integrity verification of the ciphertext. A false value of
* this field indicates either that RawDecryptRequest.ciphertext_crc32c was
* left unset or that it was not delivered to KeyManagementService. If you've
* set RawDecryptRequest.ciphertext_crc32c but this field is still false,
* discard the response and perform a limited number of retries.
*
* @param bool $verifiedCiphertextCrc32c
*/
public function setVerifiedCiphertextCrc32c($verifiedCiphertextCrc32c)
{
$this->verifiedCiphertextCrc32c = $verifiedCiphertextCrc32c;
}
/**
* @return bool
*/
public function getVerifiedCiphertextCrc32c()
{
return $this->verifiedCiphertextCrc32c;
}
/**
* Integrity verification field. A flag indicating whether
* RawDecryptRequest.initialization_vector_crc32c was received by
* KeyManagementService and used for the integrity verification of
* initialization_vector. A false value of this field indicates either that
* RawDecryptRequest.initialization_vector_crc32c was left unset or that it
* was not delivered to KeyManagementService. If you've set
* RawDecryptRequest.initialization_vector_crc32c but this field is still
* false, discard the response and perform a limited number of retries.
*
* @param bool $verifiedInitializationVectorCrc32c
*/
public function setVerifiedInitializationVectorCrc32c($verifiedInitializationVectorCrc32c)
{
$this->verifiedInitializationVectorCrc32c = $verifiedInitializationVectorCrc32c;
}
/**
* @return bool
*/
public function getVerifiedInitializationVectorCrc32c()
{
return $this->verifiedInitializationVectorCrc32c;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(RawDecryptResponse::class, 'Google_Service_CloudKMS_RawDecryptResponse');
@@ -0,0 +1,250 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class RawEncryptRequest extends \Google\Model
{
/**
* Optional. Optional data that, if specified, must also be provided during
* decryption through RawDecryptRequest.additional_authenticated_data. This
* field may only be used in conjunction with an algorithm that accepts
* additional authenticated data (for example, AES-GCM). The maximum size
* depends on the key version's protection_level. For SOFTWARE keys, the
* plaintext must be no larger than 64KiB. For HSM keys, the combined length
* of the plaintext and additional_authenticated_data fields must be no larger
* than 8KiB.
*
* @var string
*/
public $additionalAuthenticatedData;
/**
* Optional. An optional CRC32C checksum of the
* RawEncryptRequest.additional_authenticated_data. If specified,
* KeyManagementService will verify the integrity of the received
* additional_authenticated_data using this checksum. KeyManagementService
* will report an error if the checksum verification fails. If you receive a
* checksum error, your client should verify that
* CRC32C(additional_authenticated_data) is equal to
* additional_authenticated_data_crc32c, and if so, perform a limited number
* of retries. A persistent mismatch may indicate an issue in your computation
* of the CRC32C checksum. Note: This field is defined as int64 for reasons of
* compatibility across different languages. However, it is a non-negative
* integer, which will never exceed 2^32-1, and can be safely downconverted to
* uint32 in languages that support this type.
*
* @var string
*/
public $additionalAuthenticatedDataCrc32c;
/**
* Optional. A customer-supplied initialization vector that will be used for
* encryption. If it is not provided for AES-CBC and AES-CTR, one will be
* generated. It will be returned in RawEncryptResponse.initialization_vector.
*
* @var string
*/
public $initializationVector;
/**
* Optional. An optional CRC32C checksum of the
* RawEncryptRequest.initialization_vector. If specified, KeyManagementService
* will verify the integrity of the received initialization_vector using this
* checksum. KeyManagementService will report an error if the checksum
* verification fails. If you receive a checksum error, your client should
* verify that CRC32C(initialization_vector) is equal to
* initialization_vector_crc32c, and if so, perform a limited number of
* retries. A persistent mismatch may indicate an issue in your computation of
* the CRC32C checksum. Note: This field is defined as int64 for reasons of
* compatibility across different languages. However, it is a non-negative
* integer, which will never exceed 2^32-1, and can be safely downconverted to
* uint32 in languages that support this type.
*
* @var string
*/
public $initializationVectorCrc32c;
/**
* Required. The data to encrypt. Must be no larger than 64KiB. The maximum
* size depends on the key version's protection_level. For SOFTWARE keys, the
* plaintext must be no larger than 64KiB. For HSM keys, the combined length
* of the plaintext and additional_authenticated_data fields must be no larger
* than 8KiB.
*
* @var string
*/
public $plaintext;
/**
* Optional. An optional CRC32C checksum of the RawEncryptRequest.plaintext.
* If specified, KeyManagementService will verify the integrity of the
* received plaintext using this checksum. KeyManagementService will report an
* error if the checksum verification fails. If you receive a checksum error,
* your client should verify that CRC32C(plaintext) is equal to
* plaintext_crc32c, and if so, perform a limited number of retries. A
* persistent mismatch may indicate an issue in your computation of the CRC32C
* checksum. Note: This field is defined as int64 for reasons of compatibility
* across different languages. However, it is a non-negative integer, which
* will never exceed 2^32-1, and can be safely downconverted to uint32 in
* languages that support this type.
*
* @var string
*/
public $plaintextCrc32c;
/**
* Optional. Optional data that, if specified, must also be provided during
* decryption through RawDecryptRequest.additional_authenticated_data. This
* field may only be used in conjunction with an algorithm that accepts
* additional authenticated data (for example, AES-GCM). The maximum size
* depends on the key version's protection_level. For SOFTWARE keys, the
* plaintext must be no larger than 64KiB. For HSM keys, the combined length
* of the plaintext and additional_authenticated_data fields must be no larger
* than 8KiB.
*
* @param string $additionalAuthenticatedData
*/
public function setAdditionalAuthenticatedData($additionalAuthenticatedData)
{
$this->additionalAuthenticatedData = $additionalAuthenticatedData;
}
/**
* @return string
*/
public function getAdditionalAuthenticatedData()
{
return $this->additionalAuthenticatedData;
}
/**
* Optional. An optional CRC32C checksum of the
* RawEncryptRequest.additional_authenticated_data. If specified,
* KeyManagementService will verify the integrity of the received
* additional_authenticated_data using this checksum. KeyManagementService
* will report an error if the checksum verification fails. If you receive a
* checksum error, your client should verify that
* CRC32C(additional_authenticated_data) is equal to
* additional_authenticated_data_crc32c, and if so, perform a limited number
* of retries. A persistent mismatch may indicate an issue in your computation
* of the CRC32C checksum. Note: This field is defined as int64 for reasons of
* compatibility across different languages. However, it is a non-negative
* integer, which will never exceed 2^32-1, and can be safely downconverted to
* uint32 in languages that support this type.
*
* @param string $additionalAuthenticatedDataCrc32c
*/
public function setAdditionalAuthenticatedDataCrc32c($additionalAuthenticatedDataCrc32c)
{
$this->additionalAuthenticatedDataCrc32c = $additionalAuthenticatedDataCrc32c;
}
/**
* @return string
*/
public function getAdditionalAuthenticatedDataCrc32c()
{
return $this->additionalAuthenticatedDataCrc32c;
}
/**
* Optional. A customer-supplied initialization vector that will be used for
* encryption. If it is not provided for AES-CBC and AES-CTR, one will be
* generated. It will be returned in RawEncryptResponse.initialization_vector.
*
* @param string $initializationVector
*/
public function setInitializationVector($initializationVector)
{
$this->initializationVector = $initializationVector;
}
/**
* @return string
*/
public function getInitializationVector()
{
return $this->initializationVector;
}
/**
* Optional. An optional CRC32C checksum of the
* RawEncryptRequest.initialization_vector. If specified, KeyManagementService
* will verify the integrity of the received initialization_vector using this
* checksum. KeyManagementService will report an error if the checksum
* verification fails. If you receive a checksum error, your client should
* verify that CRC32C(initialization_vector) is equal to
* initialization_vector_crc32c, and if so, perform a limited number of
* retries. A persistent mismatch may indicate an issue in your computation of
* the CRC32C checksum. Note: This field is defined as int64 for reasons of
* compatibility across different languages. However, it is a non-negative
* integer, which will never exceed 2^32-1, and can be safely downconverted to
* uint32 in languages that support this type.
*
* @param string $initializationVectorCrc32c
*/
public function setInitializationVectorCrc32c($initializationVectorCrc32c)
{
$this->initializationVectorCrc32c = $initializationVectorCrc32c;
}
/**
* @return string
*/
public function getInitializationVectorCrc32c()
{
return $this->initializationVectorCrc32c;
}
/**
* Required. The data to encrypt. Must be no larger than 64KiB. The maximum
* size depends on the key version's protection_level. For SOFTWARE keys, the
* plaintext must be no larger than 64KiB. For HSM keys, the combined length
* of the plaintext and additional_authenticated_data fields must be no larger
* than 8KiB.
*
* @param string $plaintext
*/
public function setPlaintext($plaintext)
{
$this->plaintext = $plaintext;
}
/**
* @return string
*/
public function getPlaintext()
{
return $this->plaintext;
}
/**
* Optional. An optional CRC32C checksum of the RawEncryptRequest.plaintext.
* If specified, KeyManagementService will verify the integrity of the
* received plaintext using this checksum. KeyManagementService will report an
* error if the checksum verification fails. If you receive a checksum error,
* your client should verify that CRC32C(plaintext) is equal to
* plaintext_crc32c, and if so, perform a limited number of retries. A
* persistent mismatch may indicate an issue in your computation of the CRC32C
* checksum. Note: This field is defined as int64 for reasons of compatibility
* across different languages. However, it is a non-negative integer, which
* will never exceed 2^32-1, and can be safely downconverted to uint32 in
* languages that support this type.
*
* @param string $plaintextCrc32c
*/
public function setPlaintextCrc32c($plaintextCrc32c)
{
$this->plaintextCrc32c = $plaintextCrc32c;
}
/**
* @return string
*/
public function getPlaintextCrc32c()
{
return $this->plaintextCrc32c;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(RawEncryptRequest::class, 'Google_Service_CloudKMS_RawEncryptRequest');
@@ -0,0 +1,359 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class RawEncryptResponse extends \Google\Model
{
/**
* Not specified.
*/
public const PROTECTION_LEVEL_PROTECTION_LEVEL_UNSPECIFIED = 'PROTECTION_LEVEL_UNSPECIFIED';
/**
* Crypto operations are performed in software.
*/
public const PROTECTION_LEVEL_SOFTWARE = 'SOFTWARE';
/**
* Crypto operations are performed in a Hardware Security Module.
*/
public const PROTECTION_LEVEL_HSM = 'HSM';
/**
* Crypto operations are performed by an external key manager.
*/
public const PROTECTION_LEVEL_EXTERNAL = 'EXTERNAL';
/**
* Crypto operations are performed in an EKM-over-VPC backend.
*/
public const PROTECTION_LEVEL_EXTERNAL_VPC = 'EXTERNAL_VPC';
/**
* Crypto operations are performed in a single-tenant HSM.
*/
public const PROTECTION_LEVEL_HSM_SINGLE_TENANT = 'HSM_SINGLE_TENANT';
/**
* The encrypted data. In the case of AES-GCM, the authentication tag is the
* tag_length bytes at the end of this field.
*
* @var string
*/
public $ciphertext;
/**
* Integrity verification field. A CRC32C checksum of the returned
* RawEncryptResponse.ciphertext. An integrity check of ciphertext can be
* performed by computing the CRC32C checksum of ciphertext and comparing your
* results to this field. Discard the response in case of non-matching
* checksum values, and perform a limited number of retries. A persistent
* mismatch may indicate an issue in your computation of the CRC32C checksum.
* Note: This field is defined as int64 for reasons of compatibility across
* different languages. However, it is a non-negative integer, which will
* never exceed 2^32-1, and can be safely downconverted to uint32 in languages
* that support this type.
*
* @var string
*/
public $ciphertextCrc32c;
/**
* The initialization vector (IV) generated by the service during encryption.
* This value must be stored and provided in
* RawDecryptRequest.initialization_vector at decryption time.
*
* @var string
*/
public $initializationVector;
/**
* Integrity verification field. A CRC32C checksum of the returned
* RawEncryptResponse.initialization_vector. An integrity check of
* initialization_vector can be performed by computing the CRC32C checksum of
* initialization_vector and comparing your results to this field. Discard the
* response in case of non-matching checksum values, and perform a limited
* number of retries. A persistent mismatch may indicate an issue in your
* computation of the CRC32C checksum. Note: This field is defined as int64
* for reasons of compatibility across different languages. However, it is a
* non-negative integer, which will never exceed 2^32-1, and can be safely
* downconverted to uint32 in languages that support this type.
*
* @var string
*/
public $initializationVectorCrc32c;
/**
* The resource name of the CryptoKeyVersion used in encryption. Check this
* field to verify that the intended resource was used for encryption.
*
* @var string
*/
public $name;
/**
* The ProtectionLevel of the CryptoKeyVersion used in encryption.
*
* @var string
*/
public $protectionLevel;
/**
* The length of the authentication tag that is appended to the end of the
* ciphertext.
*
* @var int
*/
public $tagLength;
/**
* Integrity verification field. A flag indicating whether
* RawEncryptRequest.additional_authenticated_data_crc32c was received by
* KeyManagementService and used for the integrity verification of
* additional_authenticated_data. A false value of this field indicates either
* that // RawEncryptRequest.additional_authenticated_data_crc32c was left
* unset or that it was not delivered to KeyManagementService. If you've set
* RawEncryptRequest.additional_authenticated_data_crc32c but this field is
* still false, discard the response and perform a limited number of retries.
*
* @var bool
*/
public $verifiedAdditionalAuthenticatedDataCrc32c;
/**
* Integrity verification field. A flag indicating whether
* RawEncryptRequest.initialization_vector_crc32c was received by
* KeyManagementService and used for the integrity verification of
* initialization_vector. A false value of this field indicates either that
* RawEncryptRequest.initialization_vector_crc32c was left unset or that it
* was not delivered to KeyManagementService. If you've set
* RawEncryptRequest.initialization_vector_crc32c but this field is still
* false, discard the response and perform a limited number of retries.
*
* @var bool
*/
public $verifiedInitializationVectorCrc32c;
/**
* Integrity verification field. A flag indicating whether
* RawEncryptRequest.plaintext_crc32c was received by KeyManagementService and
* used for the integrity verification of the plaintext. A false value of this
* field indicates either that RawEncryptRequest.plaintext_crc32c was left
* unset or that it was not delivered to KeyManagementService. If you've set
* RawEncryptRequest.plaintext_crc32c but this field is still false, discard
* the response and perform a limited number of retries.
*
* @var bool
*/
public $verifiedPlaintextCrc32c;
/**
* The encrypted data. In the case of AES-GCM, the authentication tag is the
* tag_length bytes at the end of this field.
*
* @param string $ciphertext
*/
public function setCiphertext($ciphertext)
{
$this->ciphertext = $ciphertext;
}
/**
* @return string
*/
public function getCiphertext()
{
return $this->ciphertext;
}
/**
* Integrity verification field. A CRC32C checksum of the returned
* RawEncryptResponse.ciphertext. An integrity check of ciphertext can be
* performed by computing the CRC32C checksum of ciphertext and comparing your
* results to this field. Discard the response in case of non-matching
* checksum values, and perform a limited number of retries. A persistent
* mismatch may indicate an issue in your computation of the CRC32C checksum.
* Note: This field is defined as int64 for reasons of compatibility across
* different languages. However, it is a non-negative integer, which will
* never exceed 2^32-1, and can be safely downconverted to uint32 in languages
* that support this type.
*
* @param string $ciphertextCrc32c
*/
public function setCiphertextCrc32c($ciphertextCrc32c)
{
$this->ciphertextCrc32c = $ciphertextCrc32c;
}
/**
* @return string
*/
public function getCiphertextCrc32c()
{
return $this->ciphertextCrc32c;
}
/**
* The initialization vector (IV) generated by the service during encryption.
* This value must be stored and provided in
* RawDecryptRequest.initialization_vector at decryption time.
*
* @param string $initializationVector
*/
public function setInitializationVector($initializationVector)
{
$this->initializationVector = $initializationVector;
}
/**
* @return string
*/
public function getInitializationVector()
{
return $this->initializationVector;
}
/**
* Integrity verification field. A CRC32C checksum of the returned
* RawEncryptResponse.initialization_vector. An integrity check of
* initialization_vector can be performed by computing the CRC32C checksum of
* initialization_vector and comparing your results to this field. Discard the
* response in case of non-matching checksum values, and perform a limited
* number of retries. A persistent mismatch may indicate an issue in your
* computation of the CRC32C checksum. Note: This field is defined as int64
* for reasons of compatibility across different languages. However, it is a
* non-negative integer, which will never exceed 2^32-1, and can be safely
* downconverted to uint32 in languages that support this type.
*
* @param string $initializationVectorCrc32c
*/
public function setInitializationVectorCrc32c($initializationVectorCrc32c)
{
$this->initializationVectorCrc32c = $initializationVectorCrc32c;
}
/**
* @return string
*/
public function getInitializationVectorCrc32c()
{
return $this->initializationVectorCrc32c;
}
/**
* The resource name of the CryptoKeyVersion used in encryption. Check this
* field to verify that the intended resource was used for encryption.
*
* @param string $name
*/
public function setName($name)
{
$this->name = $name;
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* The ProtectionLevel of the CryptoKeyVersion used in encryption.
*
* Accepted values: PROTECTION_LEVEL_UNSPECIFIED, SOFTWARE, HSM, EXTERNAL,
* EXTERNAL_VPC, HSM_SINGLE_TENANT
*
* @param self::PROTECTION_LEVEL_* $protectionLevel
*/
public function setProtectionLevel($protectionLevel)
{
$this->protectionLevel = $protectionLevel;
}
/**
* @return self::PROTECTION_LEVEL_*
*/
public function getProtectionLevel()
{
return $this->protectionLevel;
}
/**
* The length of the authentication tag that is appended to the end of the
* ciphertext.
*
* @param int $tagLength
*/
public function setTagLength($tagLength)
{
$this->tagLength = $tagLength;
}
/**
* @return int
*/
public function getTagLength()
{
return $this->tagLength;
}
/**
* Integrity verification field. A flag indicating whether
* RawEncryptRequest.additional_authenticated_data_crc32c was received by
* KeyManagementService and used for the integrity verification of
* additional_authenticated_data. A false value of this field indicates either
* that // RawEncryptRequest.additional_authenticated_data_crc32c was left
* unset or that it was not delivered to KeyManagementService. If you've set
* RawEncryptRequest.additional_authenticated_data_crc32c but this field is
* still false, discard the response and perform a limited number of retries.
*
* @param bool $verifiedAdditionalAuthenticatedDataCrc32c
*/
public function setVerifiedAdditionalAuthenticatedDataCrc32c($verifiedAdditionalAuthenticatedDataCrc32c)
{
$this->verifiedAdditionalAuthenticatedDataCrc32c = $verifiedAdditionalAuthenticatedDataCrc32c;
}
/**
* @return bool
*/
public function getVerifiedAdditionalAuthenticatedDataCrc32c()
{
return $this->verifiedAdditionalAuthenticatedDataCrc32c;
}
/**
* Integrity verification field. A flag indicating whether
* RawEncryptRequest.initialization_vector_crc32c was received by
* KeyManagementService and used for the integrity verification of
* initialization_vector. A false value of this field indicates either that
* RawEncryptRequest.initialization_vector_crc32c was left unset or that it
* was not delivered to KeyManagementService. If you've set
* RawEncryptRequest.initialization_vector_crc32c but this field is still
* false, discard the response and perform a limited number of retries.
*
* @param bool $verifiedInitializationVectorCrc32c
*/
public function setVerifiedInitializationVectorCrc32c($verifiedInitializationVectorCrc32c)
{
$this->verifiedInitializationVectorCrc32c = $verifiedInitializationVectorCrc32c;
}
/**
* @return bool
*/
public function getVerifiedInitializationVectorCrc32c()
{
return $this->verifiedInitializationVectorCrc32c;
}
/**
* Integrity verification field. A flag indicating whether
* RawEncryptRequest.plaintext_crc32c was received by KeyManagementService and
* used for the integrity verification of the plaintext. A false value of this
* field indicates either that RawEncryptRequest.plaintext_crc32c was left
* unset or that it was not delivered to KeyManagementService. If you've set
* RawEncryptRequest.plaintext_crc32c but this field is still false, discard
* the response and perform a limited number of retries.
*
* @param bool $verifiedPlaintextCrc32c
*/
public function setVerifiedPlaintextCrc32c($verifiedPlaintextCrc32c)
{
$this->verifiedPlaintextCrc32c = $verifiedPlaintextCrc32c;
}
/**
* @return bool
*/
public function getVerifiedPlaintextCrc32c()
{
return $this->verifiedPlaintextCrc32c;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(RawEncryptResponse::class, 'Google_Service_CloudKMS_RawEncryptResponse');
@@ -0,0 +1,25 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class RefreshSingleTenantHsmInstance extends \Google\Model
{
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(RefreshSingleTenantHsmInstance::class, 'Google_Service_CloudKMS_RefreshSingleTenantHsmInstance');
@@ -0,0 +1,79 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class RegisterTwoFactorAuthKeys extends \Google\Collection
{
protected $collection_key = 'twoFactorPublicKeyPems';
/**
* Required. The required numbers of approvers to set for the
* SingleTenantHsmInstance. This is the M value used for M of N quorum auth.
* Must be greater than or equal to 2 and less than or equal to
* total_approver_count - 1.
*
* @var int
*/
public $requiredApproverCount;
/**
* Required. The public keys associated with the 2FA keys for M of N quorum
* auth. Public keys must be associated with RSA 2048 keys.
*
* @var string[]
*/
public $twoFactorPublicKeyPems;
/**
* Required. The required numbers of approvers to set for the
* SingleTenantHsmInstance. This is the M value used for M of N quorum auth.
* Must be greater than or equal to 2 and less than or equal to
* total_approver_count - 1.
*
* @param int $requiredApproverCount
*/
public function setRequiredApproverCount($requiredApproverCount)
{
$this->requiredApproverCount = $requiredApproverCount;
}
/**
* @return int
*/
public function getRequiredApproverCount()
{
return $this->requiredApproverCount;
}
/**
* Required. The public keys associated with the 2FA keys for M of N quorum
* auth. Public keys must be associated with RSA 2048 keys.
*
* @param string[] $twoFactorPublicKeyPems
*/
public function setTwoFactorPublicKeyPems($twoFactorPublicKeyPems)
{
$this->twoFactorPublicKeyPems = $twoFactorPublicKeyPems;
}
/**
* @return string[]
*/
public function getTwoFactorPublicKeyPems()
{
return $this->twoFactorPublicKeyPems;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(RegisterTwoFactorAuthKeys::class, 'Google_Service_CloudKMS_RegisterTwoFactorAuthKeys');
@@ -0,0 +1,50 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class RemoveQuorumMember extends \Google\Model
{
/**
* Required. The public key associated with the 2FA key for the quorum member
* to remove. Public keys must be associated with RSA 2048 keys.
*
* @var string
*/
public $twoFactorPublicKeyPem;
/**
* Required. The public key associated with the 2FA key for the quorum member
* to remove. Public keys must be associated with RSA 2048 keys.
*
* @param string $twoFactorPublicKeyPem
*/
public function setTwoFactorPublicKeyPem($twoFactorPublicKeyPem)
{
$this->twoFactorPublicKeyPem = $twoFactorPublicKeyPem;
}
/**
* @return string
*/
public function getTwoFactorPublicKeyPem()
{
return $this->twoFactorPublicKeyPem;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(RemoveQuorumMember::class, 'Google_Service_CloudKMS_RemoveQuorumMember');
@@ -0,0 +1,113 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class RequiredActionQuorumParameters extends \Google\Collection
{
protected $collection_key = 'requiredChallenges';
/**
* Output only. The public keys associated with the 2FA keys that have already
* approved the SingleTenantHsmInstanceProposal by signing the challenge.
*
* @var string[]
*/
public $approvedTwoFactorPublicKeyPems;
protected $quorumChallengesType = Challenge::class;
protected $quorumChallengesDataType = 'array';
/**
* Output only. The required number of quorum approvers. This is the M value
* used for M of N quorum auth. It is less than the number of public keys.
*
* @var int
*/
public $requiredApproverCount;
protected $requiredChallengesType = Challenge::class;
protected $requiredChallengesDataType = 'array';
/**
* Output only. The public keys associated with the 2FA keys that have already
* approved the SingleTenantHsmInstanceProposal by signing the challenge.
*
* @param string[] $approvedTwoFactorPublicKeyPems
*/
public function setApprovedTwoFactorPublicKeyPems($approvedTwoFactorPublicKeyPems)
{
$this->approvedTwoFactorPublicKeyPems = $approvedTwoFactorPublicKeyPems;
}
/**
* @return string[]
*/
public function getApprovedTwoFactorPublicKeyPems()
{
return $this->approvedTwoFactorPublicKeyPems;
}
/**
* Output only. The challenges to be signed by 2FA keys for quorum auth. M of
* N of these challenges are required to be signed to approve the operation.
*
* @param Challenge[] $quorumChallenges
*/
public function setQuorumChallenges($quorumChallenges)
{
$this->quorumChallenges = $quorumChallenges;
}
/**
* @return Challenge[]
*/
public function getQuorumChallenges()
{
return $this->quorumChallenges;
}
/**
* Output only. The required number of quorum approvers. This is the M value
* used for M of N quorum auth. It is less than the number of public keys.
*
* @param int $requiredApproverCount
*/
public function setRequiredApproverCount($requiredApproverCount)
{
$this->requiredApproverCount = $requiredApproverCount;
}
/**
* @return int
*/
public function getRequiredApproverCount()
{
return $this->requiredApproverCount;
}
/**
* Output only. A list of specific challenges that must be signed. For some
* operations, this will contain a single challenge.
*
* @param Challenge[] $requiredChallenges
*/
public function setRequiredChallenges($requiredChallenges)
{
$this->requiredChallenges = $requiredChallenges;
}
/**
* @return Challenge[]
*/
public function getRequiredChallenges()
{
return $this->requiredChallenges;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(RequiredActionQuorumParameters::class, 'Google_Service_CloudKMS_RequiredActionQuorumParameters');
@@ -0,0 +1,67 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class RequiredActionQuorumReply extends \Google\Collection
{
protected $collection_key = 'requiredChallengeReplies';
protected $quorumChallengeRepliesType = ChallengeReply::class;
protected $quorumChallengeRepliesDataType = 'array';
protected $requiredChallengeRepliesType = ChallengeReply::class;
protected $requiredChallengeRepliesDataType = 'array';
/**
* Required. Quorum members' signed challenge replies. These can be provided
* across multiple requests. The proposal will be approved when
* required_approver_count quorum_challenge_replies are provided and when all
* required_challenge_replies are provided.
*
* @param ChallengeReply[] $quorumChallengeReplies
*/
public function setQuorumChallengeReplies($quorumChallengeReplies)
{
$this->quorumChallengeReplies = $quorumChallengeReplies;
}
/**
* @return ChallengeReply[]
*/
public function getQuorumChallengeReplies()
{
return $this->quorumChallengeReplies;
}
/**
* Required. All required challenges must be signed for the proposal to be
* approved. These can be sent across multiple requests.
*
* @param ChallengeReply[] $requiredChallengeReplies
*/
public function setRequiredChallengeReplies($requiredChallengeReplies)
{
$this->requiredChallengeReplies = $requiredChallengeReplies;
}
/**
* @return ChallengeReply[]
*/
public function getRequiredChallengeReplies()
{
return $this->requiredChallengeReplies;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(RequiredActionQuorumReply::class, 'Google_Service_CloudKMS_RequiredActionQuorumReply');
@@ -0,0 +1,114 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS\Resource;
use Google\Service\CloudKMS\AutokeyConfig;
use Google\Service\CloudKMS\KeyAccessJustificationsPolicyConfig;
/**
* The "folders" collection of methods.
* Typical usage is:
* <code>
* $cloudkmsService = new Google\Service\CloudKMS(...);
* $folders = $cloudkmsService->folders;
* </code>
*/
class Folders extends \Google\Service\Resource
{
/**
* Returns the AutokeyConfig for a folder or project. (folders.getAutokeyConfig)
*
* @param string $name Required. Name of the AutokeyConfig resource, e.g.
* `folders/{FOLDER_NUMBER}/autokeyConfig` or
* `projects/{PROJECT_NUMBER}/autokeyConfig`.
* @param array $optParams Optional parameters.
* @return AutokeyConfig
* @throws \Google\Service\Exception
*/
public function getAutokeyConfig($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('getAutokeyConfig', [$params], AutokeyConfig::class);
}
/**
* Gets the KeyAccessJustificationsPolicyConfig for a given organization,
* folder, or project. (folders.getKajPolicyConfig)
*
* @param string $name Required. Specifies the name of the
* KeyAccessJustificationsPolicyConfig to get.
* @param array $optParams Optional parameters.
* @return KeyAccessJustificationsPolicyConfig
* @throws \Google\Service\Exception
*/
public function getKajPolicyConfig($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('getKajPolicyConfig', [$params], KeyAccessJustificationsPolicyConfig::class);
}
/**
* Updates the AutokeyConfig for a folder or a project. The caller must have
* both `cloudkms.autokeyConfigs.update` permission on the parent folder and
* `cloudkms.cryptoKeys.setIamPolicy` permission on the provided key project. A
* KeyHandle creation in the folder's descendant projects will use this
* configuration to determine where to create the resulting CryptoKey.
* (folders.updateAutokeyConfig)
*
* @param string $name Identifier. Name of the AutokeyConfig resource, e.g.
* `folders/{FOLDER_NUMBER}/autokeyConfig` or
* `projects/{PROJECT_NUMBER}/autokeyConfig`.
* @param AutokeyConfig $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string updateMask Required. Masks which fields of the
* AutokeyConfig to update, e.g. `keyProject`.
* @return AutokeyConfig
* @throws \Google\Service\Exception
*/
public function updateAutokeyConfig($name, AutokeyConfig $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('updateAutokeyConfig', [$params], AutokeyConfig::class);
}
/**
* Updates the KeyAccessJustificationsPolicyConfig for a given organization,
* folder, or project. (folders.updateKajPolicyConfig)
*
* @param string $name Identifier. Represents the resource name for this
* KeyAccessJustificationsPolicyConfig in the format of
* "{organizations|folders|projects}/kajPolicyConfig".
* @param KeyAccessJustificationsPolicyConfig $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string updateMask Optional. Specifies the list of fields to
* update.
* @return KeyAccessJustificationsPolicyConfig
* @throws \Google\Service\Exception
*/
public function updateKajPolicyConfig($name, KeyAccessJustificationsPolicyConfig $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('updateKajPolicyConfig', [$params], KeyAccessJustificationsPolicyConfig::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Folders::class, 'Google_Service_CloudKMS_Resource_Folders');
@@ -0,0 +1,72 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS\Resource;
use Google\Service\CloudKMS\KeyAccessJustificationsPolicyConfig;
/**
* The "organizations" collection of methods.
* Typical usage is:
* <code>
* $cloudkmsService = new Google\Service\CloudKMS(...);
* $organizations = $cloudkmsService->organizations;
* </code>
*/
class Organizations extends \Google\Service\Resource
{
/**
* Gets the KeyAccessJustificationsPolicyConfig for a given organization,
* folder, or project. (organizations.getKajPolicyConfig)
*
* @param string $name Required. Specifies the name of the
* KeyAccessJustificationsPolicyConfig to get.
* @param array $optParams Optional parameters.
* @return KeyAccessJustificationsPolicyConfig
* @throws \Google\Service\Exception
*/
public function getKajPolicyConfig($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('getKajPolicyConfig', [$params], KeyAccessJustificationsPolicyConfig::class);
}
/**
* Updates the KeyAccessJustificationsPolicyConfig for a given organization,
* folder, or project. (organizations.updateKajPolicyConfig)
*
* @param string $name Identifier. Represents the resource name for this
* KeyAccessJustificationsPolicyConfig in the format of
* "{organizations|folders|projects}/kajPolicyConfig".
* @param KeyAccessJustificationsPolicyConfig $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string updateMask Optional. Specifies the list of fields to
* update.
* @return KeyAccessJustificationsPolicyConfig
* @throws \Google\Service\Exception
*/
public function updateKajPolicyConfig($name, KeyAccessJustificationsPolicyConfig $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('updateKajPolicyConfig', [$params], KeyAccessJustificationsPolicyConfig::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Organizations::class, 'Google_Service_CloudKMS_Resource_Organizations');
@@ -0,0 +1,171 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS\Resource;
use Google\Service\CloudKMS\AutokeyConfig;
use Google\Service\CloudKMS\KeyAccessJustificationsPolicyConfig;
use Google\Service\CloudKMS\ShowEffectiveAutokeyConfigResponse;
use Google\Service\CloudKMS\ShowEffectiveKeyAccessJustificationsEnrollmentConfigResponse;
use Google\Service\CloudKMS\ShowEffectiveKeyAccessJustificationsPolicyConfigResponse;
/**
* The "projects" collection of methods.
* Typical usage is:
* <code>
* $cloudkmsService = new Google\Service\CloudKMS(...);
* $projects = $cloudkmsService->projects;
* </code>
*/
class Projects extends \Google\Service\Resource
{
/**
* Returns the AutokeyConfig for a folder or project.
* (projects.getAutokeyConfig)
*
* @param string $name Required. Name of the AutokeyConfig resource, e.g.
* `folders/{FOLDER_NUMBER}/autokeyConfig` or
* `projects/{PROJECT_NUMBER}/autokeyConfig`.
* @param array $optParams Optional parameters.
* @return AutokeyConfig
* @throws \Google\Service\Exception
*/
public function getAutokeyConfig($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('getAutokeyConfig', [$params], AutokeyConfig::class);
}
/**
* Gets the KeyAccessJustificationsPolicyConfig for a given organization,
* folder, or project. (projects.getKajPolicyConfig)
*
* @param string $name Required. Specifies the name of the
* KeyAccessJustificationsPolicyConfig to get.
* @param array $optParams Optional parameters.
* @return KeyAccessJustificationsPolicyConfig
* @throws \Google\Service\Exception
*/
public function getKajPolicyConfig($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('getKajPolicyConfig', [$params], KeyAccessJustificationsPolicyConfig::class);
}
/**
* Returns the effective Cloud KMS Autokey configuration for a given project.
* (projects.showEffectiveAutokeyConfig)
*
* @param string $parent Required. Name of the resource project to the show
* effective Cloud KMS Autokey configuration for. This may be helpful for
* interrogating the effect of nested folder configurations on a given resource
* project.
* @param array $optParams Optional parameters.
* @return ShowEffectiveAutokeyConfigResponse
* @throws \Google\Service\Exception
*/
public function showEffectiveAutokeyConfig($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = array_merge($params, $optParams);
return $this->call('showEffectiveAutokeyConfig', [$params], ShowEffectiveAutokeyConfigResponse::class);
}
/**
* Returns the KeyAccessJustificationsEnrollmentConfig of the resource closest
* to the given project in hierarchy.
* (projects.showEffectiveKeyAccessJustificationsEnrollmentConfig)
*
* @param string $project Required. Specifies the number or id of the project to
* get the effective KeyAccessJustificationsEnrollmentConfig for.
* @param array $optParams Optional parameters.
* @return ShowEffectiveKeyAccessJustificationsEnrollmentConfigResponse
* @throws \Google\Service\Exception
*/
public function showEffectiveKeyAccessJustificationsEnrollmentConfig($project, $optParams = [])
{
$params = ['project' => $project];
$params = array_merge($params, $optParams);
return $this->call('showEffectiveKeyAccessJustificationsEnrollmentConfig', [$params], ShowEffectiveKeyAccessJustificationsEnrollmentConfigResponse::class);
}
/**
* Returns the KeyAccessJustificationsPolicyConfig of the resource closest to
* the given project in hierarchy.
* (projects.showEffectiveKeyAccessJustificationsPolicyConfig)
*
* @param string $project Required. Specifies the number or id of the project to
* get the effective KeyAccessJustificationsPolicyConfig. In the format of
* "projects/{|}"
* @param array $optParams Optional parameters.
* @return ShowEffectiveKeyAccessJustificationsPolicyConfigResponse
* @throws \Google\Service\Exception
*/
public function showEffectiveKeyAccessJustificationsPolicyConfig($project, $optParams = [])
{
$params = ['project' => $project];
$params = array_merge($params, $optParams);
return $this->call('showEffectiveKeyAccessJustificationsPolicyConfig', [$params], ShowEffectiveKeyAccessJustificationsPolicyConfigResponse::class);
}
/**
* Updates the AutokeyConfig for a folder or a project. The caller must have
* both `cloudkms.autokeyConfigs.update` permission on the parent folder and
* `cloudkms.cryptoKeys.setIamPolicy` permission on the provided key project. A
* KeyHandle creation in the folder's descendant projects will use this
* configuration to determine where to create the resulting CryptoKey.
* (projects.updateAutokeyConfig)
*
* @param string $name Identifier. Name of the AutokeyConfig resource, e.g.
* `folders/{FOLDER_NUMBER}/autokeyConfig` or
* `projects/{PROJECT_NUMBER}/autokeyConfig`.
* @param AutokeyConfig $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string updateMask Required. Masks which fields of the
* AutokeyConfig to update, e.g. `keyProject`.
* @return AutokeyConfig
* @throws \Google\Service\Exception
*/
public function updateAutokeyConfig($name, AutokeyConfig $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('updateAutokeyConfig', [$params], AutokeyConfig::class);
}
/**
* Updates the KeyAccessJustificationsPolicyConfig for a given organization,
* folder, or project. (projects.updateKajPolicyConfig)
*
* @param string $name Identifier. Represents the resource name for this
* KeyAccessJustificationsPolicyConfig in the format of
* "{organizations|folders|projects}/kajPolicyConfig".
* @param KeyAccessJustificationsPolicyConfig $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string updateMask Optional. Specifies the list of fields to
* update.
* @return KeyAccessJustificationsPolicyConfig
* @throws \Google\Service\Exception
*/
public function updateKajPolicyConfig($name, KeyAccessJustificationsPolicyConfig $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('updateKajPolicyConfig', [$params], KeyAccessJustificationsPolicyConfig::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Projects::class, 'Google_Service_CloudKMS_Resource_Projects');
@@ -0,0 +1,140 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS\Resource;
use Google\Service\CloudKMS\EkmConfig;
use Google\Service\CloudKMS\GenerateRandomBytesRequest;
use Google\Service\CloudKMS\GenerateRandomBytesResponse;
use Google\Service\CloudKMS\ListLocationsResponse;
use Google\Service\CloudKMS\Location;
/**
* The "locations" collection of methods.
* Typical usage is:
* <code>
* $cloudkmsService = new Google\Service\CloudKMS(...);
* $locations = $cloudkmsService->projects_locations;
* </code>
*/
class ProjectsLocations extends \Google\Service\Resource
{
/**
* Generate random bytes using the Cloud KMS randomness source in the provided
* location. (locations.generateRandomBytes)
*
* @param string $location The project-specific location in which to generate
* random bytes. For example, "projects/my-project/locations/us-central1".
* @param GenerateRandomBytesRequest $postBody
* @param array $optParams Optional parameters.
* @return GenerateRandomBytesResponse
* @throws \Google\Service\Exception
*/
public function generateRandomBytes($location, GenerateRandomBytesRequest $postBody, $optParams = [])
{
$params = ['location' => $location, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('generateRandomBytes', [$params], GenerateRandomBytesResponse::class);
}
/**
* Gets information about a location. (locations.get)
*
* @param string $name Resource name for the location.
* @param array $optParams Optional parameters.
* @return Location
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], Location::class);
}
/**
* Returns the EkmConfig singleton resource for a given project and location.
* (locations.getEkmConfig)
*
* @param string $name Required. The name of the EkmConfig to get.
* @param array $optParams Optional parameters.
* @return EkmConfig
* @throws \Google\Service\Exception
*/
public function getEkmConfig($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('getEkmConfig', [$params], EkmConfig::class);
}
/**
* Lists information about the supported locations for this service. This method
* lists locations based on the resource scope provided in the
* ListLocationsRequest.name field: * **Global locations**: If `name` is empty,
* the method lists the public locations available to all projects. * **Project-
* specific locations**: If `name` follows the format `projects/{project}`, the
* method lists locations visible to that specific project. This includes
* public, private, or other project-specific locations enabled for the project.
* For gRPC and client library implementations, the resource name is passed as
* the `name` field. For direct service calls, the resource name is incorporated
* into the request path based on the specific service implementation and
* version. (locations.listProjectsLocations)
*
* @param string $name The resource that owns the locations collection, if
* applicable.
* @param array $optParams Optional parameters.
*
* @opt_param string extraLocationTypes Optional. Do not use this field unless
* explicitly documented otherwise. This is primarily for internal usage.
* @opt_param string filter A filter to narrow down results to a preferred
* subset. The filtering language accepts strings like `"displayName=tokyo"`,
* and is documented in more detail in [AIP-160](https://google.aip.dev/160).
* @opt_param int pageSize The maximum number of results to return. If not set,
* the service selects a default.
* @opt_param string pageToken A page token received from the `next_page_token`
* field in the response. Send that page token to receive the subsequent page.
* @return ListLocationsResponse
* @throws \Google\Service\Exception
*/
public function listProjectsLocations($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], ListLocationsResponse::class);
}
/**
* Updates the EkmConfig singleton resource for a given project and location.
* (locations.updateEkmConfig)
*
* @param string $name Output only. The resource name for the EkmConfig in the
* format `projects/locations/ekmConfig`.
* @param EkmConfig $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string updateMask Required. List of fields to be updated in this
* request.
* @return EkmConfig
* @throws \Google\Service\Exception
*/
public function updateEkmConfig($name, EkmConfig $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('updateEkmConfig', [$params], EkmConfig::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocations::class, 'Google_Service_CloudKMS_Resource_ProjectsLocations');
@@ -0,0 +1,112 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS\Resource;
use Google\Service\CloudKMS\Policy;
use Google\Service\CloudKMS\SetIamPolicyRequest;
use Google\Service\CloudKMS\TestIamPermissionsRequest;
use Google\Service\CloudKMS\TestIamPermissionsResponse;
/**
* The "ekmConfig" collection of methods.
* Typical usage is:
* <code>
* $cloudkmsService = new Google\Service\CloudKMS(...);
* $ekmConfig = $cloudkmsService->projects_locations_ekmConfig;
* </code>
*/
class ProjectsLocationsEkmConfig extends \Google\Service\Resource
{
/**
* Gets the access control policy for a resource. Returns an empty policy if the
* resource exists and does not have a policy set. (ekmConfig.getIamPolicy)
*
* @param string $resource REQUIRED: The resource for which the policy is being
* requested. See [Resource
* names](https://cloud.google.com/apis/design/resource_names) for the
* appropriate value for this field.
* @param array $optParams Optional parameters.
*
* @opt_param int options.requestedPolicyVersion Optional. The maximum policy
* version that will be used to format the policy. Valid values are 0, 1, and 3.
* Requests specifying an invalid value will be rejected. Requests for policies
* with any conditional role bindings must specify version 3. Policies with no
* conditional role bindings may specify any valid value or leave the field
* unset. The policy in the response might use the policy version that you
* specified, or it might use a lower policy version. For example, if you
* specify version 3, but the policy has no conditional role bindings, the
* response uses version 1. To learn which resources support conditions in their
* IAM policies, see the [IAM
* documentation](https://cloud.google.com/iam/help/conditions/resource-
* policies).
* @return Policy
* @throws \Google\Service\Exception
*/
public function getIamPolicy($resource, $optParams = [])
{
$params = ['resource' => $resource];
$params = array_merge($params, $optParams);
return $this->call('getIamPolicy', [$params], Policy::class);
}
/**
* Sets the access control policy on the specified resource. Replaces any
* existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and
* `PERMISSION_DENIED` errors. (ekmConfig.setIamPolicy)
*
* @param string $resource REQUIRED: The resource for which the policy is being
* specified. See [Resource
* names](https://cloud.google.com/apis/design/resource_names) for the
* appropriate value for this field.
* @param SetIamPolicyRequest $postBody
* @param array $optParams Optional parameters.
* @return Policy
* @throws \Google\Service\Exception
*/
public function setIamPolicy($resource, SetIamPolicyRequest $postBody, $optParams = [])
{
$params = ['resource' => $resource, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('setIamPolicy', [$params], Policy::class);
}
/**
* Returns permissions that a caller has on the specified resource. If the
* resource does not exist, this will return an empty set of permissions, not a
* `NOT_FOUND` error. Note: This operation is designed to be used for building
* permission-aware UIs and command-line tools, not for authorization checking.
* This operation may "fail open" without warning.
* (ekmConfig.testIamPermissions)
*
* @param string $resource REQUIRED: The resource for which the policy detail is
* being requested. See [Resource
* names](https://cloud.google.com/apis/design/resource_names) for the
* appropriate value for this field.
* @param TestIamPermissionsRequest $postBody
* @param array $optParams Optional parameters.
* @return TestIamPermissionsResponse
* @throws \Google\Service\Exception
*/
public function testIamPermissions($resource, TestIamPermissionsRequest $postBody, $optParams = [])
{
$params = ['resource' => $resource, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('testIamPermissions', [$params], TestIamPermissionsResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocationsEkmConfig::class, 'Google_Service_CloudKMS_Resource_ProjectsLocationsEkmConfig');
@@ -0,0 +1,217 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS\Resource;
use Google\Service\CloudKMS\EkmConnection;
use Google\Service\CloudKMS\ListEkmConnectionsResponse;
use Google\Service\CloudKMS\Policy;
use Google\Service\CloudKMS\SetIamPolicyRequest;
use Google\Service\CloudKMS\TestIamPermissionsRequest;
use Google\Service\CloudKMS\TestIamPermissionsResponse;
use Google\Service\CloudKMS\VerifyConnectivityResponse;
/**
* The "ekmConnections" collection of methods.
* Typical usage is:
* <code>
* $cloudkmsService = new Google\Service\CloudKMS(...);
* $ekmConnections = $cloudkmsService->projects_locations_ekmConnections;
* </code>
*/
class ProjectsLocationsEkmConnections extends \Google\Service\Resource
{
/**
* Creates a new EkmConnection in a given Project and Location.
* (ekmConnections.create)
*
* @param string $parent Required. The resource name of the location associated
* with the EkmConnection, in the format `projects/locations`.
* @param EkmConnection $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string ekmConnectionId Required. It must be unique within a
* location and match the regular expression `[a-zA-Z0-9_-]{1,63}`.
* @return EkmConnection
* @throws \Google\Service\Exception
*/
public function create($parent, EkmConnection $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], EkmConnection::class);
}
/**
* Returns metadata for a given EkmConnection. (ekmConnections.get)
*
* @param string $name Required. The name of the EkmConnection to get.
* @param array $optParams Optional parameters.
* @return EkmConnection
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], EkmConnection::class);
}
/**
* Gets the access control policy for a resource. Returns an empty policy if the
* resource exists and does not have a policy set. (ekmConnections.getIamPolicy)
*
* @param string $resource REQUIRED: The resource for which the policy is being
* requested. See [Resource
* names](https://cloud.google.com/apis/design/resource_names) for the
* appropriate value for this field.
* @param array $optParams Optional parameters.
*
* @opt_param int options.requestedPolicyVersion Optional. The maximum policy
* version that will be used to format the policy. Valid values are 0, 1, and 3.
* Requests specifying an invalid value will be rejected. Requests for policies
* with any conditional role bindings must specify version 3. Policies with no
* conditional role bindings may specify any valid value or leave the field
* unset. The policy in the response might use the policy version that you
* specified, or it might use a lower policy version. For example, if you
* specify version 3, but the policy has no conditional role bindings, the
* response uses version 1. To learn which resources support conditions in their
* IAM policies, see the [IAM
* documentation](https://cloud.google.com/iam/help/conditions/resource-
* policies).
* @return Policy
* @throws \Google\Service\Exception
*/
public function getIamPolicy($resource, $optParams = [])
{
$params = ['resource' => $resource];
$params = array_merge($params, $optParams);
return $this->call('getIamPolicy', [$params], Policy::class);
}
/**
* Lists EkmConnections. (ekmConnections.listProjectsLocationsEkmConnections)
*
* @param string $parent Required. The resource name of the location associated
* with the EkmConnections to list, in the format `projects/locations`.
* @param array $optParams Optional parameters.
*
* @opt_param string filter Optional. Only include resources that match the
* filter in the response. For more information, see [Sorting and filtering list
* results](https://cloud.google.com/kms/docs/sorting-and-filtering).
* @opt_param string orderBy Optional. Specify how the results should be sorted.
* If not specified, the results will be sorted in the default order. For more
* information, see [Sorting and filtering list
* results](https://cloud.google.com/kms/docs/sorting-and-filtering).
* @opt_param int pageSize Optional. Optional limit on the number of
* EkmConnections to include in the response. Further EkmConnections can
* subsequently be obtained by including the
* ListEkmConnectionsResponse.next_page_token in a subsequent request. If
* unspecified, the server will pick an appropriate default.
* @opt_param string pageToken Optional. Optional pagination token, returned
* earlier via ListEkmConnectionsResponse.next_page_token.
* @return ListEkmConnectionsResponse
* @throws \Google\Service\Exception
*/
public function listProjectsLocationsEkmConnections($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], ListEkmConnectionsResponse::class);
}
/**
* Updates an EkmConnection's metadata. (ekmConnections.patch)
*
* @param string $name Output only. The resource name for the EkmConnection in
* the format `projects/locations/ekmConnections`.
* @param EkmConnection $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string updateMask Required. List of fields to be updated in this
* request.
* @return EkmConnection
* @throws \Google\Service\Exception
*/
public function patch($name, EkmConnection $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('patch', [$params], EkmConnection::class);
}
/**
* Sets the access control policy on the specified resource. Replaces any
* existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and
* `PERMISSION_DENIED` errors. (ekmConnections.setIamPolicy)
*
* @param string $resource REQUIRED: The resource for which the policy is being
* specified. See [Resource
* names](https://cloud.google.com/apis/design/resource_names) for the
* appropriate value for this field.
* @param SetIamPolicyRequest $postBody
* @param array $optParams Optional parameters.
* @return Policy
* @throws \Google\Service\Exception
*/
public function setIamPolicy($resource, SetIamPolicyRequest $postBody, $optParams = [])
{
$params = ['resource' => $resource, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('setIamPolicy', [$params], Policy::class);
}
/**
* Returns permissions that a caller has on the specified resource. If the
* resource does not exist, this will return an empty set of permissions, not a
* `NOT_FOUND` error. Note: This operation is designed to be used for building
* permission-aware UIs and command-line tools, not for authorization checking.
* This operation may "fail open" without warning.
* (ekmConnections.testIamPermissions)
*
* @param string $resource REQUIRED: The resource for which the policy detail is
* being requested. See [Resource
* names](https://cloud.google.com/apis/design/resource_names) for the
* appropriate value for this field.
* @param TestIamPermissionsRequest $postBody
* @param array $optParams Optional parameters.
* @return TestIamPermissionsResponse
* @throws \Google\Service\Exception
*/
public function testIamPermissions($resource, TestIamPermissionsRequest $postBody, $optParams = [])
{
$params = ['resource' => $resource, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('testIamPermissions', [$params], TestIamPermissionsResponse::class);
}
/**
* Verifies that Cloud KMS can successfully connect to the external key manager
* specified by an EkmConnection. If there is an error connecting to the EKM,
* this method returns a FAILED_PRECONDITION status containing structured
* information as described at
* https://cloud.google.com/kms/docs/reference/ekm_errors.
* (ekmConnections.verifyConnectivity)
*
* @param string $name Required. The name of the EkmConnection to verify.
* @param array $optParams Optional parameters.
* @return VerifyConnectivityResponse
* @throws \Google\Service\Exception
*/
public function verifyConnectivity($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('verifyConnectivity', [$params], VerifyConnectivityResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocationsEkmConnections::class, 'Google_Service_CloudKMS_Resource_ProjectsLocationsEkmConnections');
@@ -0,0 +1,102 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS\Resource;
use Google\Service\CloudKMS\KeyHandle;
use Google\Service\CloudKMS\ListKeyHandlesResponse;
use Google\Service\CloudKMS\Operation;
/**
* The "keyHandles" collection of methods.
* Typical usage is:
* <code>
* $cloudkmsService = new Google\Service\CloudKMS(...);
* $keyHandles = $cloudkmsService->projects_locations_keyHandles;
* </code>
*/
class ProjectsLocationsKeyHandles extends \Google\Service\Resource
{
/**
* Creates a new KeyHandle, triggering the provisioning of a new CryptoKey for
* CMEK use with the given resource type in the configured key project and the
* same location. GetOperation should be used to resolve the resulting long-
* running operation and get the resulting KeyHandle and CryptoKey.
* (keyHandles.create)
*
* @param string $parent Required. Name of the resource project and location to
* create the KeyHandle in, e.g. `projects/{PROJECT_ID}/locations/{LOCATION}`.
* @param KeyHandle $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string keyHandleId Optional. Id of the KeyHandle. Must be unique
* to the resource project and location. If not provided by the caller, a new
* UUID is used.
* @return Operation
* @throws \Google\Service\Exception
*/
public function create($parent, KeyHandle $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], Operation::class);
}
/**
* Returns the KeyHandle. (keyHandles.get)
*
* @param string $name Required. Name of the KeyHandle resource, e.g.
* `projects/{PROJECT_ID}/locations/{LOCATION}/keyHandles/{KEY_HANDLE_ID}`.
* @param array $optParams Optional parameters.
* @return KeyHandle
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], KeyHandle::class);
}
/**
* Lists KeyHandles. (keyHandles.listProjectsLocationsKeyHandles)
*
* @param string $parent Required. Name of the resource project and location
* from which to list KeyHandles, e.g.
* `projects/{PROJECT_ID}/locations/{LOCATION}`.
* @param array $optParams Optional parameters.
*
* @opt_param string filter Optional. Filter to apply when listing KeyHandles,
* e.g. `resource_type_selector="{SERVICE}.googleapis.com/{TYPE}"`.
* @opt_param int pageSize Optional. Optional limit on the number of KeyHandles
* to include in the response. The service may return fewer than this value.
* Further KeyHandles can subsequently be obtained by including the
* ListKeyHandlesResponse.next_page_token in a subsequent request. If
* unspecified, at most 100 KeyHandles will be returned.
* @opt_param string pageToken Optional. Optional pagination token, returned
* earlier via ListKeyHandlesResponse.next_page_token.
* @return ListKeyHandlesResponse
* @throws \Google\Service\Exception
*/
public function listProjectsLocationsKeyHandles($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], ListKeyHandlesResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocationsKeyHandles::class, 'Google_Service_CloudKMS_Resource_ProjectsLocationsKeyHandles');
@@ -0,0 +1,175 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS\Resource;
use Google\Service\CloudKMS\KeyRing;
use Google\Service\CloudKMS\ListKeyRingsResponse;
use Google\Service\CloudKMS\Policy;
use Google\Service\CloudKMS\SetIamPolicyRequest;
use Google\Service\CloudKMS\TestIamPermissionsRequest;
use Google\Service\CloudKMS\TestIamPermissionsResponse;
/**
* The "keyRings" collection of methods.
* Typical usage is:
* <code>
* $cloudkmsService = new Google\Service\CloudKMS(...);
* $keyRings = $cloudkmsService->projects_locations_keyRings;
* </code>
*/
class ProjectsLocationsKeyRings extends \Google\Service\Resource
{
/**
* Create a new KeyRing in a given Project and Location. (keyRings.create)
*
* @param string $parent Required. The resource name of the location associated
* with the KeyRings, in the format `projects/locations`.
* @param KeyRing $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string keyRingId Required. It must be unique within a location and
* match the regular expression `[a-zA-Z0-9_-]{1,63}`
* @return KeyRing
* @throws \Google\Service\Exception
*/
public function create($parent, KeyRing $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], KeyRing::class);
}
/**
* Returns metadata for a given KeyRing. (keyRings.get)
*
* @param string $name Required. The name of the KeyRing to get.
* @param array $optParams Optional parameters.
* @return KeyRing
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], KeyRing::class);
}
/**
* Gets the access control policy for a resource. Returns an empty policy if the
* resource exists and does not have a policy set. (keyRings.getIamPolicy)
*
* @param string $resource REQUIRED: The resource for which the policy is being
* requested. See [Resource
* names](https://cloud.google.com/apis/design/resource_names) for the
* appropriate value for this field.
* @param array $optParams Optional parameters.
*
* @opt_param int options.requestedPolicyVersion Optional. The maximum policy
* version that will be used to format the policy. Valid values are 0, 1, and 3.
* Requests specifying an invalid value will be rejected. Requests for policies
* with any conditional role bindings must specify version 3. Policies with no
* conditional role bindings may specify any valid value or leave the field
* unset. The policy in the response might use the policy version that you
* specified, or it might use a lower policy version. For example, if you
* specify version 3, but the policy has no conditional role bindings, the
* response uses version 1. To learn which resources support conditions in their
* IAM policies, see the [IAM
* documentation](https://cloud.google.com/iam/help/conditions/resource-
* policies).
* @return Policy
* @throws \Google\Service\Exception
*/
public function getIamPolicy($resource, $optParams = [])
{
$params = ['resource' => $resource];
$params = array_merge($params, $optParams);
return $this->call('getIamPolicy', [$params], Policy::class);
}
/**
* Lists KeyRings. (keyRings.listProjectsLocationsKeyRings)
*
* @param string $parent Required. The resource name of the location associated
* with the KeyRings, in the format `projects/locations`.
* @param array $optParams Optional parameters.
*
* @opt_param string filter Optional. Only include resources that match the
* filter in the response. For more information, see [Sorting and filtering list
* results](https://cloud.google.com/kms/docs/sorting-and-filtering).
* @opt_param string orderBy Optional. Specify how the results should be sorted.
* If not specified, the results will be sorted in the default order. For more
* information, see [Sorting and filtering list
* results](https://cloud.google.com/kms/docs/sorting-and-filtering).
* @opt_param int pageSize Optional. Optional limit on the number of KeyRings to
* include in the response. Further KeyRings can subsequently be obtained by
* including the ListKeyRingsResponse.next_page_token in a subsequent request.
* If unspecified, the server will pick an appropriate default.
* @opt_param string pageToken Optional. Optional pagination token, returned
* earlier via ListKeyRingsResponse.next_page_token.
* @return ListKeyRingsResponse
* @throws \Google\Service\Exception
*/
public function listProjectsLocationsKeyRings($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], ListKeyRingsResponse::class);
}
/**
* Sets the access control policy on the specified resource. Replaces any
* existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and
* `PERMISSION_DENIED` errors. (keyRings.setIamPolicy)
*
* @param string $resource REQUIRED: The resource for which the policy is being
* specified. See [Resource
* names](https://cloud.google.com/apis/design/resource_names) for the
* appropriate value for this field.
* @param SetIamPolicyRequest $postBody
* @param array $optParams Optional parameters.
* @return Policy
* @throws \Google\Service\Exception
*/
public function setIamPolicy($resource, SetIamPolicyRequest $postBody, $optParams = [])
{
$params = ['resource' => $resource, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('setIamPolicy', [$params], Policy::class);
}
/**
* Returns permissions that a caller has on the specified resource. If the
* resource does not exist, this will return an empty set of permissions, not a
* `NOT_FOUND` error. Note: This operation is designed to be used for building
* permission-aware UIs and command-line tools, not for authorization checking.
* This operation may "fail open" without warning. (keyRings.testIamPermissions)
*
* @param string $resource REQUIRED: The resource for which the policy detail is
* being requested. See [Resource
* names](https://cloud.google.com/apis/design/resource_names) for the
* appropriate value for this field.
* @param TestIamPermissionsRequest $postBody
* @param array $optParams Optional parameters.
* @return TestIamPermissionsResponse
* @throws \Google\Service\Exception
*/
public function testIamPermissions($resource, TestIamPermissionsRequest $postBody, $optParams = [])
{
$params = ['resource' => $resource, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('testIamPermissions', [$params], TestIamPermissionsResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocationsKeyRings::class, 'Google_Service_CloudKMS_Resource_ProjectsLocationsKeyRings');
@@ -0,0 +1,279 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS\Resource;
use Google\Service\CloudKMS\CryptoKey;
use Google\Service\CloudKMS\DecryptRequest;
use Google\Service\CloudKMS\DecryptResponse;
use Google\Service\CloudKMS\EncryptRequest;
use Google\Service\CloudKMS\EncryptResponse;
use Google\Service\CloudKMS\ListCryptoKeysResponse;
use Google\Service\CloudKMS\Operation;
use Google\Service\CloudKMS\Policy;
use Google\Service\CloudKMS\SetIamPolicyRequest;
use Google\Service\CloudKMS\TestIamPermissionsRequest;
use Google\Service\CloudKMS\TestIamPermissionsResponse;
use Google\Service\CloudKMS\UpdateCryptoKeyPrimaryVersionRequest;
/**
* The "cryptoKeys" collection of methods.
* Typical usage is:
* <code>
* $cloudkmsService = new Google\Service\CloudKMS(...);
* $cryptoKeys = $cloudkmsService->projects_locations_keyRings_cryptoKeys;
* </code>
*/
class ProjectsLocationsKeyRingsCryptoKeys extends \Google\Service\Resource
{
/**
* Create a new CryptoKey within a KeyRing. CryptoKey.purpose and
* CryptoKey.version_template.algorithm are required. (cryptoKeys.create)
*
* @param string $parent Required. The name of the KeyRing associated with the
* CryptoKeys.
* @param CryptoKey $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string cryptoKeyId Required. It must be unique within a KeyRing
* and match the regular expression `[a-zA-Z0-9_-]{1,63}`
* @opt_param bool skipInitialVersionCreation If set to true, the request will
* create a CryptoKey without any CryptoKeyVersions. You must manually call
* CreateCryptoKeyVersion or ImportCryptoKeyVersion before you can use this
* CryptoKey.
* @return CryptoKey
* @throws \Google\Service\Exception
*/
public function create($parent, CryptoKey $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], CryptoKey::class);
}
/**
* Decrypts data that was protected by Encrypt. The CryptoKey.purpose must be
* ENCRYPT_DECRYPT. (cryptoKeys.decrypt)
*
* @param string $name Required. The resource name of the CryptoKey to use for
* decryption. The server will choose the appropriate version.
* @param DecryptRequest $postBody
* @param array $optParams Optional parameters.
* @return DecryptResponse
* @throws \Google\Service\Exception
*/
public function decrypt($name, DecryptRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('decrypt', [$params], DecryptResponse::class);
}
/**
* Permanently deletes the given CryptoKey. All child CryptoKeyVersions must
* have been previously deleted using
* KeyManagementService.DeleteCryptoKeyVersion. The specified crypto key will be
* immediately and permanently deleted upon calling this method. This action
* cannot be undone. (cryptoKeys.delete)
*
* @param string $name Required. The name of the CryptoKey to delete.
* @param array $optParams Optional parameters.
* @return Operation
* @throws \Google\Service\Exception
*/
public function delete($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('delete', [$params], Operation::class);
}
/**
* Encrypts data, so that it can only be recovered by a call to Decrypt. The
* CryptoKey.purpose must be ENCRYPT_DECRYPT. (cryptoKeys.encrypt)
*
* @param string $name Required. The resource name of the CryptoKey or
* CryptoKeyVersion to use for encryption. If a CryptoKey is specified, the
* server will use its primary version.
* @param EncryptRequest $postBody
* @param array $optParams Optional parameters.
* @return EncryptResponse
* @throws \Google\Service\Exception
*/
public function encrypt($name, EncryptRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('encrypt', [$params], EncryptResponse::class);
}
/**
* Returns metadata for a given CryptoKey, as well as its primary
* CryptoKeyVersion. (cryptoKeys.get)
*
* @param string $name Required. The name of the CryptoKey to get.
* @param array $optParams Optional parameters.
* @return CryptoKey
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], CryptoKey::class);
}
/**
* Gets the access control policy for a resource. Returns an empty policy if the
* resource exists and does not have a policy set. (cryptoKeys.getIamPolicy)
*
* @param string $resource REQUIRED: The resource for which the policy is being
* requested. See [Resource
* names](https://cloud.google.com/apis/design/resource_names) for the
* appropriate value for this field.
* @param array $optParams Optional parameters.
*
* @opt_param int options.requestedPolicyVersion Optional. The maximum policy
* version that will be used to format the policy. Valid values are 0, 1, and 3.
* Requests specifying an invalid value will be rejected. Requests for policies
* with any conditional role bindings must specify version 3. Policies with no
* conditional role bindings may specify any valid value or leave the field
* unset. The policy in the response might use the policy version that you
* specified, or it might use a lower policy version. For example, if you
* specify version 3, but the policy has no conditional role bindings, the
* response uses version 1. To learn which resources support conditions in their
* IAM policies, see the [IAM
* documentation](https://cloud.google.com/iam/help/conditions/resource-
* policies).
* @return Policy
* @throws \Google\Service\Exception
*/
public function getIamPolicy($resource, $optParams = [])
{
$params = ['resource' => $resource];
$params = array_merge($params, $optParams);
return $this->call('getIamPolicy', [$params], Policy::class);
}
/**
* Lists CryptoKeys. (cryptoKeys.listProjectsLocationsKeyRingsCryptoKeys)
*
* @param string $parent Required. The resource name of the KeyRing to list, in
* the format `projects/locations/keyRings`.
* @param array $optParams Optional parameters.
*
* @opt_param string filter Optional. Only include resources that match the
* filter in the response. For more information, see [Sorting and filtering list
* results](https://cloud.google.com/kms/docs/sorting-and-filtering).
* @opt_param string orderBy Optional. Specify how the results should be sorted.
* If not specified, the results will be sorted in the default order. For more
* information, see [Sorting and filtering list
* results](https://cloud.google.com/kms/docs/sorting-and-filtering).
* @opt_param int pageSize Optional. Optional limit on the number of CryptoKeys
* to include in the response. Further CryptoKeys can subsequently be obtained
* by including the ListCryptoKeysResponse.next_page_token in a subsequent
* request. If unspecified, the server will pick an appropriate default.
* @opt_param string pageToken Optional. Optional pagination token, returned
* earlier via ListCryptoKeysResponse.next_page_token.
* @opt_param string versionView The fields of the primary version to include in
* the response.
* @return ListCryptoKeysResponse
* @throws \Google\Service\Exception
*/
public function listProjectsLocationsKeyRingsCryptoKeys($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], ListCryptoKeysResponse::class);
}
/**
* Update a CryptoKey. (cryptoKeys.patch)
*
* @param string $name Output only. The resource name for this CryptoKey in the
* format `projects/locations/keyRings/cryptoKeys`.
* @param CryptoKey $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string updateMask Required. List of fields to be updated in this
* request.
* @return CryptoKey
* @throws \Google\Service\Exception
*/
public function patch($name, CryptoKey $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('patch', [$params], CryptoKey::class);
}
/**
* Sets the access control policy on the specified resource. Replaces any
* existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and
* `PERMISSION_DENIED` errors. (cryptoKeys.setIamPolicy)
*
* @param string $resource REQUIRED: The resource for which the policy is being
* specified. See [Resource
* names](https://cloud.google.com/apis/design/resource_names) for the
* appropriate value for this field.
* @param SetIamPolicyRequest $postBody
* @param array $optParams Optional parameters.
* @return Policy
* @throws \Google\Service\Exception
*/
public function setIamPolicy($resource, SetIamPolicyRequest $postBody, $optParams = [])
{
$params = ['resource' => $resource, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('setIamPolicy', [$params], Policy::class);
}
/**
* Returns permissions that a caller has on the specified resource. If the
* resource does not exist, this will return an empty set of permissions, not a
* `NOT_FOUND` error. Note: This operation is designed to be used for building
* permission-aware UIs and command-line tools, not for authorization checking.
* This operation may "fail open" without warning.
* (cryptoKeys.testIamPermissions)
*
* @param string $resource REQUIRED: The resource for which the policy detail is
* being requested. See [Resource
* names](https://cloud.google.com/apis/design/resource_names) for the
* appropriate value for this field.
* @param TestIamPermissionsRequest $postBody
* @param array $optParams Optional parameters.
* @return TestIamPermissionsResponse
* @throws \Google\Service\Exception
*/
public function testIamPermissions($resource, TestIamPermissionsRequest $postBody, $optParams = [])
{
$params = ['resource' => $resource, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('testIamPermissions', [$params], TestIamPermissionsResponse::class);
}
/**
* Update the version of a CryptoKey that will be used in Encrypt. Returns an
* error if called on a key whose purpose is not ENCRYPT_DECRYPT.
* (cryptoKeys.updatePrimaryVersion)
*
* @param string $name Required. The resource name of the CryptoKey to update.
* @param UpdateCryptoKeyPrimaryVersionRequest $postBody
* @param array $optParams Optional parameters.
* @return CryptoKey
* @throws \Google\Service\Exception
*/
public function updatePrimaryVersion($name, UpdateCryptoKeyPrimaryVersionRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('updatePrimaryVersion', [$params], CryptoKey::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocationsKeyRingsCryptoKeys::class, 'Google_Service_CloudKMS_Resource_ProjectsLocationsKeyRingsCryptoKeys');
@@ -0,0 +1,370 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS\Resource;
use Google\Service\CloudKMS\AsymmetricDecryptRequest;
use Google\Service\CloudKMS\AsymmetricDecryptResponse;
use Google\Service\CloudKMS\AsymmetricSignRequest;
use Google\Service\CloudKMS\AsymmetricSignResponse;
use Google\Service\CloudKMS\CryptoKeyVersion;
use Google\Service\CloudKMS\DecapsulateRequest;
use Google\Service\CloudKMS\DecapsulateResponse;
use Google\Service\CloudKMS\DestroyCryptoKeyVersionRequest;
use Google\Service\CloudKMS\ImportCryptoKeyVersionRequest;
use Google\Service\CloudKMS\ListCryptoKeyVersionsResponse;
use Google\Service\CloudKMS\MacSignRequest;
use Google\Service\CloudKMS\MacSignResponse;
use Google\Service\CloudKMS\MacVerifyRequest;
use Google\Service\CloudKMS\MacVerifyResponse;
use Google\Service\CloudKMS\Operation;
use Google\Service\CloudKMS\PublicKey;
use Google\Service\CloudKMS\RawDecryptRequest;
use Google\Service\CloudKMS\RawDecryptResponse;
use Google\Service\CloudKMS\RawEncryptRequest;
use Google\Service\CloudKMS\RawEncryptResponse;
use Google\Service\CloudKMS\RestoreCryptoKeyVersionRequest;
/**
* The "cryptoKeyVersions" collection of methods.
* Typical usage is:
* <code>
* $cloudkmsService = new Google\Service\CloudKMS(...);
* $cryptoKeyVersions = $cloudkmsService->projects_locations_keyRings_cryptoKeys_cryptoKeyVersions;
* </code>
*/
class ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersions extends \Google\Service\Resource
{
/**
* Decrypts data that was encrypted with a public key retrieved from
* GetPublicKey corresponding to a CryptoKeyVersion with CryptoKey.purpose
* ASYMMETRIC_DECRYPT. (cryptoKeyVersions.asymmetricDecrypt)
*
* @param string $name Required. The resource name of the CryptoKeyVersion to
* use for decryption.
* @param AsymmetricDecryptRequest $postBody
* @param array $optParams Optional parameters.
* @return AsymmetricDecryptResponse
* @throws \Google\Service\Exception
*/
public function asymmetricDecrypt($name, AsymmetricDecryptRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('asymmetricDecrypt', [$params], AsymmetricDecryptResponse::class);
}
/**
* Signs data using a CryptoKeyVersion with CryptoKey.purpose ASYMMETRIC_SIGN,
* producing a signature that can be verified with the public key retrieved from
* GetPublicKey. (cryptoKeyVersions.asymmetricSign)
*
* @param string $name Required. The resource name of the CryptoKeyVersion to
* use for signing.
* @param AsymmetricSignRequest $postBody
* @param array $optParams Optional parameters.
* @return AsymmetricSignResponse
* @throws \Google\Service\Exception
*/
public function asymmetricSign($name, AsymmetricSignRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('asymmetricSign', [$params], AsymmetricSignResponse::class);
}
/**
* Create a new CryptoKeyVersion in a CryptoKey. The server will assign the next
* sequential id. If unset, state will be set to ENABLED.
* (cryptoKeyVersions.create)
*
* @param string $parent Required. The name of the CryptoKey associated with the
* CryptoKeyVersions.
* @param CryptoKeyVersion $postBody
* @param array $optParams Optional parameters.
* @return CryptoKeyVersion
* @throws \Google\Service\Exception
*/
public function create($parent, CryptoKeyVersion $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], CryptoKeyVersion::class);
}
/**
* Decapsulates data that was encapsulated with a public key retrieved from
* GetPublicKey corresponding to a CryptoKeyVersion with CryptoKey.purpose
* KEY_ENCAPSULATION. (cryptoKeyVersions.decapsulate)
*
* @param string $name Required. The resource name of the CryptoKeyVersion to
* use for decapsulation.
* @param DecapsulateRequest $postBody
* @param array $optParams Optional parameters.
* @return DecapsulateResponse
* @throws \Google\Service\Exception
*/
public function decapsulate($name, DecapsulateRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('decapsulate', [$params], DecapsulateResponse::class);
}
/**
* Permanently deletes the given CryptoKeyVersion. Only possible if the version
* has not been previously imported and if its state is one of DESTROYED,
* IMPORT_FAILED, or GENERATION_FAILED. Successfully imported CryptoKeyVersions
* cannot be deleted at this time. The specified version will be immediately and
* permanently deleted upon calling this method. This action cannot be undone.
* (cryptoKeyVersions.delete)
*
* @param string $name Required. The name of the CryptoKeyVersion to delete.
* @param array $optParams Optional parameters.
* @return Operation
* @throws \Google\Service\Exception
*/
public function delete($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('delete', [$params], Operation::class);
}
/**
* Schedule a CryptoKeyVersion for destruction. Upon calling this method,
* CryptoKeyVersion.state will be set to DESTROY_SCHEDULED, and destroy_time
* will be set to the time destroy_scheduled_duration in the future. At that
* time, the state will automatically change to DESTROYED, and the key material
* will be irrevocably destroyed. Before the destroy_time is reached,
* RestoreCryptoKeyVersion may be called to reverse the process.
* (cryptoKeyVersions.destroy)
*
* @param string $name Required. The resource name of the CryptoKeyVersion to
* destroy.
* @param DestroyCryptoKeyVersionRequest $postBody
* @param array $optParams Optional parameters.
* @return CryptoKeyVersion
* @throws \Google\Service\Exception
*/
public function destroy($name, DestroyCryptoKeyVersionRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('destroy', [$params], CryptoKeyVersion::class);
}
/**
* Returns metadata for a given CryptoKeyVersion. (cryptoKeyVersions.get)
*
* @param string $name Required. The name of the CryptoKeyVersion to get.
* @param array $optParams Optional parameters.
* @return CryptoKeyVersion
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], CryptoKeyVersion::class);
}
/**
* Returns the public key for the given CryptoKeyVersion. The CryptoKey.purpose
* must be ASYMMETRIC_SIGN or ASYMMETRIC_DECRYPT.
* (cryptoKeyVersions.getPublicKey)
*
* @param string $name Required. The name of the CryptoKeyVersion public key to
* get.
* @param array $optParams Optional parameters.
*
* @opt_param string publicKeyFormat Optional. The PublicKey format specified by
* the user. This field is required for PQC algorithms. If specified, the public
* key will be exported through the public_key field in the requested format.
* Otherwise, the pem field will be populated for non-PQC algorithms, and an
* error will be returned for PQC algorithms.
* @return PublicKey
* @throws \Google\Service\Exception
*/
public function getPublicKey($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('getPublicKey', [$params], PublicKey::class);
}
/**
* Import wrapped key material into a CryptoKeyVersion. All requests must
* specify a CryptoKey. If a CryptoKeyVersion is additionally specified in the
* request, key material will be reimported into that version. Otherwise, a new
* version will be created, and will be assigned the next sequential id within
* the CryptoKey. (cryptoKeyVersions.import)
*
* @param string $parent Required. The name of the CryptoKey to be imported
* into. The create permission is only required on this key when creating a new
* CryptoKeyVersion.
* @param ImportCryptoKeyVersionRequest $postBody
* @param array $optParams Optional parameters.
* @return CryptoKeyVersion
* @throws \Google\Service\Exception
*/
public function import($parent, ImportCryptoKeyVersionRequest $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('import', [$params], CryptoKeyVersion::class);
}
/**
* Lists CryptoKeyVersions.
* (cryptoKeyVersions.listProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersions)
*
* @param string $parent Required. The resource name of the CryptoKey to list,
* in the format `projects/locations/keyRings/cryptoKeys`.
* @param array $optParams Optional parameters.
*
* @opt_param string filter Optional. Only include resources that match the
* filter in the response. For more information, see [Sorting and filtering list
* results](https://cloud.google.com/kms/docs/sorting-and-filtering).
* @opt_param string orderBy Optional. Specify how the results should be sorted.
* If not specified, the results will be sorted in the default order. For more
* information, see [Sorting and filtering list
* results](https://cloud.google.com/kms/docs/sorting-and-filtering).
* @opt_param int pageSize Optional. Optional limit on the number of
* CryptoKeyVersions to include in the response. Further CryptoKeyVersions can
* subsequently be obtained by including the
* ListCryptoKeyVersionsResponse.next_page_token in a subsequent request. If
* unspecified, the server will pick an appropriate default.
* @opt_param string pageToken Optional. Optional pagination token, returned
* earlier via ListCryptoKeyVersionsResponse.next_page_token.
* @opt_param string view The fields to include in the response.
* @return ListCryptoKeyVersionsResponse
* @throws \Google\Service\Exception
*/
public function listProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersions($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], ListCryptoKeyVersionsResponse::class);
}
/**
* Signs data using a CryptoKeyVersion with CryptoKey.purpose MAC, producing a
* tag that can be verified by another source with the same key.
* (cryptoKeyVersions.macSign)
*
* @param string $name Required. The resource name of the CryptoKeyVersion to
* use for signing.
* @param MacSignRequest $postBody
* @param array $optParams Optional parameters.
* @return MacSignResponse
* @throws \Google\Service\Exception
*/
public function macSign($name, MacSignRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('macSign', [$params], MacSignResponse::class);
}
/**
* Verifies MAC tag using a CryptoKeyVersion with CryptoKey.purpose MAC, and
* returns a response that indicates whether or not the verification was
* successful. (cryptoKeyVersions.macVerify)
*
* @param string $name Required. The resource name of the CryptoKeyVersion to
* use for verification.
* @param MacVerifyRequest $postBody
* @param array $optParams Optional parameters.
* @return MacVerifyResponse
* @throws \Google\Service\Exception
*/
public function macVerify($name, MacVerifyRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('macVerify', [$params], MacVerifyResponse::class);
}
/**
* Update a CryptoKeyVersion's metadata. state may be changed between ENABLED
* and DISABLED using this method. See DestroyCryptoKeyVersion and
* RestoreCryptoKeyVersion to move between other states.
* (cryptoKeyVersions.patch)
*
* @param string $name Output only. The resource name for this CryptoKeyVersion
* in the format `projects/locations/keyRings/cryptoKeys/cryptoKeyVersions`.
* @param CryptoKeyVersion $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string updateMask Required. List of fields to be updated in this
* request.
* @return CryptoKeyVersion
* @throws \Google\Service\Exception
*/
public function patch($name, CryptoKeyVersion $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('patch', [$params], CryptoKeyVersion::class);
}
/**
* Decrypts data that was originally encrypted using a raw cryptographic
* mechanism. The CryptoKey.purpose must be RAW_ENCRYPT_DECRYPT.
* (cryptoKeyVersions.rawDecrypt)
*
* @param string $name Required. The resource name of the CryptoKeyVersion to
* use for decryption.
* @param RawDecryptRequest $postBody
* @param array $optParams Optional parameters.
* @return RawDecryptResponse
* @throws \Google\Service\Exception
*/
public function rawDecrypt($name, RawDecryptRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('rawDecrypt', [$params], RawDecryptResponse::class);
}
/**
* Encrypts data using portable cryptographic primitives. Most users should
* choose Encrypt and Decrypt rather than their raw counterparts. The
* CryptoKey.purpose must be RAW_ENCRYPT_DECRYPT. (cryptoKeyVersions.rawEncrypt)
*
* @param string $name Required. The resource name of the CryptoKeyVersion to
* use for encryption.
* @param RawEncryptRequest $postBody
* @param array $optParams Optional parameters.
* @return RawEncryptResponse
* @throws \Google\Service\Exception
*/
public function rawEncrypt($name, RawEncryptRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('rawEncrypt', [$params], RawEncryptResponse::class);
}
/**
* Restore a CryptoKeyVersion in the DESTROY_SCHEDULED state. Upon restoration
* of the CryptoKeyVersion, state will be set to DISABLED, and destroy_time will
* be cleared. (cryptoKeyVersions.restore)
*
* @param string $name Required. The resource name of the CryptoKeyVersion to
* restore.
* @param RestoreCryptoKeyVersionRequest $postBody
* @param array $optParams Optional parameters.
* @return CryptoKeyVersion
* @throws \Google\Service\Exception
*/
public function restore($name, RestoreCryptoKeyVersionRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('restore', [$params], CryptoKeyVersion::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersions::class, 'Google_Service_CloudKMS_Resource_ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersions');
@@ -0,0 +1,185 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS\Resource;
use Google\Service\CloudKMS\ImportJob;
use Google\Service\CloudKMS\ListImportJobsResponse;
use Google\Service\CloudKMS\Policy;
use Google\Service\CloudKMS\SetIamPolicyRequest;
use Google\Service\CloudKMS\TestIamPermissionsRequest;
use Google\Service\CloudKMS\TestIamPermissionsResponse;
/**
* The "importJobs" collection of methods.
* Typical usage is:
* <code>
* $cloudkmsService = new Google\Service\CloudKMS(...);
* $importJobs = $cloudkmsService->projects_locations_keyRings_importJobs;
* </code>
*/
class ProjectsLocationsKeyRingsImportJobs extends \Google\Service\Resource
{
/**
* Create a new ImportJob within a KeyRing. ImportJob.import_method is required.
* (importJobs.create)
*
* @param string $parent Required. The name of the KeyRing associated with the
* ImportJobs.
* @param ImportJob $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string importJobId Required. It must be unique within a KeyRing
* and match the regular expression `[a-zA-Z0-9_-]{1,63}`
* @return ImportJob
* @throws \Google\Service\Exception
*/
public function create($parent, ImportJob $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], ImportJob::class);
}
/**
* Returns metadata for a given ImportJob. (importJobs.get)
*
* @param string $name Required. The name of the ImportJob to get.
* @param array $optParams Optional parameters.
*
* @opt_param string publicKeyFormat Optional. Specifies the WrappingPublicKey
* format. If not specified: * For RSA-based import methods, the wrapping key
* will be returned in PEM format * For pure ML-KEM-based import methods, the
* wrapping key will be returned in the raw bytes format specified in FIPS-203 *
* For X-Wing-based import methods, the wrapping key will be returned in the raw
* bytes format specified in https://datatracker.ietf.org/doc/draft-connolly-
* cfrg-xwing-kem.
* @return ImportJob
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], ImportJob::class);
}
/**
* Gets the access control policy for a resource. Returns an empty policy if the
* resource exists and does not have a policy set. (importJobs.getIamPolicy)
*
* @param string $resource REQUIRED: The resource for which the policy is being
* requested. See [Resource
* names](https://cloud.google.com/apis/design/resource_names) for the
* appropriate value for this field.
* @param array $optParams Optional parameters.
*
* @opt_param int options.requestedPolicyVersion Optional. The maximum policy
* version that will be used to format the policy. Valid values are 0, 1, and 3.
* Requests specifying an invalid value will be rejected. Requests for policies
* with any conditional role bindings must specify version 3. Policies with no
* conditional role bindings may specify any valid value or leave the field
* unset. The policy in the response might use the policy version that you
* specified, or it might use a lower policy version. For example, if you
* specify version 3, but the policy has no conditional role bindings, the
* response uses version 1. To learn which resources support conditions in their
* IAM policies, see the [IAM
* documentation](https://cloud.google.com/iam/help/conditions/resource-
* policies).
* @return Policy
* @throws \Google\Service\Exception
*/
public function getIamPolicy($resource, $optParams = [])
{
$params = ['resource' => $resource];
$params = array_merge($params, $optParams);
return $this->call('getIamPolicy', [$params], Policy::class);
}
/**
* Lists ImportJobs. (importJobs.listProjectsLocationsKeyRingsImportJobs)
*
* @param string $parent Required. The resource name of the KeyRing to list, in
* the format `projects/locations/keyRings`.
* @param array $optParams Optional parameters.
*
* @opt_param string filter Optional. Only include resources that match the
* filter in the response. For more information, see [Sorting and filtering list
* results](https://cloud.google.com/kms/docs/sorting-and-filtering).
* @opt_param string orderBy Optional. Specify how the results should be sorted.
* If not specified, the results will be sorted in the default order. For more
* information, see [Sorting and filtering list
* results](https://cloud.google.com/kms/docs/sorting-and-filtering).
* @opt_param int pageSize Optional. Optional limit on the number of ImportJobs
* to include in the response. Further ImportJobs can subsequently be obtained
* by including the ListImportJobsResponse.next_page_token in a subsequent
* request. If unspecified, the server will pick an appropriate default.
* @opt_param string pageToken Optional. Optional pagination token, returned
* earlier via ListImportJobsResponse.next_page_token.
* @return ListImportJobsResponse
* @throws \Google\Service\Exception
*/
public function listProjectsLocationsKeyRingsImportJobs($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], ListImportJobsResponse::class);
}
/**
* Sets the access control policy on the specified resource. Replaces any
* existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and
* `PERMISSION_DENIED` errors. (importJobs.setIamPolicy)
*
* @param string $resource REQUIRED: The resource for which the policy is being
* specified. See [Resource
* names](https://cloud.google.com/apis/design/resource_names) for the
* appropriate value for this field.
* @param SetIamPolicyRequest $postBody
* @param array $optParams Optional parameters.
* @return Policy
* @throws \Google\Service\Exception
*/
public function setIamPolicy($resource, SetIamPolicyRequest $postBody, $optParams = [])
{
$params = ['resource' => $resource, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('setIamPolicy', [$params], Policy::class);
}
/**
* Returns permissions that a caller has on the specified resource. If the
* resource does not exist, this will return an empty set of permissions, not a
* `NOT_FOUND` error. Note: This operation is designed to be used for building
* permission-aware UIs and command-line tools, not for authorization checking.
* This operation may "fail open" without warning.
* (importJobs.testIamPermissions)
*
* @param string $resource REQUIRED: The resource for which the policy detail is
* being requested. See [Resource
* names](https://cloud.google.com/apis/design/resource_names) for the
* appropriate value for this field.
* @param TestIamPermissionsRequest $postBody
* @param array $optParams Optional parameters.
* @return TestIamPermissionsResponse
* @throws \Google\Service\Exception
*/
public function testIamPermissions($resource, TestIamPermissionsRequest $postBody, $optParams = [])
{
$params = ['resource' => $resource, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('testIamPermissions', [$params], TestIamPermissionsResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocationsKeyRingsImportJobs::class, 'Google_Service_CloudKMS_Resource_ProjectsLocationsKeyRingsImportJobs');
@@ -0,0 +1,51 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS\Resource;
use Google\Service\CloudKMS\Operation;
/**
* The "operations" collection of methods.
* Typical usage is:
* <code>
* $cloudkmsService = new Google\Service\CloudKMS(...);
* $operations = $cloudkmsService->projects_locations_operations;
* </code>
*/
class ProjectsLocationsOperations extends \Google\Service\Resource
{
/**
* Gets the latest state of a long-running operation. Clients can use this
* method to poll the operation result at intervals as recommended by the API
* service. (operations.get)
*
* @param string $name The name of the operation resource.
* @param array $optParams Optional parameters.
* @return Operation
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], Operation::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocationsOperations::class, 'Google_Service_CloudKMS_Resource_ProjectsLocationsOperations');
@@ -0,0 +1,76 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS\Resource;
use Google\Service\CloudKMS\ListRetiredResourcesResponse;
use Google\Service\CloudKMS\RetiredResource;
/**
* The "retiredResources" collection of methods.
* Typical usage is:
* <code>
* $cloudkmsService = new Google\Service\CloudKMS(...);
* $retiredResources = $cloudkmsService->projects_locations_retiredResources;
* </code>
*/
class ProjectsLocationsRetiredResources extends \Google\Service\Resource
{
/**
* Retrieves a specific RetiredResource resource, which represents the record of
* a deleted CryptoKey. (retiredResources.get)
*
* @param string $name Required. The name of the RetiredResource to get.
* @param array $optParams Optional parameters.
* @return RetiredResource
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], RetiredResource::class);
}
/**
* Lists the RetiredResources which are the records of deleted CryptoKeys.
* RetiredResources prevent the reuse of these resource names after deletion.
* (retiredResources.listProjectsLocationsRetiredResources)
*
* @param string $parent Required. The project-specific location holding the
* RetiredResources, in the format `projects/locations`.
* @param array $optParams Optional parameters.
*
* @opt_param int pageSize Optional. Optional limit on the number of
* RetiredResources to be included in the response. Further RetiredResources can
* subsequently be obtained by including the
* ListRetiredResourcesResponse.next_page_token in a subsequent request. If
* unspecified, the server will pick an appropriate default.
* @opt_param string pageToken Optional. Optional pagination token, returned
* earlier via ListRetiredResourcesResponse.next_page_token.
* @return ListRetiredResourcesResponse
* @throws \Google\Service\Exception
*/
public function listProjectsLocationsRetiredResources($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], ListRetiredResourcesResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocationsRetiredResources::class, 'Google_Service_CloudKMS_Resource_ProjectsLocationsRetiredResources');
@@ -0,0 +1,108 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS\Resource;
use Google\Service\CloudKMS\ListSingleTenantHsmInstancesResponse;
use Google\Service\CloudKMS\Operation;
use Google\Service\CloudKMS\SingleTenantHsmInstance;
/**
* The "singleTenantHsmInstances" collection of methods.
* Typical usage is:
* <code>
* $cloudkmsService = new Google\Service\CloudKMS(...);
* $singleTenantHsmInstances = $cloudkmsService->projects_locations_singleTenantHsmInstances;
* </code>
*/
class ProjectsLocationsSingleTenantHsmInstances extends \Google\Service\Resource
{
/**
* Creates a new SingleTenantHsmInstance in a given Project and Location. User
* must create a RegisterTwoFactorAuthKeys proposal with this single-tenant HSM
* instance to finish setup of the instance. (singleTenantHsmInstances.create)
*
* @param string $parent Required. The resource name of the location associated
* with the SingleTenantHsmInstance, in the format `projects/locations`.
* @param SingleTenantHsmInstance $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string singleTenantHsmInstanceId Optional. It must be unique
* within a location and match the regular expression `[a-zA-Z0-9_-]{1,63}`.
* @return Operation
* @throws \Google\Service\Exception
*/
public function create($parent, SingleTenantHsmInstance $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], Operation::class);
}
/**
* Returns metadata for a given SingleTenantHsmInstance.
* (singleTenantHsmInstances.get)
*
* @param string $name Required. The name of the SingleTenantHsmInstance to get.
* @param array $optParams Optional parameters.
* @return SingleTenantHsmInstance
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], SingleTenantHsmInstance::class);
}
/**
* Lists SingleTenantHsmInstances.
* (singleTenantHsmInstances.listProjectsLocationsSingleTenantHsmInstances)
*
* @param string $parent Required. The resource name of the location associated
* with the SingleTenantHsmInstances to list, in the format
* `projects/locations`.
* @param array $optParams Optional parameters.
*
* @opt_param string filter Optional. Only include resources that match the
* filter in the response. For more information, see [Sorting and filtering list
* results](https://cloud.google.com/kms/docs/sorting-and-filtering).
* @opt_param string orderBy Optional. Specify how the results should be sorted.
* If not specified, the results will be sorted in the default order. For more
* information, see [Sorting and filtering list
* results](https://cloud.google.com/kms/docs/sorting-and-filtering).
* @opt_param int pageSize Optional. Optional limit on the number of
* SingleTenantHsmInstances to include in the response. Further
* SingleTenantHsmInstances can subsequently be obtained by including the
* ListSingleTenantHsmInstancesResponse.next_page_token in a subsequent request.
* If unspecified, the server will pick an appropriate default.
* @opt_param string pageToken Optional. Optional pagination token, returned
* earlier via ListSingleTenantHsmInstancesResponse.next_page_token.
* @opt_param bool showDeleted Optional. If set to true,
* HsmManagement.ListSingleTenantHsmInstances will also return
* SingleTenantHsmInstances in DELETED state.
* @return ListSingleTenantHsmInstancesResponse
* @throws \Google\Service\Exception
*/
public function listProjectsLocationsSingleTenantHsmInstances($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], ListSingleTenantHsmInstancesResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocationsSingleTenantHsmInstances::class, 'Google_Service_CloudKMS_Resource_ProjectsLocationsSingleTenantHsmInstances');
@@ -0,0 +1,164 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS\Resource;
use Google\Service\CloudKMS\ApproveSingleTenantHsmInstanceProposalRequest;
use Google\Service\CloudKMS\ApproveSingleTenantHsmInstanceProposalResponse;
use Google\Service\CloudKMS\CloudkmsEmpty;
use Google\Service\CloudKMS\ExecuteSingleTenantHsmInstanceProposalRequest;
use Google\Service\CloudKMS\ListSingleTenantHsmInstanceProposalsResponse;
use Google\Service\CloudKMS\Operation;
use Google\Service\CloudKMS\SingleTenantHsmInstanceProposal;
/**
* The "proposals" collection of methods.
* Typical usage is:
* <code>
* $cloudkmsService = new Google\Service\CloudKMS(...);
* $proposals = $cloudkmsService->projects_locations_singleTenantHsmInstances_proposals;
* </code>
*/
class ProjectsLocationsSingleTenantHsmInstancesProposals extends \Google\Service\Resource
{
/**
* Approves a SingleTenantHsmInstanceProposal for a given
* SingleTenantHsmInstance. The proposal must be in the PENDING state.
* (proposals.approve)
*
* @param string $name Required. The name of the SingleTenantHsmInstanceProposal
* to approve.
* @param ApproveSingleTenantHsmInstanceProposalRequest $postBody
* @param array $optParams Optional parameters.
* @return ApproveSingleTenantHsmInstanceProposalResponse
* @throws \Google\Service\Exception
*/
public function approve($name, ApproveSingleTenantHsmInstanceProposalRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('approve', [$params], ApproveSingleTenantHsmInstanceProposalResponse::class);
}
/**
* Creates a new SingleTenantHsmInstanceProposal for a given
* SingleTenantHsmInstance. (proposals.create)
*
* @param string $parent Required. The name of the SingleTenantHsmInstance
* associated with the SingleTenantHsmInstanceProposals.
* @param SingleTenantHsmInstanceProposal $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string singleTenantHsmInstanceProposalId Optional. It must be
* unique within a location and match the regular expression
* `[a-zA-Z0-9_-]{1,63}`.
* @return Operation
* @throws \Google\Service\Exception
*/
public function create($parent, SingleTenantHsmInstanceProposal $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], Operation::class);
}
/**
* Deletes a SingleTenantHsmInstanceProposal. (proposals.delete)
*
* @param string $name Required. The name of the SingleTenantHsmInstanceProposal
* to delete.
* @param array $optParams Optional parameters.
* @return CloudkmsEmpty
* @throws \Google\Service\Exception
*/
public function delete($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('delete', [$params], CloudkmsEmpty::class);
}
/**
* Executes a SingleTenantHsmInstanceProposal for a given
* SingleTenantHsmInstance. The proposal must be in the APPROVED state.
* (proposals.execute)
*
* @param string $name Required. The name of the SingleTenantHsmInstanceProposal
* to execute.
* @param ExecuteSingleTenantHsmInstanceProposalRequest $postBody
* @param array $optParams Optional parameters.
* @return Operation
* @throws \Google\Service\Exception
*/
public function execute($name, ExecuteSingleTenantHsmInstanceProposalRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('execute', [$params], Operation::class);
}
/**
* Returns metadata for a given SingleTenantHsmInstanceProposal. (proposals.get)
*
* @param string $name Required. The name of the SingleTenantHsmInstanceProposal
* to get.
* @param array $optParams Optional parameters.
* @return SingleTenantHsmInstanceProposal
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], SingleTenantHsmInstanceProposal::class);
}
/**
* Lists SingleTenantHsmInstanceProposals.
* (proposals.listProjectsLocationsSingleTenantHsmInstancesProposals)
*
* @param string $parent Required. The resource name of the single tenant HSM
* instance associated with the SingleTenantHsmInstanceProposals to list, in the
* format `projects/locations/singleTenantHsmInstances`.
* @param array $optParams Optional parameters.
*
* @opt_param string filter Optional. Only include resources that match the
* filter in the response. For more information, see [Sorting and filtering list
* results](https://cloud.google.com/kms/docs/sorting-and-filtering).
* @opt_param string orderBy Optional. Specify how the results should be sorted.
* If not specified, the results will be sorted in the default order. For more
* information, see [Sorting and filtering list
* results](https://cloud.google.com/kms/docs/sorting-and-filtering).
* @opt_param int pageSize Optional. Optional limit on the number of
* SingleTenantHsmInstanceProposals to include in the response. Further
* SingleTenantHsmInstanceProposals can subsequently be obtained by including
* the ListSingleTenantHsmInstanceProposalsResponse.next_page_token in a
* subsequent request. If unspecified, the server will pick an appropriate
* default.
* @opt_param string pageToken Optional. Optional pagination token, returned
* earlier via ListSingleTenantHsmInstanceProposalsResponse.next_page_token.
* @opt_param bool showDeleted Optional. If set to true,
* HsmManagement.ListSingleTenantHsmInstanceProposals will also return
* SingleTenantHsmInstanceProposals in DELETED state.
* @return ListSingleTenantHsmInstanceProposalsResponse
* @throws \Google\Service\Exception
*/
public function listProjectsLocationsSingleTenantHsmInstancesProposals($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], ListSingleTenantHsmInstanceProposalsResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocationsSingleTenantHsmInstancesProposals::class, 'Google_Service_CloudKMS_Resource_ProjectsLocationsSingleTenantHsmInstancesProposals');
@@ -0,0 +1,25 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class RestoreCryptoKeyVersionRequest extends \Google\Model
{
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(RestoreCryptoKeyVersionRequest::class, 'Google_Service_CloudKMS_RestoreCryptoKeyVersionRequest');
@@ -0,0 +1,120 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class RetiredResource extends \Google\Model
{
/**
* Output only. The time at which the original resource was deleted and this
* RetiredResource record was created.
*
* @var string
*/
public $deleteTime;
/**
* Output only. Identifier. The resource name for this RetiredResource in the
* format `projects/locations/retiredResources`.
*
* @var string
*/
public $name;
/**
* Output only. The full resource name of the original CryptoKey that was
* deleted in the format `projects/locations/keyRings/cryptoKeys`.
*
* @var string
*/
public $originalResource;
/**
* Output only. The resource type of the original deleted resource.
*
* @var string
*/
public $resourceType;
/**
* Output only. The time at which the original resource was deleted and this
* RetiredResource record was created.
*
* @param string $deleteTime
*/
public function setDeleteTime($deleteTime)
{
$this->deleteTime = $deleteTime;
}
/**
* @return string
*/
public function getDeleteTime()
{
return $this->deleteTime;
}
/**
* Output only. Identifier. The resource name for this RetiredResource in the
* format `projects/locations/retiredResources`.
*
* @param string $name
*/
public function setName($name)
{
$this->name = $name;
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* Output only. The full resource name of the original CryptoKey that was
* deleted in the format `projects/locations/keyRings/cryptoKeys`.
*
* @param string $originalResource
*/
public function setOriginalResource($originalResource)
{
$this->originalResource = $originalResource;
}
/**
* @return string
*/
public function getOriginalResource()
{
return $this->originalResource;
}
/**
* Output only. The resource type of the original deleted resource.
*
* @param string $resourceType
*/
public function setResourceType($resourceType)
{
$this->resourceType = $resourceType;
}
/**
* @return string
*/
public function getResourceType()
{
return $this->resourceType;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(RetiredResource::class, 'Google_Service_CloudKMS_RetiredResource');
@@ -0,0 +1,123 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class ServiceResolver extends \Google\Collection
{
protected $collection_key = 'serverCertificates';
/**
* Optional. The filter applied to the endpoints of the resolved service. If
* no filter is specified, all endpoints will be considered. An endpoint will
* be chosen arbitrarily from the filtered list for each request. For endpoint
* filter syntax and examples, see https://cloud.google.com/service-directory/
* docs/reference/rpc/google.cloud.servicedirectory.v1#resolveservicerequest.
*
* @var string
*/
public $endpointFilter;
/**
* Required. The hostname of the EKM replica used at TLS and HTTP layers.
*
* @var string
*/
public $hostname;
protected $serverCertificatesType = Certificate::class;
protected $serverCertificatesDataType = 'array';
/**
* Required. The resource name of the Service Directory service pointing to an
* EKM replica, in the format `projects/locations/namespaces/services`.
*
* @var string
*/
public $serviceDirectoryService;
/**
* Optional. The filter applied to the endpoints of the resolved service. If
* no filter is specified, all endpoints will be considered. An endpoint will
* be chosen arbitrarily from the filtered list for each request. For endpoint
* filter syntax and examples, see https://cloud.google.com/service-directory/
* docs/reference/rpc/google.cloud.servicedirectory.v1#resolveservicerequest.
*
* @param string $endpointFilter
*/
public function setEndpointFilter($endpointFilter)
{
$this->endpointFilter = $endpointFilter;
}
/**
* @return string
*/
public function getEndpointFilter()
{
return $this->endpointFilter;
}
/**
* Required. The hostname of the EKM replica used at TLS and HTTP layers.
*
* @param string $hostname
*/
public function setHostname($hostname)
{
$this->hostname = $hostname;
}
/**
* @return string
*/
public function getHostname()
{
return $this->hostname;
}
/**
* Required. A list of leaf server certificates used to authenticate HTTPS
* connections to the EKM replica. Currently, a maximum of 10 Certificate is
* supported.
*
* @param Certificate[] $serverCertificates
*/
public function setServerCertificates($serverCertificates)
{
$this->serverCertificates = $serverCertificates;
}
/**
* @return Certificate[]
*/
public function getServerCertificates()
{
return $this->serverCertificates;
}
/**
* Required. The resource name of the Service Directory service pointing to an
* EKM replica, in the format `projects/locations/namespaces/services`.
*
* @param string $serviceDirectoryService
*/
public function setServiceDirectoryService($serviceDirectoryService)
{
$this->serviceDirectoryService = $serviceDirectoryService;
}
/**
* @return string
*/
public function getServiceDirectoryService()
{
return $this->serviceDirectoryService;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ServiceResolver::class, 'Google_Service_CloudKMS_ServiceResolver');
@@ -0,0 +1,72 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class SetIamPolicyRequest extends \Google\Model
{
protected $policyType = Policy::class;
protected $policyDataType = '';
/**
* OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
* the fields in the mask will be modified. If no mask is provided, the
* following default mask is used: `paths: "bindings, etag"`
*
* @var string
*/
public $updateMask;
/**
* REQUIRED: The complete policy to be applied to the `resource`. The size of
* the policy is limited to a few 10s of KB. An empty policy is a valid policy
* but certain Google Cloud services (such as Projects) might reject them.
*
* @param Policy $policy
*/
public function setPolicy(Policy $policy)
{
$this->policy = $policy;
}
/**
* @return Policy
*/
public function getPolicy()
{
return $this->policy;
}
/**
* OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
* the fields in the mask will be modified. If no mask is provided, the
* following default mask is used: `paths: "bindings, etag"`
*
* @param string $updateMask
*/
public function setUpdateMask($updateMask)
{
$this->updateMask = $updateMask;
}
/**
* @return string
*/
public function getUpdateMask()
{
return $this->updateMask;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(SetIamPolicyRequest::class, 'Google_Service_CloudKMS_SetIamPolicyRequest');
@@ -0,0 +1,50 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class ShowEffectiveAutokeyConfigResponse extends \Google\Model
{
/**
* Name of the key project configured in the resource project's folder
* ancestry.
*
* @var string
*/
public $keyProject;
/**
* Name of the key project configured in the resource project's folder
* ancestry.
*
* @param string $keyProject
*/
public function setKeyProject($keyProject)
{
$this->keyProject = $keyProject;
}
/**
* @return string
*/
public function getKeyProject()
{
return $this->keyProject;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ShowEffectiveAutokeyConfigResponse::class, 'Google_Service_CloudKMS_ShowEffectiveAutokeyConfigResponse');
@@ -0,0 +1,83 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class ShowEffectiveKeyAccessJustificationsEnrollmentConfigResponse extends \Google\Model
{
protected $externalConfigType = KeyAccessJustificationsEnrollmentConfig::class;
protected $externalConfigDataType = '';
protected $hardwareConfigType = KeyAccessJustificationsEnrollmentConfig::class;
protected $hardwareConfigDataType = '';
protected $softwareConfigType = KeyAccessJustificationsEnrollmentConfig::class;
protected $softwareConfigDataType = '';
/**
* Contains the effective KeyAccessJustificationsEnrollmentConfig for external
* keys.
*
* @param KeyAccessJustificationsEnrollmentConfig $externalConfig
*/
public function setExternalConfig(KeyAccessJustificationsEnrollmentConfig $externalConfig)
{
$this->externalConfig = $externalConfig;
}
/**
* @return KeyAccessJustificationsEnrollmentConfig
*/
public function getExternalConfig()
{
return $this->externalConfig;
}
/**
* Contains the effective KeyAccessJustificationsEnrollmentConfig for hardware
* keys.
*
* @param KeyAccessJustificationsEnrollmentConfig $hardwareConfig
*/
public function setHardwareConfig(KeyAccessJustificationsEnrollmentConfig $hardwareConfig)
{
$this->hardwareConfig = $hardwareConfig;
}
/**
* @return KeyAccessJustificationsEnrollmentConfig
*/
public function getHardwareConfig()
{
return $this->hardwareConfig;
}
/**
* Contains the effective KeyAccessJustificationsEnrollmentConfig for software
* keys.
*
* @param KeyAccessJustificationsEnrollmentConfig $softwareConfig
*/
public function setSoftwareConfig(KeyAccessJustificationsEnrollmentConfig $softwareConfig)
{
$this->softwareConfig = $softwareConfig;
}
/**
* @return KeyAccessJustificationsEnrollmentConfig
*/
public function getSoftwareConfig()
{
return $this->softwareConfig;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ShowEffectiveKeyAccessJustificationsEnrollmentConfigResponse::class, 'Google_Service_CloudKMS_ShowEffectiveKeyAccessJustificationsEnrollmentConfigResponse');
@@ -0,0 +1,44 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class ShowEffectiveKeyAccessJustificationsPolicyConfigResponse extends \Google\Model
{
protected $effectiveKajPolicyType = KeyAccessJustificationsPolicyConfig::class;
protected $effectiveKajPolicyDataType = '';
/**
* Contains the effective KeyAccessJustificationsPolicyConfig.
*
* @param KeyAccessJustificationsPolicyConfig $effectiveKajPolicy
*/
public function setEffectiveKajPolicy(KeyAccessJustificationsPolicyConfig $effectiveKajPolicy)
{
$this->effectiveKajPolicy = $effectiveKajPolicy;
}
/**
* @return KeyAccessJustificationsPolicyConfig
*/
public function getEffectiveKajPolicy()
{
return $this->effectiveKajPolicy;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ShowEffectiveKeyAccessJustificationsPolicyConfigResponse::class, 'Google_Service_CloudKMS_ShowEffectiveKeyAccessJustificationsPolicyConfigResponse');
@@ -0,0 +1,261 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudKMS;
class SingleTenantHsmInstance extends \Google\Model
{
/**
* Not specified.
*/
public const STATE_STATE_UNSPECIFIED = 'STATE_UNSPECIFIED';
/**
* The SingleTenantHsmInstance is being created.
*/
public const STATE_CREATING = 'CREATING';
/**
* The SingleTenantHsmInstance is waiting for 2FA keys to be registered. This
* can be done by calling CreateSingleTenantHsmInstanceProposal with the
* RegisterTwoFactorAuthKeys operation.
*/
public const STATE_PENDING_TWO_FACTOR_AUTH_REGISTRATION = 'PENDING_TWO_FACTOR_AUTH_REGISTRATION';
/**
* The SingleTenantHsmInstance is ready to use. A SingleTenantHsmInstance must
* be in the ACTIVE state for all CryptoKeys created within the
* SingleTenantHsmInstance to be usable.
*/
public const STATE_ACTIVE = 'ACTIVE';
/**
* The SingleTenantHsmInstance is being disabled.
*/
public const STATE_DISABLING = 'DISABLING';
/**
* The SingleTenantHsmInstance is disabled.
*/
public const STATE_DISABLED = 'DISABLED';
/**
* The SingleTenantHsmInstance is being deleted. Requests to the instance will
* be rejected in this state.
*/
public const STATE_DELETING = 'DELETING';
/**
* The SingleTenantHsmInstance has been deleted.
*/
public const STATE_DELETED = 'DELETED';
/**
* The SingleTenantHsmInstance has failed and can not be recovered or used.
*/
public const STATE_FAILED = 'FAILED';
/**
* Output only. The time at which the SingleTenantHsmInstance was created.
*
* @var string
*/
public $createTime;
/**
* Output only. The time at which the SingleTenantHsmInstance was deleted.
*
* @var string
*/
public $deleteTime;
/**
* Output only. The time at which the instance will be automatically disabled
* if not refreshed. This field is updated upon creation and after each
* successful refresh operation and enable. A RefreshSingleTenantHsmInstance
* operation must be made via a SingleTenantHsmInstanceProposal before this
* time otherwise the SingleTenantHsmInstance will become disabled.
*
* @var string
*/
public $disableTime;
/**
* Optional. Immutable. Indicates whether key portability is enabled for the
* SingleTenantHsmInstance. This can only be set at creation time. Key
* portability features are disabled by default and not yet available in GA.
*
* @var bool
*/
public $keyPortabilityEnabled;
/**
* Identifier. The resource name for this SingleTenantHsmInstance in the
* format `projects/locations/singleTenantHsmInstances`.
*
* @var string
*/
public $name;
protected $quorumAuthType = QuorumAuth::class;
protected $quorumAuthDataType = '';
/**
* Output only. The state of the SingleTenantHsmInstance.
*
* @var string
*/
public $state;
/**
* Output only. The system-defined duration that an instance can remain
* unrefreshed until it is automatically disabled. This will have a value of
* 730 days.
*
* @var string
*/
public $unrefreshedDurationUntilDisable;
/**
* Output only. The time at which the SingleTenantHsmInstance was created.
*
* @param string $createTime
*/
public function setCreateTime($createTime)
{
$this->createTime = $createTime;
}
/**
* @return string
*/
public function getCreateTime()
{
return $this->createTime;
}
/**
* Output only. The time at which the SingleTenantHsmInstance was deleted.
*
* @param string $deleteTime
*/
public function setDeleteTime($deleteTime)
{
$this->deleteTime = $deleteTime;
}
/**
* @return string
*/
public function getDeleteTime()
{
return $this->deleteTime;
}
/**
* Output only. The time at which the instance will be automatically disabled
* if not refreshed. This field is updated upon creation and after each
* successful refresh operation and enable. A RefreshSingleTenantHsmInstance
* operation must be made via a SingleTenantHsmInstanceProposal before this
* time otherwise the SingleTenantHsmInstance will become disabled.
*
* @param string $disableTime
*/
public function setDisableTime($disableTime)
{
$this->disableTime = $disableTime;
}
/**
* @return string
*/
public function getDisableTime()
{
return $this->disableTime;
}
/**
* Optional. Immutable. Indicates whether key portability is enabled for the
* SingleTenantHsmInstance. This can only be set at creation time. Key
* portability features are disabled by default and not yet available in GA.
*
* @param bool $keyPortabilityEnabled
*/
public function setKeyPortabilityEnabled($keyPortabilityEnabled)
{
$this->keyPortabilityEnabled = $keyPortabilityEnabled;
}
/**
* @return bool
*/
public function getKeyPortabilityEnabled()
{
return $this->keyPortabilityEnabled;
}
/**
* Identifier. The resource name for this SingleTenantHsmInstance in the
* format `projects/locations/singleTenantHsmInstances`.
*
* @param string $name
*/
public function setName($name)
{
$this->name = $name;
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* Required. The quorum auth configuration for the SingleTenantHsmInstance.
*
* @param QuorumAuth $quorumAuth
*/
public function setQuorumAuth(QuorumAuth $quorumAuth)
{
$this->quorumAuth = $quorumAuth;
}
/**
* @return QuorumAuth
*/
public function getQuorumAuth()
{
return $this->quorumAuth;
}
/**
* Output only. The state of the SingleTenantHsmInstance.
*
* Accepted values: STATE_UNSPECIFIED, CREATING,
* PENDING_TWO_FACTOR_AUTH_REGISTRATION, ACTIVE, DISABLING, DISABLED,
* DELETING, DELETED, FAILED
*
* @param self::STATE_* $state
*/
public function setState($state)
{
$this->state = $state;
}
/**
* @return self::STATE_*
*/
public function getState()
{
return $this->state;
}
/**
* Output only. The system-defined duration that an instance can remain
* unrefreshed until it is automatically disabled. This will have a value of
* 730 days.
*
* @param string $unrefreshedDurationUntilDisable
*/
public function setUnrefreshedDurationUntilDisable($unrefreshedDurationUntilDisable)
{
$this->unrefreshedDurationUntilDisable = $unrefreshedDurationUntilDisable;
}
/**
* @return string
*/
public function getUnrefreshedDurationUntilDisable()
{
return $this->unrefreshedDurationUntilDisable;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(SingleTenantHsmInstance::class, 'Google_Service_CloudKMS_SingleTenantHsmInstance');

Some files were not shown because too many files have changed in this diff Show More