From 795303ce748bc47b9bc6daa088f4567b69515374 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Mon, 16 Feb 2026 16:10:51 +0000 Subject: [PATCH 1/2] feat: Add KeyProjectResolutionMode to AutokeyConfig to support project-level configurations feat: Add more post-quantum (PQ) signature algorithms to CryptoKeyVersion docs: Update documentation for AutokeyAdmin service and messages to support folder and project-level configurations docs: Clarify supported resources for the crypto_key_backend field in ImportJob PiperOrigin-RevId: 870858133 Source-Link: https://github.com/googleapis/googleapis/commit/b026ba89b3f609ad36df3dc8cc4ddc396f0cc941 Source-Link: https://github.com/googleapis/googleapis-gen/commit/958c60c9844e6b1c4378c43e34ebe87e661a3320 Copy-Tag: eyJwIjoiS21zLy5Pd2xCb3QueWFtbCIsImgiOiI5NThjNjBjOTg0NGU2YjFjNDM3OGM0M2UzNGViZTg3ZTY2MWEzMzIwIn0= --- .../Google/Cloud/Kms/V1/Autokey.php | 65 + .../Google/Cloud/Kms/V1/AutokeyAdmin.php | Bin 0 -> 2989 bytes .../Google/Cloud/Kms/V1/EkmService.php | Bin 0 -> 5224 bytes .../Google/Cloud/Kms/V1/HsmManagement.php | Bin 0 -> 10694 bytes .../Google/Cloud/Kms/V1/Resources.php | Bin 0 -> 8734 bytes .../Google/Cloud/Kms/V1/Service.php | Bin 0 -> 17709 bytes .../src/Google/Cloud/Kms/V1/AccessReason.php | 159 + ...SingleTenantHsmInstanceProposalRequest.php | 188 + .../QuorumReply.php | 88 + .../RequiredActionQuorumReply.php | 126 + ...ingleTenantHsmInstanceProposalResponse.php | 34 + .../Cloud/Kms/V1/AsymmetricDecryptRequest.php | 317 ++ .../Kms/V1/AsymmetricDecryptResponse.php | 339 ++ .../Cloud/Kms/V1/AsymmetricSignRequest.php | 568 +++ .../Cloud/Kms/V1/AsymmetricSignResponse.php | 463 +++ .../src/Google/Cloud/Kms/V1/AutokeyConfig.php | 271 ++ .../KeyProjectResolutionMode.php | 86 + .../Cloud/Kms/V1/AutokeyConfig/State.php | 81 + .../src/Google/Cloud/Kms/V1/Certificate.php | 388 +++ .../src/Google/Cloud/Kms/V1/Challenge.php | 109 + .../Google/Cloud/Kms/V1/ChallengeReply.php | 105 + .../Google/Cloud/Kms/V1/ChecksummedData.php | 216 ++ .../Cloud/Kms/V1/CreateCryptoKeyRequest.php | 241 ++ .../Kms/V1/CreateCryptoKeyVersionRequest.php | 143 + .../Kms/V1/CreateEkmConnectionRequest.php | 184 + .../Cloud/Kms/V1/CreateImportJobRequest.php | 184 + .../Cloud/Kms/V1/CreateKeyHandleMetadata.php | 35 + .../Cloud/Kms/V1/CreateKeyHandleRequest.php | 184 + .../Cloud/Kms/V1/CreateKeyRingRequest.php | 184 + .../CreateSingleTenantHsmInstanceMetadata.php | 35 + ...ingleTenantHsmInstanceProposalMetadata.php | 35 + ...SingleTenantHsmInstanceProposalRequest.php | 194 ++ .../CreateSingleTenantHsmInstanceRequest.php | 189 + .../src/Google/Cloud/Kms/V1/CryptoKey.php | 768 +++++ .../Kms/V1/CryptoKey/CryptoKeyPurpose.php | 114 + .../Google/Cloud/Kms/V1/CryptoKeyVersion.php | 819 +++++ .../CryptoKeyVersionAlgorithm.php | 425 +++ .../CryptoKeyVersionState.php | 154 + .../CryptoKeyVersion/CryptoKeyVersionView.php | 67 + .../Cloud/Kms/V1/CryptoKeyVersionTemplate.php | 150 + .../Cloud/Kms/V1/DecapsulateRequest.php | 297 ++ .../Cloud/Kms/V1/DecapsulateResponse.php | 354 ++ .../Google/Cloud/Kms/V1/DecryptRequest.php | 529 +++ .../Google/Cloud/Kms/V1/DecryptResponse.php | 315 ++ .../Cloud/Kms/V1/DeleteCryptoKeyMetadata.php | 81 + .../Cloud/Kms/V1/DeleteCryptoKeyRequest.php | 87 + .../Kms/V1/DeleteCryptoKeyVersionMetadata.php | 35 + .../Kms/V1/DeleteCryptoKeyVersionRequest.php | 87 + ...SingleTenantHsmInstanceProposalRequest.php | 97 + .../Kms/V1/DestroyCryptoKeyVersionRequest.php | 87 + .../proto/src/Google/Cloud/Kms/V1/Digest.php | 141 + .../src/Google/Cloud/Kms/V1/EkmConfig.php | 123 + .../src/Google/Cloud/Kms/V1/EkmConnection.php | 314 ++ .../V1/EkmConnection/KeyManagementMode.php | 91 + .../Kms/V1/EkmConnection/ServiceResolver.php | 206 ++ .../Google/Cloud/Kms/V1/EncryptRequest.php | 625 ++++ .../Google/Cloud/Kms/V1/EncryptResponse.php | 471 +++ ...ingleTenantHsmInstanceProposalMetadata.php | 35 + ...SingleTenantHsmInstanceProposalRequest.php | 97 + ...ingleTenantHsmInstanceProposalResponse.php | 34 + .../Kms/V1/ExternalProtectionLevelOptions.php | 122 + .../Kms/V1/GenerateRandomBytesRequest.php | 179 + .../Kms/V1/GenerateRandomBytesResponse.php | 211 ++ .../Cloud/Kms/V1/GetAutokeyConfigRequest.php | 92 + .../Cloud/Kms/V1/GetCryptoKeyRequest.php | 87 + .../Kms/V1/GetCryptoKeyVersionRequest.php | 87 + .../Cloud/Kms/V1/GetEkmConfigRequest.php | 87 + .../Cloud/Kms/V1/GetEkmConnectionRequest.php | 87 + .../Cloud/Kms/V1/GetImportJobRequest.php | 87 + .../Cloud/Kms/V1/GetKeyHandleRequest.php | 91 + .../Google/Cloud/Kms/V1/GetKeyRingRequest.php | 87 + .../Cloud/Kms/V1/GetPublicKeyRequest.php | 145 + .../Kms/V1/GetRetiredResourceRequest.php | 87 + ...SingleTenantHsmInstanceProposalRequest.php | 97 + .../V1/GetSingleTenantHsmInstanceRequest.php | 92 + .../Kms/V1/ImportCryptoKeyVersionRequest.php | 499 +++ .../src/Google/Cloud/Kms/V1/ImportJob.php | 607 ++++ .../Cloud/Kms/V1/ImportJob/ImportJobState.php | 79 + .../Cloud/Kms/V1/ImportJob/ImportMethod.php | 120 + .../Kms/V1/ImportJob/WrappingPublicKey.php | 88 + .../Kms/V1/KeyAccessJustificationsPolicy.php | 87 + .../src/Google/Cloud/Kms/V1/KeyHandle.php | 196 ++ .../Cloud/Kms/V1/KeyOperationAttestation.php | 151 + .../AttestationFormat.php | 68 + .../CertificateChains.php | 140 + .../proto/src/Google/Cloud/Kms/V1/KeyRing.php | 124 + .../Kms/V1/ListCryptoKeyVersionsRequest.php | 314 ++ .../Kms/V1/ListCryptoKeyVersionsResponse.php | 164 + .../Cloud/Kms/V1/ListCryptoKeysRequest.php | 309 ++ .../Cloud/Kms/V1/ListCryptoKeysResponse.php | 160 + .../Kms/V1/ListEkmConnectionsRequest.php | 280 ++ .../Kms/V1/ListEkmConnectionsResponse.php | 160 + .../Cloud/Kms/V1/ListImportJobsRequest.php | 275 ++ .../Cloud/Kms/V1/ListImportJobsResponse.php | 160 + .../Cloud/Kms/V1/ListKeyHandlesRequest.php | 234 ++ .../Cloud/Kms/V1/ListKeyHandlesResponse.php | 110 + .../Cloud/Kms/V1/ListKeyRingsRequest.php | 280 ++ .../Cloud/Kms/V1/ListKeyRingsResponse.php | 160 + .../Kms/V1/ListRetiredResourcesRequest.php | 192 ++ .../Kms/V1/ListRetiredResourcesResponse.php | 148 + ...ingleTenantHsmInstanceProposalsRequest.php | 339 ++ ...ngleTenantHsmInstanceProposalsResponse.php | 168 + .../ListSingleTenantHsmInstancesRequest.php | 338 ++ .../ListSingleTenantHsmInstancesResponse.php | 168 + .../Google/Cloud/Kms/V1/LocationMetadata.php | 172 + .../Google/Cloud/Kms/V1/MacSignRequest.php | 300 ++ .../Google/Cloud/Kms/V1/MacSignResponse.php | 377 ++ .../Google/Cloud/Kms/V1/MacVerifyRequest.php | 514 +++ .../Google/Cloud/Kms/V1/MacVerifyResponse.php | 386 +++ .../Google/Cloud/Kms/V1/ProtectionLevel.php | 84 + .../src/Google/Cloud/Kms/V1/PublicKey.php | 452 +++ .../Kms/V1/PublicKey/PublicKeyFormat.php | 94 + .../Google/Cloud/Kms/V1/RawDecryptRequest.php | 707 ++++ .../Cloud/Kms/V1/RawDecryptResponse.php | 511 +++ .../Google/Cloud/Kms/V1/RawEncryptRequest.php | 743 ++++ .../Cloud/Kms/V1/RawEncryptResponse.php | 744 ++++ .../Kms/V1/RestoreCryptoKeyVersionRequest.php | 87 + .../Google/Cloud/Kms/V1/RetiredResource.php | 202 ++ .../V1/ShowEffectiveAutokeyConfigRequest.php | 92 + .../V1/ShowEffectiveAutokeyConfigResponse.php | 72 + .../Cloud/Kms/V1/SingleTenantHsmInstance.php | 395 +++ .../V1/SingleTenantHsmInstance/QuorumAuth.php | 166 + .../Kms/V1/SingleTenantHsmInstance/State.php | 131 + .../V1/SingleTenantHsmInstanceProposal.php | 898 +++++ .../AddQuorumMember.php | 82 + .../DeleteSingleTenantHsmInstance.php | 47 + .../DisableSingleTenantHsmInstance.php | 41 + .../EnableSingleTenantHsmInstance.php | 41 + .../QuorumParameters.php | 163 + .../RefreshSingleTenantHsmInstance.php | 46 + .../RegisterTwoFactorAuthKeys.php | 134 + .../RemoveQuorumMember.php | 82 + .../RequiredActionQuorumParameters.php | 201 ++ .../SingleTenantHsmInstanceProposal/State.php | 114 + .../Kms/V1/UpdateAutokeyConfigRequest.php | 152 + .../UpdateCryptoKeyPrimaryVersionRequest.php | 128 + .../Cloud/Kms/V1/UpdateCryptoKeyRequest.php | 137 + .../Kms/V1/UpdateCryptoKeyVersionRequest.php | 142 + .../Cloud/Kms/V1/UpdateEkmConfigRequest.php | 137 + .../Kms/V1/UpdateEkmConnectionRequest.php | 142 + .../Kms/V1/VerifyConnectivityRequest.php | 87 + .../Kms/V1/VerifyConnectivityResponse.php | 34 + .../AutokeyAdminClient/get_autokey_config.php | 74 + .../V1/AutokeyAdminClient/get_iam_policy.php | 72 + .../V1/AutokeyAdminClient/get_location.php | 57 + .../V1/AutokeyAdminClient/list_locations.php | 69 + .../V1/AutokeyAdminClient/set_iam_policy.php | 77 + .../show_effective_autokey_config.php | 73 + .../test_iam_permissions.php | 84 + .../update_autokey_config.php | 68 + .../V1/AutokeyClient/create_key_handle.php | 101 + .../V1/AutokeyClient/get_iam_policy.php | 72 + .../V1/AutokeyClient/get_key_handle.php | 73 + .../samples/V1/AutokeyClient/get_location.php | 57 + .../V1/AutokeyClient/list_key_handles.php | 78 + .../V1/AutokeyClient/list_locations.php | 69 + .../V1/AutokeyClient/set_iam_policy.php | 77 + .../V1/AutokeyClient/test_iam_permissions.php | 84 + .../create_ekm_connection.php | 80 + .../V1/EkmServiceClient/get_ekm_config.php | 73 + .../EkmServiceClient/get_ekm_connection.php | 73 + .../V1/EkmServiceClient/get_iam_policy.php | 72 + .../V1/EkmServiceClient/get_location.php | 57 + .../EkmServiceClient/list_ekm_connections.php | 78 + .../V1/EkmServiceClient/list_locations.php | 69 + .../V1/EkmServiceClient/set_iam_policy.php | 77 + .../EkmServiceClient/test_iam_permissions.php | 84 + .../V1/EkmServiceClient/update_ekm_config.php | 63 + .../update_ekm_connection.php | 62 + .../EkmServiceClient/verify_connectivity.php | 76 + ...ve_single_tenant_hsm_instance_proposal.php | 106 + .../create_single_tenant_hsm_instance.php | 104 + ...te_single_tenant_hsm_instance_proposal.php | 95 + ...te_single_tenant_hsm_instance_proposal.php | 78 + ...te_single_tenant_hsm_instance_proposal.php | 97 + .../V1/HsmManagementClient/get_iam_policy.php | 72 + .../V1/HsmManagementClient/get_location.php | 57 + .../get_single_tenant_hsm_instance.php | 78 + ...et_single_tenant_hsm_instance_proposal.php | 80 + .../V1/HsmManagementClient/list_locations.php | 69 + ...t_single_tenant_hsm_instance_proposals.php | 84 + .../list_single_tenant_hsm_instances.php | 79 + .../V1/HsmManagementClient/set_iam_policy.php | 77 + .../test_iam_permissions.php | 84 + .../asymmetric_decrypt.php | 88 + .../asymmetric_sign.php | 86 + .../create_crypto_key.php | 83 + .../create_crypto_key_version.php | 85 + .../create_import_job.php | 106 + .../create_key_ring.php | 80 + .../decapsulate.php | 88 + .../V1/KeyManagementServiceClient/decrypt.php | 85 + .../delete_crypto_key.php | 91 + .../delete_crypto_key_version.php | 97 + .../destroy_crypto_key_version.php | 98 + .../V1/KeyManagementServiceClient/encrypt.php | 92 + .../generate_random_bytes.php | 58 + .../get_crypto_key.php | 79 + .../get_crypto_key_version.php | 79 + .../get_iam_policy.php | 72 + .../get_import_job.php | 77 + .../get_key_ring.php | 72 + .../get_location.php | 57 + .../get_public_key.php | 83 + .../get_retired_resource.php | 78 + .../import_crypto_key_version.php | 103 + .../list_crypto_key_versions.php | 83 + .../list_crypto_keys.php | 77 + .../list_import_jobs.php | 77 + .../list_key_rings.php | 78 + .../list_locations.php | 69 + .../list_retired_resources.php | 80 + .../KeyManagementServiceClient/mac_sign.php | 85 + .../KeyManagementServiceClient/mac_verify.php | 90 + .../raw_decrypt.php | 84 + .../raw_encrypt.php | 88 + .../restore_crypto_key_version.php | 86 + .../set_iam_policy.php | 77 + .../test_iam_permissions.php | 84 + .../update_crypto_key.php | 62 + .../update_crypto_key_primary_version.php | 88 + .../update_crypto_key_version.php | 73 + .../v1/src/V1/Client/AutokeyAdminClient.php | 536 +++ .../Kms/v1/src/V1/Client/AutokeyClient.php | 591 ++++ .../Kms/v1/src/V1/Client/EkmServiceClient.php | 658 ++++ .../v1/src/V1/Client/HsmManagementClient.php | 776 +++++ .../V1/Client/KeyManagementServiceClient.php | 1639 +++++++++ .../Kms/v1/src/V1/gapic_metadata.json | 454 +++ .../autokey_admin_client_config.json | 75 + .../autokey_admin_descriptor_config.php | 144 + .../autokey_admin_rest_client_config.php | 219 ++ .../V1/resources/autokey_client_config.json | 85 + .../resources/autokey_descriptor_config.php | 157 + .../resources/autokey_rest_client_config.php | 199 ++ .../resources/ekm_service_client_config.json | 95 + .../ekm_service_descriptor_config.php | 201 ++ .../ekm_service_rest_client_config.php | 256 ++ .../hsm_management_client_config.json | 105 + .../hsm_management_descriptor_config.php | 251 ++ .../hsm_management_rest_client_config.php | 268 ++ .../key_management_service_client_config.json | 235 ++ ...y_management_service_descriptor_config.php | 561 +++ ..._management_service_rest_client_config.php | 565 +++ .../Unit/V1/Client/AutokeyAdminClientTest.php | 644 ++++ .../Unit/V1/Client/AutokeyClientTest.php | 761 ++++ .../Unit/V1/Client/EkmServiceClientTest.php | 948 +++++ .../V1/Client/HsmManagementClientTest.php | 1254 +++++++ .../Client/KeyManagementServiceClientTest.php | 3050 +++++++++++++++++ 248 files changed, 49661 insertions(+) create mode 100644 owl-bot-staging/Kms/v1/proto/src/GPBMetadata/Google/Cloud/Kms/V1/Autokey.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/GPBMetadata/Google/Cloud/Kms/V1/AutokeyAdmin.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/GPBMetadata/Google/Cloud/Kms/V1/EkmService.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/GPBMetadata/Google/Cloud/Kms/V1/HsmManagement.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/GPBMetadata/Google/Cloud/Kms/V1/Resources.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/GPBMetadata/Google/Cloud/Kms/V1/Service.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AccessReason.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ApproveSingleTenantHsmInstanceProposalRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ApproveSingleTenantHsmInstanceProposalRequest/QuorumReply.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ApproveSingleTenantHsmInstanceProposalRequest/RequiredActionQuorumReply.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ApproveSingleTenantHsmInstanceProposalResponse.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AsymmetricDecryptRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AsymmetricDecryptResponse.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AsymmetricSignRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AsymmetricSignResponse.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AutokeyConfig.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AutokeyConfig/KeyProjectResolutionMode.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AutokeyConfig/State.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/Certificate.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/Challenge.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ChallengeReply.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ChecksummedData.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateCryptoKeyRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateCryptoKeyVersionRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateEkmConnectionRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateImportJobRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateKeyHandleMetadata.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateKeyHandleRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateKeyRingRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateSingleTenantHsmInstanceMetadata.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateSingleTenantHsmInstanceProposalMetadata.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateSingleTenantHsmInstanceProposalRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateSingleTenantHsmInstanceRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKey.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKey/CryptoKeyPurpose.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersion.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersion/CryptoKeyVersionAlgorithm.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersion/CryptoKeyVersionState.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersion/CryptoKeyVersionView.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersionTemplate.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DecapsulateRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DecapsulateResponse.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DecryptRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DecryptResponse.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DeleteCryptoKeyMetadata.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DeleteCryptoKeyRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DeleteCryptoKeyVersionMetadata.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DeleteCryptoKeyVersionRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DeleteSingleTenantHsmInstanceProposalRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DestroyCryptoKeyVersionRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/Digest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EkmConfig.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EkmConnection.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EkmConnection/KeyManagementMode.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EkmConnection/ServiceResolver.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EncryptRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EncryptResponse.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ExecuteSingleTenantHsmInstanceProposalMetadata.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ExecuteSingleTenantHsmInstanceProposalRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ExecuteSingleTenantHsmInstanceProposalResponse.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ExternalProtectionLevelOptions.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GenerateRandomBytesRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GenerateRandomBytesResponse.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetAutokeyConfigRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetCryptoKeyRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetCryptoKeyVersionRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetEkmConfigRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetEkmConnectionRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetImportJobRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetKeyHandleRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetKeyRingRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetPublicKeyRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetRetiredResourceRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetSingleTenantHsmInstanceProposalRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetSingleTenantHsmInstanceRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportCryptoKeyVersionRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportJob.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportJob/ImportJobState.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportJob/ImportMethod.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportJob/WrappingPublicKey.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyAccessJustificationsPolicy.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyHandle.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyOperationAttestation.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyOperationAttestation/AttestationFormat.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyOperationAttestation/CertificateChains.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyRing.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListCryptoKeyVersionsRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListCryptoKeyVersionsResponse.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListCryptoKeysRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListCryptoKeysResponse.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListEkmConnectionsRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListEkmConnectionsResponse.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListImportJobsRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListImportJobsResponse.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListKeyHandlesRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListKeyHandlesResponse.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListKeyRingsRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListKeyRingsResponse.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListRetiredResourcesRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListRetiredResourcesResponse.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListSingleTenantHsmInstanceProposalsRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListSingleTenantHsmInstanceProposalsResponse.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListSingleTenantHsmInstancesRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListSingleTenantHsmInstancesResponse.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/LocationMetadata.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/MacSignRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/MacSignResponse.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/MacVerifyRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/MacVerifyResponse.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ProtectionLevel.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/PublicKey.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/PublicKey/PublicKeyFormat.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/RawDecryptRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/RawDecryptResponse.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/RawEncryptRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/RawEncryptResponse.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/RestoreCryptoKeyVersionRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/RetiredResource.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ShowEffectiveAutokeyConfigRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ShowEffectiveAutokeyConfigResponse.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstance.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstance/QuorumAuth.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstance/State.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/AddQuorumMember.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/DeleteSingleTenantHsmInstance.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/DisableSingleTenantHsmInstance.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/EnableSingleTenantHsmInstance.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/QuorumParameters.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/RefreshSingleTenantHsmInstance.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/RegisterTwoFactorAuthKeys.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/RemoveQuorumMember.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/RequiredActionQuorumParameters.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/State.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateAutokeyConfigRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateCryptoKeyPrimaryVersionRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateCryptoKeyRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateCryptoKeyVersionRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateEkmConfigRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateEkmConnectionRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/VerifyConnectivityRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/VerifyConnectivityResponse.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/AutokeyAdminClient/get_autokey_config.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/AutokeyAdminClient/get_iam_policy.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/AutokeyAdminClient/get_location.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/AutokeyAdminClient/list_locations.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/AutokeyAdminClient/set_iam_policy.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/AutokeyAdminClient/show_effective_autokey_config.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/AutokeyAdminClient/test_iam_permissions.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/AutokeyAdminClient/update_autokey_config.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/AutokeyClient/create_key_handle.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/AutokeyClient/get_iam_policy.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/AutokeyClient/get_key_handle.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/AutokeyClient/get_location.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/AutokeyClient/list_key_handles.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/AutokeyClient/list_locations.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/AutokeyClient/set_iam_policy.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/AutokeyClient/test_iam_permissions.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/create_ekm_connection.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/get_ekm_config.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/get_ekm_connection.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/get_iam_policy.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/get_location.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/list_ekm_connections.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/list_locations.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/set_iam_policy.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/test_iam_permissions.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/update_ekm_config.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/update_ekm_connection.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/verify_connectivity.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/approve_single_tenant_hsm_instance_proposal.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/create_single_tenant_hsm_instance.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/create_single_tenant_hsm_instance_proposal.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/delete_single_tenant_hsm_instance_proposal.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/execute_single_tenant_hsm_instance_proposal.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/get_iam_policy.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/get_location.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/get_single_tenant_hsm_instance.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/get_single_tenant_hsm_instance_proposal.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/list_locations.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/list_single_tenant_hsm_instance_proposals.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/list_single_tenant_hsm_instances.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/set_iam_policy.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/test_iam_permissions.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/asymmetric_decrypt.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/asymmetric_sign.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/create_crypto_key.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/create_crypto_key_version.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/create_import_job.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/create_key_ring.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/decapsulate.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/decrypt.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/delete_crypto_key.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/delete_crypto_key_version.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/destroy_crypto_key_version.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/encrypt.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/generate_random_bytes.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_crypto_key.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_crypto_key_version.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_iam_policy.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_import_job.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_key_ring.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_location.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_public_key.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_retired_resource.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/import_crypto_key_version.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_crypto_key_versions.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_crypto_keys.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_import_jobs.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_key_rings.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_locations.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_retired_resources.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/mac_sign.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/mac_verify.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/raw_decrypt.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/raw_encrypt.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/restore_crypto_key_version.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/set_iam_policy.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/test_iam_permissions.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/update_crypto_key.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/update_crypto_key_primary_version.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/update_crypto_key_version.php create mode 100644 owl-bot-staging/Kms/v1/src/V1/Client/AutokeyAdminClient.php create mode 100644 owl-bot-staging/Kms/v1/src/V1/Client/AutokeyClient.php create mode 100644 owl-bot-staging/Kms/v1/src/V1/Client/EkmServiceClient.php create mode 100644 owl-bot-staging/Kms/v1/src/V1/Client/HsmManagementClient.php create mode 100644 owl-bot-staging/Kms/v1/src/V1/Client/KeyManagementServiceClient.php create mode 100644 owl-bot-staging/Kms/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/Kms/v1/src/V1/resources/autokey_admin_client_config.json create mode 100644 owl-bot-staging/Kms/v1/src/V1/resources/autokey_admin_descriptor_config.php create mode 100644 owl-bot-staging/Kms/v1/src/V1/resources/autokey_admin_rest_client_config.php create mode 100644 owl-bot-staging/Kms/v1/src/V1/resources/autokey_client_config.json create mode 100644 owl-bot-staging/Kms/v1/src/V1/resources/autokey_descriptor_config.php create mode 100644 owl-bot-staging/Kms/v1/src/V1/resources/autokey_rest_client_config.php create mode 100644 owl-bot-staging/Kms/v1/src/V1/resources/ekm_service_client_config.json create mode 100644 owl-bot-staging/Kms/v1/src/V1/resources/ekm_service_descriptor_config.php create mode 100644 owl-bot-staging/Kms/v1/src/V1/resources/ekm_service_rest_client_config.php create mode 100644 owl-bot-staging/Kms/v1/src/V1/resources/hsm_management_client_config.json create mode 100644 owl-bot-staging/Kms/v1/src/V1/resources/hsm_management_descriptor_config.php create mode 100644 owl-bot-staging/Kms/v1/src/V1/resources/hsm_management_rest_client_config.php create mode 100644 owl-bot-staging/Kms/v1/src/V1/resources/key_management_service_client_config.json create mode 100644 owl-bot-staging/Kms/v1/src/V1/resources/key_management_service_descriptor_config.php create mode 100644 owl-bot-staging/Kms/v1/src/V1/resources/key_management_service_rest_client_config.php create mode 100644 owl-bot-staging/Kms/v1/tests/Unit/V1/Client/AutokeyAdminClientTest.php create mode 100644 owl-bot-staging/Kms/v1/tests/Unit/V1/Client/AutokeyClientTest.php create mode 100644 owl-bot-staging/Kms/v1/tests/Unit/V1/Client/EkmServiceClientTest.php create mode 100644 owl-bot-staging/Kms/v1/tests/Unit/V1/Client/HsmManagementClientTest.php create mode 100644 owl-bot-staging/Kms/v1/tests/Unit/V1/Client/KeyManagementServiceClientTest.php diff --git a/owl-bot-staging/Kms/v1/proto/src/GPBMetadata/Google/Cloud/Kms/V1/Autokey.php b/owl-bot-staging/Kms/v1/proto/src/GPBMetadata/Google/Cloud/Kms/V1/Autokey.php new file mode 100644 index 000000000000..ef11d5b06ac3 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/GPBMetadata/Google/Cloud/Kms/V1/Autokey.php @@ -0,0 +1,65 @@ +internalAddGeneratedFile( + ' +â +!google/cloud/kms/v1/autokey.protogoogle.cloud.kms.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto#google/longrunning/operations.proto"¨ +CreateKeyHandleRequest9 +parent ( B)àAúA# +!locations.googleapis.com/Location + key_handle_id ( BàA7 + +key_handle ( 2.google.cloud.kms.v1.KeyHandleBàA"N +GetKeyHandleRequest7 +name ( B)àAúA# +!cloudkms.googleapis.com/KeyHandle"ÿ + KeyHandle +name ( BàA: +kms_key ( B)àAúA# +!cloudkms.googleapis.com/CryptoKey# +resource_type_selector ( BàA:~êA{ +!cloudkms.googleapis.com/KeyHandle?projects/{project}/locations/{location}/keyHandles/{key_handle}* +keyHandles2 keyHandle" +CreateKeyHandleMetadata"˜ +ListKeyHandlesRequest9 +parent ( B)àAúA# +!locations.googleapis.com/Location + page_size (BàA + +page_token ( BàA +filter ( BàA"f +ListKeyHandlesResponse3 + key_handles ( 2.google.cloud.kms.v1.KeyHandle +next_page_token ( 2´ +Autokeyë +CreateKeyHandle+.google.cloud.kms.v1.CreateKeyHandleRequest.google.longrunning.Operation"‹ÊA$ + KeyHandleCreateKeyHandleMetadataÚAparent,key_handle,key_handle_id‚Óä“<"./v1/{parent=projects/*/locations/*}/keyHandles: +key_handle— + GetKeyHandle(.google.cloud.kms.v1.GetKeyHandleRequest.google.cloud.kms.v1.KeyHandle"=ÚAname‚Óä“0./v1/{name=projects/*/locations/*/keyHandles/*}ª +ListKeyHandles*.google.cloud.kms.v1.ListKeyHandlesRequest+.google.cloud.kms.v1.ListKeyHandlesResponse"?ÚAparent‚Óä“0./v1/{parent=projects/*/locations/*}/keyHandlestÊAcloudkms.googleapis.comÒAWhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloudkmsBT +com.google.cloud.kms.v1B AutokeyProtoPZ)cloud.google.com/go/kms/apiv1/kmspb;kmspbbproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/GPBMetadata/Google/Cloud/Kms/V1/AutokeyAdmin.php b/owl-bot-staging/Kms/v1/proto/src/GPBMetadata/Google/Cloud/Kms/V1/AutokeyAdmin.php new file mode 100644 index 0000000000000000000000000000000000000000..9c621b31bc3123c4ac0c3580d055981d2fd51848 GIT binary patch literal 2989 zcmb7G&r{o05U%(&@CX?Y&EUAx_Ms$$Nx&YQOglB98QB($3fLao(1!7hN0y&$6z2x3g_dQ9*CU$B#fRJ{-{dV8CyYKl6r{$mr zc#l}b)hMas+6AU9f*seUwr-oa)@d||i*>v07$$M!7-#c1moH-_tCm;6)w4UUPExpO z+f9=sbkpwC6Q^x2akiDvI@CTT7gep^Hmo?uM99+G#B(&A;JrfnkWj6zQLVDa-76X9 zUfFMZmE)~#gmhE$JS_V#GDAU^2*Z!lshNh3J*rXo^U(0BhGkGgGmUQ{i5=X~OpgG- z+qR94rBlPUFmuRTI*F}gACuWWbZkg^2ZwwLtPW6vifU2fTAEqO5>IyxhuUrdOjD^Q zp}p#{H?j2~EQ2!|IOcOqrQRaBgQ?pg{n0UY3GKMnHs{R%y1l2$kZQ?}QIRdnW>v5) zFO|B^=^A2`W5zUyMQ`V`YY?-ZCN1sEu-)6a7D=F#u}Su7&!Zk{-s$j&{LD5#H-ZzA z>-FA&?1E-vy%Ms5uAw)JsIoSuTE%7GFwSKi2U*9@wxTP6x8@k2cUDDT+tH8vJ~UXV zsvdAvwecAkve6$rIu;G~eOyRTeZd!M&rQcgQQ=I}Pq79ix>!LI>bN zM%!qLH9O}qm)?XJ|H_p$^oSRe)zT*hW%S}OU=jl$(ht*UVc?CpG=K-3XT=DbX9EVv zeNA-AInOa(g7_Rwv(6)tDahk)G8X31f0Bb$h?kf>^PXg(U@|o$GvFKm67)e|s46=? zv%~tX+P3Q?GRwnkj}c~{T!6G0U)B>o#vwp(-qHn{<~+oEXsJ||%S!bqS1KqObyrog zi|>gD&B&RudaNu8;tE>cS6)^N#rzjard-V`2TB=?CV>9JQBKXNWmP^=^Eq(KG3Y7jdjUm8krSUl*YpDvl~VrTsLTKk^Vyp$@1uKJ*bo`upRM+} z0qOVABJ({eW|WXQFusFkvua6BA2711pM`(qAB8cMB7W4c%{p+`wfZ!_pl&@X&bioZ;t7f=ijd;eiD*f>{@U+XcuQgVkbPq$AgF0O@(I@ zpq^xt$&nzvgZ@7h@pl0&-ke+F#?Z>#G`me%zPgh64CMLmixOx4&U{ZEi4U%=MkXY_ zhHWrfD&i+YQyJ|LCiUs9{d`SInJYQaKhO1<=%13`5HtNx{JZC-V`{WvyX}p!%wY|sU!oOQKf@AFFZFj6G%2+U!pXY7 zL&CKRo2zN_D=*Lic>|3BvX%j-mqEUD7k zG);Zs(Eb7Rf9OoFy>xo%p_dN5wYN;C!!SKD{R=qt?P{e+wgL`t2%7cVr|*65y>FlP zqub7wgD%Mn#3HUnNlmWq$aIUyj%!m}w@ta)tk;Pv>vqF2OyXu`d45G+URjq*^LN)T z!dB02x;iPyo3_1alALbZ&021|;pJM>IkMeQJ>s?uon*O3ge*m5u2cgmhE$Jh`;pSo3|LT_nRlr&%=(UG}I(;lIm4?OhkUav?}aS% zLbf%X9ua#r$ABhb^!qK5z7YAL&Nx=9f@EPZ7BO%Ilj5hK>v(fPspfnK4dAQ8duTxe zQhbBVPZAniGCT@xRTM|FuVKm@qn?&`XEk{$Z`{-QXQ$@lf2=R4lZxd^@kGthR459wIVM42o z9@$@f2OYQF8gbR?&gju_IrFWA(n+X22YP|v8FZRykG>xe;O`qB%x47LSZ=bh*a6^a zi+n}Z2ucQj0AqwG^qc92#E>7&Y@m?^5+^Ur8Q8c)ywOHc~mMyKMx^Cb1e9e0p<4AAd8AneJ|yZy7; z>fJxSfd-r0y~+xmLm$kigUkk%o(-kLN41QG!c5hT&49>Tu`Gr4{qiKi{>*n08jeO8 z^N9q5u*ma2m_Hxji>iXCJh1Yqf4#_lO`*Xeaj8)^peYG{8y$1ChbnXpfAG7PLwojt zLU6YqKnvLvgsg76L}ijQ+Rt;`ouyEu{hhbaDYjFq!yEjK$9mhCMkis^fGI$=nvE(1 zbR6~xI2RE1wzT~FH`TgfZ4%dULG(ulLW9h+qv&L;&G6Y+S@57BIXZ7h9~aYvq_XP> z=pH&NMj(}mx7i}D2V^rb%Dwv~}2F>o+BZAJtUZ=j)VvI7laf#xNXUJ)487QeHfYIo+2i*M}PhMICTT(*$3CIKdjA$d`?CxWwNtE z@DCC?6P}4eaqv_kluok%cn&orOHv#!n?QlrRn9WZn`i4}+KP zL5=%NPR08GCZ&!Q9@Bj0HP|n7Oj-CD#26hYf`lZ;m|%IB7+ZTvIv(3pWTxU#t>qP7 zQ*pEGp%T{>Pd4yK9lxt$YJ l7%YmXcC{Z|Qv1ED;WfyVe`giB;yUnpi(C5FP;Jyk=zq6|?D7Br literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Kms/v1/proto/src/GPBMetadata/Google/Cloud/Kms/V1/HsmManagement.php b/owl-bot-staging/Kms/v1/proto/src/GPBMetadata/Google/Cloud/Kms/V1/HsmManagement.php new file mode 100644 index 0000000000000000000000000000000000000000..4cc28eb6a3e3b5eb30777141c637f97eae28f1dd GIT binary patch literal 10694 zcmc&)Uu+yl8SkFs{Q2yr_N1wu3rRNTv~i4c*SLj{%b#X#pB*=j?VO!NREL)J-T1uC z-tKmHFHRa<1QL~a1_>eYL?r~g^UMQ6ND&eeeL>*`Pr|DH`QLQ^p-J*r6>g>|w9U2%lBQPqnT)r~JTXZpHnn}KOq=7;FUb#=|Ke2N-&k6mlp)xdOYl?g1`RXTb>6*}42bFPDK zUst6;ODqx?h02^AP|r53$~5(>p6LdTw}eBB#X1e5__1F`FND)Fb>^BnDr_tkcNuwI z4ZJ38on2Ku8Z{*o;0^+JsAU&5CB*4vT_g`^DmxPg^SD1g9($)6$vDj7hE9 zBwaTinU2?)Xqkq!lG@05$F6%#+cxcbWzl67+L@D4?xveUHod`-Cq@KDqB5GnUK@=P&&uFD{P8x7rfo8EOpMI)cFbct<{w?k4u#@| zYhs_W+>4gXo@sfo#uBWrh8YeAoM;)~g=q{Qjf9V^ty~qHC|BX2)8QbF0N6~0T9}aV z`N^HnDGPb{P+AuW2Qsc=K<-zEU}za@#G)(IHtYc5V$R0EV{4N^IKc2`SW%VHBa=OU z(+-ojp|9#uL_3`+8qVO8zKLvJm>^W5iTNmdOsa>>KricKI^2Wfk4{X;@vRZg$5@eH zW|BhBUFiFu>3GeCZZw1S;RAg3%N=RE%jGo`XDTzyp>Qbf`C-L+?VaX?t`H^SMrI zy3B~)v;))9Yo>3kT6FjzS9U_$Cv%XO9VMLl8uW((BBqB@nUMVmV9OVB7G4by$SmD( zahgZe)2j{|!&BEQJUs_P9{r$cdT8*DQ7nyoR1c|~hitIn=xat5L0T6ph5nE}(Ouf` zF@Zgz6nb*MP@tFRh8%~%TUwN>o&uCLCi)CHAw{lA_muBadSIRhYabX}s01o2Ax%;Jo9`Z6AnVwtLCg+)w z15Bm(iWBtmZ>9MXpWq-dJXe@(lvy=jZGjMFr&w5GLrPr}hP!?c1wJIB$^jg{1KD0l1uNt&0JrJYL$e0b32neB zkJe2ev!=Iz2Lova9sclPu4kdkcnZxc8_o;|B?jKNQR}S?`JMtf37+x2Hhkm-(m5@_ zJf`i?hVQ~zY;VMSJ;4It7L>aRK#6NlG$35U5)9~j0RyJ_0vT_B0fR=ZCfle%8>`eC z?&lLucjYnCIng(FxGoHG9bWZl0~fX(v%Jh_neA$pGFP}`B34o1!k(1RK|XJ{0Ks`f zY&^4{C@`=SH%P+r&G=ckd|$?G-@0L0)UHz>=~)lbv(s&(GbM)!7V;*HgruO>+QRYc zfA(_)PA6j>xe3Q2tZgw%NpDty*Da*wMzngg%)+S3{yKjkB0t&p;Y2w^yj{4IDpi@i zm=?<&UmP=86;3CkQ1%R*N<;}ZAhCcN308m_lBIBT*~zTIm-sgCuZAA+a_VBrrD*MRM08DH!n0x{W)QHrg^IL0cyG7X?PUgNvT!z_vl+j^Z#cFlM3M2nKUa8e|?-4?`0hZ#hU zw_P7%!iK)RV$;U~7DePBPa(lQm)L^xXt14rZ|;3KJ4@p-AQMp9cFb^@hyPN?+qK+h z7?de~HW6dGobLq^J_e`a@(}tz5JzqvL*($pul-K0BSZ6o;c}ek ziNVeJ4;A=|7oAaU+nkHp8LIS6R4Q$=-`VsmUhFKab(`L5OtuVtEhdsF7>w2+Jiu`A z3|Io_NLzEZFJ;`t>~9pt8)GIW^N@|af8n{vyD%JPZnrM6F-UFqB!PhzHt@u9j9TtZ z$fu3CSdDTY!Nt;JT5SgOOQ~gMaoYJqi&INPVDWDSzM8N!OSp*G$G&0im&HYXtH5|V zheJ-X3g=SbyzH&6fW9-5vI*mfdn1`M*0_u??k~hod~zIK-u9A~`~zVyA*4R}Mq9v1 z5(#b3Ug<(I?1ekewU8)(|I^QYl(|8!vDeg31$Vyg%CqvZmNW9P__J~HCk3+c%PRSL zTSMaoq=Oxi+1%~t8h^#L%_H{CE5@JrqyDi?^7jm!N@NzKee@G$q+h3GJX+or=A-wz zxqm9pw43p7^3pNJ=h{0Wo8$2fn(zqu9FOCBxfiO8VghX@zwFtA{mNz~nhe;s_Z5k; zma-{h{ z9VdwiQaWK7q&-mN_lP3j?vx~vl%z^hq*ln?&!|#CEm>6mi--8}ONDH6a-(g@>@6sx z*%dd*J!lQUyF_&5K9m*tIFooPB;EGO&9;6g(1%D=dfpyf(`g7>?VH=_gbYL?ok#~y zg!9>92m)-LG%F~WCkL_EUv%xcMDCRKw&)S3aAaMO+p|G*B z5gHcVb6~Gy#U+S~u4M#kj@KAZH5^a9CqGtT2ro-WXImH5NwST;VzC6ylJedKF($kk z#4cLY9e%kH4MO6GO5N3~{O_+b$7cBr#{3k!!I-~|cQo!_dM1CZgclq6%|^W1xO$L> h`mOWPC9iRD7qI2(AiHj4R@+<~IFe@Oe?Vs(RM5=HYL)Mtk7{XAPGsd_&@+kvQkZUAP|xelLQ9@ zl_(h4PA zV}FB^?&k>U{#K*Czms~7kXbj{ZAs%S(AP+U|5}}cx@}5r&+y=%`*s`KP201Ly8RVM z|3W%6>TL_CFXJ9|nx3bd1G%PC$!4g0yPG<$Fe>^&@C^ zU8B{q+;%uAy}TzM+5T0@wOVj9>tMC>fi8(=AEJN0K==AES8;|RC8&ESc@MbOBWb*kCTBXJrH5^st} zq{w_M8~v9Y6_?SN>002%m@tkH0AwsZoAgh?rAh|(K&dju_wr}xEoR9dhNxp{aJ11@#9?vnwJ9WVtjLUwEgh&yh}X@@4A@d?;} zl&LU_W^3T$u5*gp=CM`l)U6ukP7t5G=6sCD10LKbCxuT)a1S|Nw^!bVvb65mE**CIzA7H^^%P2R=5 zTt>tZ6fMa)Atv5H(?kHkkX3!VC|3)WvVbyQe=mQD=C1Pn;54HC6TE+sT_-3UV#4{= zo@Hmybl?KqToT_!P(0Yzck{q%KSBcW3J62s{J3tNSao_Ilj-}Rm#hZJMS?5tqL@)X za$MUxZuqg{<50q03C=@?FOtmJ5K|dQd>chK;eZwJWEurz&m*ahh$-r5_|S11h8G_M zdz?&v6uRRT)X6SR>y!)GFe<)P3kwuYuJK|qLc6RM9+1Cw3ba23({n0O0KvmAm=!>#$C0SdZ<-u6K)1Gb^J z$Vj6Eo_LL>FP)dTkX)@QdX*Y2Uax2+x!U7Gar9PB-YIOC@J43c)IX zq`M)5iNDl;_!*bJ0G(@hFCzt1;*LSVK=!Aus3o&4lEBZ8GcFPy67*Xn!vnQQmFiIATHKX(pjVmmLvd;pb&q^&-Vo%p5j$6G@8pdO(u3#JF`uxQys@zy!TXJ{^<=nb#fX%R1N`?>UKs4*!1 zem&u~!brtC5a%ubd{*5)vJdK3T!j5;)euem7NJ|c{u9Jk@iCh3%Ah-nrbFt&a&e=g z6{?%1o}uNHShToI+!=qT^J04R7R1!Xv(rURk9JGkk$y!jwqpb30uG5!4+9iFC1(%6r=lSu~3Ze!=X1~kmF7B%|L@ci@K_>J5a_GjLU}{@m{hFlC(MHYFAvwhye#BHmRDDV zwUFhtXM!T$Mz=ThG z>dFO_TnNhAvkNF2i9ZaW8@%Cy5Wd48oCQi0pq%4_1ixn6v8^w}{fFpY zh;nuc%5G1F7)68Y+r^>~$$S&}Uj9=A&0pL8@Z#_*$c{gD269ywbiVHIa-m7WC#>5) zOKhX5+_7c8Zg(0DtCokcDO}(n8K2TdW}FNZOxJvxHlg}wc>XBm9iFpEZYLwnB#bmy zmv>0}n)uxiim7y@3KbpLN3>-%{1#X1ZkEU_X)^s&%S>?*A=m&jL8;(l={Lzo&Pbw9@^nRC$B0ca9jA1S2U<1z<F`Noudd<#Xx3sKVc~+eu<7X1HFriw{xCicjFhqZ zxti4QIV0&gyXTCv5}Ljw$b~qW_;&=2ciR^!I{btP)4R<|z9#|sH99R~gW?dAri63{ z5nd!xcu*V$@Bv~q=(r&9_W?AeSsnz38h_%0Azk-75yU>2AC7{NO~V-U$cBea zm^H9hS|%v-vRO32m$7%+V#BZV8Ar{kTl|@+zqpn8BjlprN6`MmtIDlj!MFO&Nbq#p zePXy&eD8(LchAgaC)~ma+rm*C^ zsh3!C=7lUIX911#zwnNlgF+fAWI%-Wrc7oPRjA6#Rbgo1yC@p(zELvq*A!WYiO0n^ z0|+9yZM|A4DH<-63)KQN0eP%%tF$POkhajDgLFX^ZKseUE(g%+W8tX9hK8Uv3raLIYr zgurA;fwl&LB<}?R$lDOdwZf;M;@yh2wO*|3Vx4M}^r~ao-$c+&cq|Qb(CjpP(7>Is zP3+52BcDEERi^(kOWs+J9Qx4&yt~486Yvh(I(Sb1|INV62K_uDnIoS^B!OFUC-o1$ xy6=BAK|h;-?BHd3`!W02pzGU&HhGvZL%vI(nC$C;GjxW~{{S^MbBF){ literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Kms/v1/proto/src/GPBMetadata/Google/Cloud/Kms/V1/Service.php b/owl-bot-staging/Kms/v1/proto/src/GPBMetadata/Google/Cloud/Kms/V1/Service.php new file mode 100644 index 0000000000000000000000000000000000000000..6a097024e24b745d3fae6c829e06ee45b0c110c3 GIT binary patch literal 17709 zcmd5^TWlOx8SdCkVjt(`<0N*ROE;6Wae}j(IJb5~8m)70b1`X~&}!T5c=yh zGwalCEpcfD50yZw!~>`jLIR;m6(AK}ctJcM5d?_KlOIrpD)ELYc!BZ&|GCa(&+N{w z9iR`bJNutA|KS&&)f{e3j(NRi|0W-K}}K#bY^-xQlj~ zWZ7;A)vX%w8djNPF3(I~C%#p&e5-hwEi9g=3yV+JyyER+XAmk^Eziq5!#6;0pbY%e zXwFvca>ny5AO3T|_DXi$_HCDi2AWrhk5f)}sWed5-wYViW`%C6n;9d`yu^Z9w=E0xhF6NkiW>2~&9W`gsW z&$lpnHsiZZ5`KFo;}XB=*3U4$=?2T{ucAg#g@#=$)awq_f>ZbM`9P*%i=>6;t2U|o z-L1J~lWJv}ELe-S<94_777_4B&14t`MY+5SA+I_0dAC`w+x7Y4%?1T^cS=&W2hCrs zHTKCTrl{d=JpM@NgE3^a1h_WY;G z(k+0JcZN1EJV%RHSq!7 zfd(7aJSlk)t;YIb^}6Z)j|v7JMTkB3ox7wy*3Y(OAB>>&b9NOX(AdMl!|iCmaVx|v z%`T0tQ;*Gm8)!S__q@9VQ3|+L9G{MHTs+8F-iIDxMxfS?aV%u+p5Ym^aS@;k4p&;V z$vwvQ=Bd2cKLW3;V)Qm&(emIn?0^Fm1hV3=3f2cI_(C7r9Z`YUS!p8Cc1em*Ja(^& zE9l|>feHY%3Jp3`(CQ+#Q#b7Nn@^$P%S7fO=@%!_!?c(dNhozlH*cU3*i7L>Zg)DeoyuuR zKBm^2#UdIHZzzl{_kA+5?@{KwhtWjGeZ@BBcOeVI_A{*Rr+y`}@GAGkH_$LYOHiLG z%{gw(@>xpWJeAd2P;rn|e_dj$SPBfxwaWYLsXMAIF{@RQ{^C4O&>mv2IMEKw&@Tx*&_4T2HL?{ zR8W&l_MXVb(WX!ki*k7y4xB2;3O@BgMKQ$1dlc>Q?%EA`5S6j9RHh1sLWtF91Lk)i z#Kr`Qxk{q)J30%#gmA#T8Hw zC!3%2p*`Gh6w|RctU|HZw2I{=Cj>L&(?S=)4BtV6R(0NSZGWLAg3UQ?u!&33QW_WJ zHXMU+fUs3c49*ID7`&1nYbrF(jSWDhv5_t@u!%-o&nj8OD}^a&kQ)lSzl@u*1`{ z+|X1ihd+Uanrur@h<8_b*|@Z$JaA@J3xIR-9{7KZlNe0(PRtqW!ijNj{C(L#2V(rq zxOUBQmtt&onbH)L0dd>QD#FSj6*aW^GTIA`Hs5uY)VkQ~R~s(i4NzD^8!te_8o%M6 z2HJeF&P0`7F&atOgRBbbN5)}xHmO>)ne!SiKbY_J;lpT;RjEK{(}CV&$!bDFwhkRn z+Mg}amMQZA;mLWlwITO_tW!QdRUX^G;Jm8^l+eyRb>g;FZ4w>@ZlD8g-y`>DGd#BDWriSF`ag3K1i{j`R6_~e9O8Q z1IKU#9IRxbjUs7M7GTy07W6otg3;81r&T1lzUtGnq6pl-3_dtUH78(v3GLR>NTa2M zwD}LN;3Qa zq3s24sa7MtYnPv~=j$>6t}<%lqiB7_o`<+ClD~>XtTq-6>+A(a!Xw*hw27~f_(_X> zKnjbnA!wdNL-di{DWzJ?9~x*ZP)7`qtJO#py|jfS(56LJO5x3KLhib5t*PmxK56Gm zuo%-PWj;kzGCwxZR$va&wLQ0Hjes>{4{t^NHLJ|3Zz1Oigy4yUP0CohrNyZRCLvt}lR) zWw&+sNvL7q$`z6VR6GzV7fF?Q`sOKpKW#=4U!%0<+kI$@N~@wzxG|hpY0EVz1b9xx zr*y?ZXIH`d(9T5)LK~_vm8ZjI9>6Ej5k-=!!lL13K&uBDZqn-EM+VxW0*%naaJZPD z$BB)=U2Dlm5z*cYsqLB`m6;z5n1%E_QzfS5`GbCh!&Q-BJ8Ce__nxFWg29=!)q_OK z+Uh;qxX>XdcJ}7>FyZ#@8YUDB1NaDfRH3VF(S#Ve^aPs62elX*?808(?_>6Qa4=hC zFo1*RxYADG^U^;lG<)z*YVR%-&&+H771|F$1;7iUz$-l{kSv({;7xqymFkh?HicL2 zMLU$Z(UOOHzyOxkr-BdS-Dq1t9V%+Ld^*)rQPTSIFAcOa5ct7Cq`ir`+&WphiAz6) zSPJDv#A;HPG#m}$A)fJh@X1Azedqj{XbBEb9rx5mX)W?!hs8iPi15+nYv5IWtm50QWbkSof`Dv z#7H8BE1iwuK><7=`)!d^X_!P5^W%q7P;$eYXIBcMrT(QqeEe=-7EjW-$~X87(pjjQ zUxBLG%N@?iLL2^G&Ox`IO)cRc!-+0(weR7>i7!`8S6RT1ebr3}fIY+WHFxfr#|DSV={RhDxiTBzY7 z3{yu4?$^Pssh8l#w5$gNlHs=FKIWN~0=p!Q_$eLINbu4y^jR>07b*`-2qs|?$yJA2 zEAvX2FX@!&_==(!|B6pzC?*A%aV|-JaZ1T@y8A2`E(x!DZ zs)3GVohuS4fL`Z{%$y4|{ye_JP`Xx(=NfVxM#4t&EP6a{c9rGxYQhHp7EUd(ITNhU6)`Hwy&l=hkxgf%@Q7f)99-wxmC4}$ zm&A(OCdu5C$>*9`Gs zIP*Y9FH)c;*fT~Y<=rD=b7+`8tG*XuzHz^B6m948-+b~NM(MNcdk;9N01tcEnZw-7 z?L15tqfn%BkbqOsDiy!g*D`R_-n20pW2WsO>Nkx0h0{s0b~puuMZS5M+r0;o1NjB( zObveog!8zY65)DcY4MZ@FEJ25Z$8_(f(lhCfduTFq3kK;$@9>khv9}G6mfoG8a)BJ z++!7$6ht426j?YF@wd{6V3;VG4F0djP{cQ&O1i3YJff*|x$@T!k0Iu3=Oka0C~*pDeEx<=|qkLv&hiz|h3YS&Oo zl~Mz`84{i`Z}eJHF6TL{qP$Uug)=vVeC_xZKCTrvfm#Zh5)AX<==y^BT(6Sp&0FCT zNdXh4zY+vYp#HxS(B<=NRKO1nv_ag1;{95SsasO^ZMJcJO|6K6UdUz!NOjvO;_7s- zrUJJkd`3>PEiMZZ*j85w?budC0oz-+AE`Mq#`h(&&@11|`3fIzqijPf1O+#j30;JM zK!T=tP-~emp%9?V*nQFbe6Q^4J;GHpXdx-2{`I{OU`}b5n;=;VMfkv_5O1PVd<1>Y z;O2>5+9dQjqeRjs`Xf@DRtVHwDGV`O@#{8bBnz4qYilJdGD$^c`~>cF0+yt~j%d-; zLMJ8FpSm^VLfAJ~3R)+sn573LZ^*3RVjILITtZ|}S9I+ngCY__RaXjw+=6fg%Ivr1 zX$Nk|C<>|Feq*3P-~eh47+k{oq^LfZcGCM{h)js$t`s&YQ6}N7Oq^oTT-%;g9(Lve zP>FtFpdql5oKb>rV`@PdB9UV0??@tqLNH$FyktJVwlJ#%Y*R`8!djXw15Al6%@#^2 zn7;kp=1R}3trQ-Umo}5(p{U9DEEF^8lcJ#_mn3wRm*J-=T9^b$$Nl?-QC6$Ae&PG~ zg*ywr-|+Ie+`W7Egelec*Xj5<|5cA8kpF%9Wx2^z4B$f9v$Rz zW{ejO@hV#MA?UZ}=N qh_K%gfgci?T~C$i96zXj7-5qC{zmBMIud`XgHiII)L2H#2>l29qiY!e literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AccessReason.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AccessReason.php new file mode 100644 index 000000000000..e0735eb23c58 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AccessReason.php @@ -0,0 +1,159 @@ +google.cloud.kms.v1.AccessReason + */ +class AccessReason +{ + /** + * Unspecified access reason. + * + * Generated from protobuf enum REASON_UNSPECIFIED = 0; + */ + const REASON_UNSPECIFIED = 0; + /** + * Customer-initiated support. + * + * Generated from protobuf enum CUSTOMER_INITIATED_SUPPORT = 1; + */ + const CUSTOMER_INITIATED_SUPPORT = 1; + /** + * Google-initiated access for system management and troubleshooting. + * + * Generated from protobuf enum GOOGLE_INITIATED_SERVICE = 2; + */ + const GOOGLE_INITIATED_SERVICE = 2; + /** + * Google-initiated access in response to a legal request or legal process. + * + * Generated from protobuf enum THIRD_PARTY_DATA_REQUEST = 3; + */ + const THIRD_PARTY_DATA_REQUEST = 3; + /** + * Google-initiated access for security, fraud, abuse, or compliance purposes. + * + * Generated from protobuf enum GOOGLE_INITIATED_REVIEW = 4; + */ + const GOOGLE_INITIATED_REVIEW = 4; + /** + * Customer uses their account to perform any access to their own data which + * their IAM policy authorizes. + * + * Generated from protobuf enum CUSTOMER_INITIATED_ACCESS = 5; + */ + const CUSTOMER_INITIATED_ACCESS = 5; + /** + * Google systems access customer data to help optimize the structure of the + * data or quality for future uses by the customer. + * + * Generated from protobuf enum GOOGLE_INITIATED_SYSTEM_OPERATION = 6; + */ + const GOOGLE_INITIATED_SYSTEM_OPERATION = 6; + /** + * No reason is expected for this key request. + * + * Generated from protobuf enum REASON_NOT_EXPECTED = 7; + */ + const REASON_NOT_EXPECTED = 7; + /** + * Deprecated: This code is no longer generated by + * Google Cloud. The GOOGLE_RESPONSE_TO_PRODUCTION_ALERT justification codes + * available in both Key Access Justifications and Access Transparency logs + * provide customer-visible signals of emergency access in more precise + * contexts. + * Customer uses their account to perform any access to their own data which + * their IAM policy authorizes, and one of the following is true: + * * A Google administrator has reset the root-access account associated with + * the user's organization within the past 7 days. + * * A Google-initiated emergency access operation has interacted with a + * resource in the same project or folder as the currently accessed resource + * within the past 7 days. + * + * Generated from protobuf enum MODIFIED_CUSTOMER_INITIATED_ACCESS = 8 [deprecated = true]; + */ + const MODIFIED_CUSTOMER_INITIATED_ACCESS = 8; + /** + * Deprecated: This code is no longer generated by + * Google Cloud. The GOOGLE_RESPONSE_TO_PRODUCTION_ALERT justification codes + * available in both Key Access Justifications and Access Transparency logs + * provide customer-visible signals of emergency access in more precise + * contexts. + * Google systems access customer data to help optimize the structure of the + * data or quality for future uses by the customer, and one of the following + * is true: + * * A Google administrator has reset the root-access account associated with + * the user's organization within the past 7 days. + * * A Google-initiated emergency access operation has interacted with a + * resource in the same project or folder as the currently accessed resource + * within the past 7 days. + * + * Generated from protobuf enum MODIFIED_GOOGLE_INITIATED_SYSTEM_OPERATION = 9 [deprecated = true]; + */ + const MODIFIED_GOOGLE_INITIATED_SYSTEM_OPERATION = 9; + /** + * Google-initiated access to maintain system reliability. + * + * Generated from protobuf enum GOOGLE_RESPONSE_TO_PRODUCTION_ALERT = 10; + */ + const GOOGLE_RESPONSE_TO_PRODUCTION_ALERT = 10; + /** + * One of the following operations is being executed while simultaneously + * encountering an internal technical issue which prevented a more precise + * justification code from being generated: + * * Your account has been used to perform any access to your own data which + * your IAM policy authorizes. + * * An automated Google system operates on encrypted customer data which your + * IAM policy authorizes. + * * Customer-initiated Google support access. + * * Google-initiated support access to protect system reliability. + * + * Generated from protobuf enum CUSTOMER_AUTHORIZED_WORKFLOW_SERVICING = 11; + */ + const CUSTOMER_AUTHORIZED_WORKFLOW_SERVICING = 11; + + private static $valueToName = [ + self::REASON_UNSPECIFIED => 'REASON_UNSPECIFIED', + self::CUSTOMER_INITIATED_SUPPORT => 'CUSTOMER_INITIATED_SUPPORT', + self::GOOGLE_INITIATED_SERVICE => 'GOOGLE_INITIATED_SERVICE', + self::THIRD_PARTY_DATA_REQUEST => 'THIRD_PARTY_DATA_REQUEST', + self::GOOGLE_INITIATED_REVIEW => 'GOOGLE_INITIATED_REVIEW', + self::CUSTOMER_INITIATED_ACCESS => 'CUSTOMER_INITIATED_ACCESS', + self::GOOGLE_INITIATED_SYSTEM_OPERATION => 'GOOGLE_INITIATED_SYSTEM_OPERATION', + self::REASON_NOT_EXPECTED => 'REASON_NOT_EXPECTED', + self::MODIFIED_CUSTOMER_INITIATED_ACCESS => 'MODIFIED_CUSTOMER_INITIATED_ACCESS', + self::MODIFIED_GOOGLE_INITIATED_SYSTEM_OPERATION => 'MODIFIED_GOOGLE_INITIATED_SYSTEM_OPERATION', + self::GOOGLE_RESPONSE_TO_PRODUCTION_ALERT => 'GOOGLE_RESPONSE_TO_PRODUCTION_ALERT', + self::CUSTOMER_AUTHORIZED_WORKFLOW_SERVICING => 'CUSTOMER_AUTHORIZED_WORKFLOW_SERVICING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ApproveSingleTenantHsmInstanceProposalRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ApproveSingleTenantHsmInstanceProposalRequest.php new file mode 100644 index 000000000000..73099685d70c --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ApproveSingleTenantHsmInstanceProposalRequest.php @@ -0,0 +1,188 @@ +google.cloud.kms.v1.ApproveSingleTenantHsmInstanceProposalRequest + */ +class ApproveSingleTenantHsmInstanceProposalRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The + * [name][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.name] of the + * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * to approve. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + protected $approval_payload; + + /** + * @param string $name Required. The + * [name][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.name] of the + * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * to approve. Please see + * {@see HsmManagementClient::singleTenantHsmInstanceProposalName()} for help formatting this field. + * @param \Google\Cloud\Kms\V1\ApproveSingleTenantHsmInstanceProposalRequest\QuorumReply $quorumReply Required. The reply to + * [QuorumParameters][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.QuorumParameters] + * for approving the proposal. + * + * @return \Google\Cloud\Kms\V1\ApproveSingleTenantHsmInstanceProposalRequest + * + * @experimental + */ + public static function build(string $name, \Google\Cloud\Kms\V1\ApproveSingleTenantHsmInstanceProposalRequest\QuorumReply $quorumReply): self + { + return (new self()) + ->setName($name) + ->setQuorumReply($quorumReply); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The + * [name][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.name] of the + * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * to approve. + * @type \Google\Cloud\Kms\V1\ApproveSingleTenantHsmInstanceProposalRequest\QuorumReply $quorum_reply + * Required. The reply to + * [QuorumParameters][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.QuorumParameters] + * for approving the proposal. + * @type \Google\Cloud\Kms\V1\ApproveSingleTenantHsmInstanceProposalRequest\RequiredActionQuorumReply $required_action_quorum_reply + * Required. The reply to + * [RequiredActionQuorumParameters][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.RequiredActionQuorumParameters] + * for approving the proposal. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\HsmManagement::initOnce(); + parent::__construct($data); + } + + /** + * Required. The + * [name][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.name] of the + * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * to approve. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The + * [name][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.name] of the + * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * to approve. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The reply to + * [QuorumParameters][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.QuorumParameters] + * for approving the proposal. + * + * Generated from protobuf field .google.cloud.kms.v1.ApproveSingleTenantHsmInstanceProposalRequest.QuorumReply quorum_reply = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Kms\V1\ApproveSingleTenantHsmInstanceProposalRequest\QuorumReply|null + */ + public function getQuorumReply() + { + return $this->readOneof(2); + } + + public function hasQuorumReply() + { + return $this->hasOneof(2); + } + + /** + * Required. The reply to + * [QuorumParameters][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.QuorumParameters] + * for approving the proposal. + * + * Generated from protobuf field .google.cloud.kms.v1.ApproveSingleTenantHsmInstanceProposalRequest.QuorumReply quorum_reply = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Kms\V1\ApproveSingleTenantHsmInstanceProposalRequest\QuorumReply $var + * @return $this + */ + public function setQuorumReply($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\ApproveSingleTenantHsmInstanceProposalRequest\QuorumReply::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Required. The reply to + * [RequiredActionQuorumParameters][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.RequiredActionQuorumParameters] + * for approving the proposal. + * + * Generated from protobuf field .google.cloud.kms.v1.ApproveSingleTenantHsmInstanceProposalRequest.RequiredActionQuorumReply required_action_quorum_reply = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Kms\V1\ApproveSingleTenantHsmInstanceProposalRequest\RequiredActionQuorumReply|null + */ + public function getRequiredActionQuorumReply() + { + return $this->readOneof(3); + } + + public function hasRequiredActionQuorumReply() + { + return $this->hasOneof(3); + } + + /** + * Required. The reply to + * [RequiredActionQuorumParameters][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.RequiredActionQuorumParameters] + * for approving the proposal. + * + * Generated from protobuf field .google.cloud.kms.v1.ApproveSingleTenantHsmInstanceProposalRequest.RequiredActionQuorumReply required_action_quorum_reply = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Kms\V1\ApproveSingleTenantHsmInstanceProposalRequest\RequiredActionQuorumReply $var + * @return $this + */ + public function setRequiredActionQuorumReply($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\ApproveSingleTenantHsmInstanceProposalRequest\RequiredActionQuorumReply::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getApprovalPayload() + { + return $this->whichOneof("approval_payload"); + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ApproveSingleTenantHsmInstanceProposalRequest/QuorumReply.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ApproveSingleTenantHsmInstanceProposalRequest/QuorumReply.php new file mode 100644 index 000000000000..fd5f7095a21a --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ApproveSingleTenantHsmInstanceProposalRequest/QuorumReply.php @@ -0,0 +1,88 @@ +google.cloud.kms.v1.ApproveSingleTenantHsmInstanceProposalRequest.QuorumReply + */ +class QuorumReply extends \Google\Protobuf\Internal\Message +{ + /** + * 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][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.QuorumParameters.required_approver_count] + * challenge replies are provided. + * + * Generated from protobuf field repeated .google.cloud.kms.v1.ChallengeReply challenge_replies = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $challenge_replies; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Kms\V1\ChallengeReply>|\Google\Protobuf\Internal\RepeatedField $challenge_replies + * 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][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.QuorumParameters.required_approver_count] + * challenge replies are provided. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\HsmManagement::initOnce(); + parent::__construct($data); + } + + /** + * 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][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.QuorumParameters.required_approver_count] + * challenge replies are provided. + * + * Generated from protobuf field repeated .google.cloud.kms.v1.ChallengeReply challenge_replies = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getChallengeReplies() + { + return $this->challenge_replies; + } + + /** + * 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][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.QuorumParameters.required_approver_count] + * challenge replies are provided. + * + * Generated from protobuf field repeated .google.cloud.kms.v1.ChallengeReply challenge_replies = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\Kms\V1\ChallengeReply>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setChallengeReplies($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Kms\V1\ChallengeReply::class); + $this->challenge_replies = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(QuorumReply::class, \Google\Cloud\Kms\V1\ApproveSingleTenantHsmInstanceProposalRequest_QuorumReply::class); + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ApproveSingleTenantHsmInstanceProposalRequest/RequiredActionQuorumReply.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ApproveSingleTenantHsmInstanceProposalRequest/RequiredActionQuorumReply.php new file mode 100644 index 000000000000..4ec0401a8c0d --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ApproveSingleTenantHsmInstanceProposalRequest/RequiredActionQuorumReply.php @@ -0,0 +1,126 @@ +google.cloud.kms.v1.ApproveSingleTenantHsmInstanceProposalRequest.RequiredActionQuorumReply + */ +class RequiredActionQuorumReply extends \Google\Protobuf\Internal\Message +{ + /** + * Required. All required challenges must be signed for the proposal to be + * approved. These can be sent across multiple requests. + * + * Generated from protobuf field repeated .google.cloud.kms.v1.ChallengeReply required_challenge_replies = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $required_challenge_replies; + /** + * Required. Quorum members' signed challenge replies. These can be provided + * across multiple requests. The proposal will be approved when + * [required_approver_count][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.RequiredActionQuorumParameters.required_approver_count] + * quorum_challenge_replies are provided and when all + * required_challenge_replies are provided. + * + * Generated from protobuf field repeated .google.cloud.kms.v1.ChallengeReply quorum_challenge_replies = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $quorum_challenge_replies; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Kms\V1\ChallengeReply>|\Google\Protobuf\Internal\RepeatedField $required_challenge_replies + * Required. All required challenges must be signed for the proposal to be + * approved. These can be sent across multiple requests. + * @type array<\Google\Cloud\Kms\V1\ChallengeReply>|\Google\Protobuf\Internal\RepeatedField $quorum_challenge_replies + * Required. Quorum members' signed challenge replies. These can be provided + * across multiple requests. The proposal will be approved when + * [required_approver_count][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.RequiredActionQuorumParameters.required_approver_count] + * quorum_challenge_replies are provided and when all + * required_challenge_replies are provided. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\HsmManagement::initOnce(); + parent::__construct($data); + } + + /** + * Required. All required challenges must be signed for the proposal to be + * approved. These can be sent across multiple requests. + * + * Generated from protobuf field repeated .google.cloud.kms.v1.ChallengeReply required_challenge_replies = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRequiredChallengeReplies() + { + return $this->required_challenge_replies; + } + + /** + * Required. All required challenges must be signed for the proposal to be + * approved. These can be sent across multiple requests. + * + * Generated from protobuf field repeated .google.cloud.kms.v1.ChallengeReply required_challenge_replies = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\Kms\V1\ChallengeReply>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRequiredChallengeReplies($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Kms\V1\ChallengeReply::class); + $this->required_challenge_replies = $arr; + + return $this; + } + + /** + * Required. Quorum members' signed challenge replies. These can be provided + * across multiple requests. The proposal will be approved when + * [required_approver_count][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.RequiredActionQuorumParameters.required_approver_count] + * quorum_challenge_replies are provided and when all + * required_challenge_replies are provided. + * + * Generated from protobuf field repeated .google.cloud.kms.v1.ChallengeReply quorum_challenge_replies = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getQuorumChallengeReplies() + { + return $this->quorum_challenge_replies; + } + + /** + * Required. Quorum members' signed challenge replies. These can be provided + * across multiple requests. The proposal will be approved when + * [required_approver_count][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.RequiredActionQuorumParameters.required_approver_count] + * quorum_challenge_replies are provided and when all + * required_challenge_replies are provided. + * + * Generated from protobuf field repeated .google.cloud.kms.v1.ChallengeReply quorum_challenge_replies = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\Kms\V1\ChallengeReply>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setQuorumChallengeReplies($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Kms\V1\ChallengeReply::class); + $this->quorum_challenge_replies = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RequiredActionQuorumReply::class, \Google\Cloud\Kms\V1\ApproveSingleTenantHsmInstanceProposalRequest_RequiredActionQuorumReply::class); + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ApproveSingleTenantHsmInstanceProposalResponse.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ApproveSingleTenantHsmInstanceProposalResponse.php new file mode 100644 index 000000000000..f4298b3e4991 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ApproveSingleTenantHsmInstanceProposalResponse.php @@ -0,0 +1,34 @@ +google.cloud.kms.v1.ApproveSingleTenantHsmInstanceProposalResponse + */ +class ApproveSingleTenantHsmInstanceProposalResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\HsmManagement::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AsymmetricDecryptRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AsymmetricDecryptRequest.php new file mode 100644 index 000000000000..d091cf22284b --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AsymmetricDecryptRequest.php @@ -0,0 +1,317 @@ +google.cloud.kms.v1.AsymmetricDecryptRequest + */ +class AsymmetricDecryptRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for + * decryption. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. The data encrypted with the named + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s public key using + * OAEP. + * + * Generated from protobuf field bytes ciphertext = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $ciphertext = ''; + /** + * Optional. An optional CRC32C checksum of the + * [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]) + * is equal to + * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $ciphertext_crc32c = null; + + /** + * @param string $name Required. The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for + * decryption. Please see + * {@see KeyManagementServiceClient::cryptoKeyVersionName()} for help formatting this field. + * @param string $ciphertext Required. The data encrypted with the named + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s public key using + * OAEP. + * + * @return \Google\Cloud\Kms\V1\AsymmetricDecryptRequest + * + * @experimental + */ + public static function build(string $name, string $ciphertext): self + { + return (new self()) + ->setName($name) + ->setCiphertext($ciphertext); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for + * decryption. + * @type string $ciphertext + * Required. The data encrypted with the named + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s public key using + * OAEP. + * @type \Google\Protobuf\Int64Value $ciphertext_crc32c + * Optional. An optional CRC32C checksum of the + * [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]) + * is equal to + * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.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. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for + * decryption. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for + * decryption. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The data encrypted with the named + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s public key using + * OAEP. + * + * Generated from protobuf field bytes ciphertext = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getCiphertext() + { + return $this->ciphertext; + } + + /** + * Required. The data encrypted with the named + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s public key using + * OAEP. + * + * Generated from protobuf field bytes ciphertext = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setCiphertext($var) + { + GPBUtil::checkString($var, False); + $this->ciphertext = $var; + + return $this; + } + + /** + * Optional. An optional CRC32C checksum of the + * [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]) + * is equal to + * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Int64Value|null + */ + public function getCiphertextCrc32C() + { + return $this->ciphertext_crc32c; + } + + public function hasCiphertextCrc32C() + { + return isset($this->ciphertext_crc32c); + } + + public function clearCiphertextCrc32C() + { + unset($this->ciphertext_crc32c); + } + + /** + * Returns the unboxed value from getCiphertextCrc32C() + + * Optional. An optional CRC32C checksum of the + * [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]) + * is equal to + * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string|null + */ + public function getCiphertextCrc32CUnwrapped() + { + return $this->readWrapperValue("ciphertext_crc32c"); + } + + /** + * Optional. An optional CRC32C checksum of the + * [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]) + * is equal to + * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setCiphertextCrc32C($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->ciphertext_crc32c = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. + + * Optional. An optional CRC32C checksum of the + * [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]) + * is equal to + * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string|null $var + * @return $this + */ + public function setCiphertextCrc32CUnwrapped($var) + { + $this->writeWrapperValue("ciphertext_crc32c", $var); + return $this;} + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AsymmetricDecryptResponse.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AsymmetricDecryptResponse.php new file mode 100644 index 000000000000..a50201e6aac9 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AsymmetricDecryptResponse.php @@ -0,0 +1,339 @@ +google.cloud.kms.v1.AsymmetricDecryptResponse + */ +class AsymmetricDecryptResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The decrypted data originally encrypted with the matching public key. + * + * Generated from protobuf field bytes plaintext = 1; + */ + protected $plaintext = ''; + /** + * Integrity verification field. A CRC32C checksum of the returned + * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext]. + * An integrity check of + * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext] + * can be performed by computing the CRC32C checksum of + * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 2; + */ + protected $plaintext_crc32c = null; + /** + * Integrity verification field. A flag indicating whether + * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of the + * [ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]. A + * false value of this field indicates either that + * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * + * Generated from protobuf field bool verified_ciphertext_crc32c = 3; + */ + protected $verified_ciphertext_crc32c = false; + /** + * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in + * decryption. + * + * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 4; + */ + protected $protection_level = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $plaintext + * The decrypted data originally encrypted with the matching public key. + * @type \Google\Protobuf\Int64Value $plaintext_crc32c + * Integrity verification field. A CRC32C checksum of the returned + * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext]. + * An integrity check of + * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext] + * can be performed by computing the CRC32C checksum of + * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.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. + * @type bool $verified_ciphertext_crc32c + * Integrity verification field. A flag indicating whether + * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of the + * [ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]. A + * false value of this field indicates either that + * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * @type int $protection_level + * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in + * decryption. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * The decrypted data originally encrypted with the matching public key. + * + * Generated from protobuf field bytes plaintext = 1; + * @return string + */ + public function getPlaintext() + { + return $this->plaintext; + } + + /** + * The decrypted data originally encrypted with the matching public key. + * + * Generated from protobuf field bytes plaintext = 1; + * @param string $var + * @return $this + */ + public function setPlaintext($var) + { + GPBUtil::checkString($var, False); + $this->plaintext = $var; + + return $this; + } + + /** + * Integrity verification field. A CRC32C checksum of the returned + * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext]. + * An integrity check of + * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext] + * can be performed by computing the CRC32C checksum of + * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 2; + * @return \Google\Protobuf\Int64Value|null + */ + public function getPlaintextCrc32C() + { + return $this->plaintext_crc32c; + } + + public function hasPlaintextCrc32C() + { + return isset($this->plaintext_crc32c); + } + + public function clearPlaintextCrc32C() + { + unset($this->plaintext_crc32c); + } + + /** + * Returns the unboxed value from getPlaintextCrc32C() + + * Integrity verification field. A CRC32C checksum of the returned + * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext]. + * An integrity check of + * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext] + * can be performed by computing the CRC32C checksum of + * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 2; + * @return int|string|null + */ + public function getPlaintextCrc32CUnwrapped() + { + return $this->readWrapperValue("plaintext_crc32c"); + } + + /** + * Integrity verification field. A CRC32C checksum of the returned + * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext]. + * An integrity check of + * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext] + * can be performed by computing the CRC32C checksum of + * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 2; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setPlaintextCrc32C($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->plaintext_crc32c = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. + + * Integrity verification field. A CRC32C checksum of the returned + * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext]. + * An integrity check of + * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext] + * can be performed by computing the CRC32C checksum of + * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 2; + * @param int|string|null $var + * @return $this + */ + public function setPlaintextCrc32CUnwrapped($var) + { + $this->writeWrapperValue("plaintext_crc32c", $var); + return $this;} + + /** + * Integrity verification field. A flag indicating whether + * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of the + * [ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]. A + * false value of this field indicates either that + * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * + * Generated from protobuf field bool verified_ciphertext_crc32c = 3; + * @return bool + */ + public function getVerifiedCiphertextCrc32C() + { + return $this->verified_ciphertext_crc32c; + } + + /** + * Integrity verification field. A flag indicating whether + * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of the + * [ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]. A + * false value of this field indicates either that + * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * + * Generated from protobuf field bool verified_ciphertext_crc32c = 3; + * @param bool $var + * @return $this + */ + public function setVerifiedCiphertextCrc32C($var) + { + GPBUtil::checkBool($var); + $this->verified_ciphertext_crc32c = $var; + + return $this; + } + + /** + * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in + * decryption. + * + * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 4; + * @return int + */ + public function getProtectionLevel() + { + return $this->protection_level; + } + + /** + * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in + * decryption. + * + * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 4; + * @param int $var + * @return $this + */ + public function setProtectionLevel($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\ProtectionLevel::class); + $this->protection_level = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AsymmetricSignRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AsymmetricSignRequest.php new file mode 100644 index 000000000000..2dae2bd9fd19 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AsymmetricSignRequest.php @@ -0,0 +1,568 @@ +google.cloud.kms.v1.AsymmetricSignRequest + */ +class AsymmetricSignRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for + * signing. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * 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][google.cloud.kms.v1.CryptoKeyVersion.algorithm]. + * This field may not be supplied if + * [AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data] + * is supplied. + * + * Generated from protobuf field .google.cloud.kms.v1.Digest digest = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $digest = null; + /** + * Optional. An optional CRC32C checksum of the + * [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]) + * is equal to + * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value digest_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $digest_crc32c = null; + /** + * Optional. The data to sign. + * It can't be supplied if + * [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest] + * is supplied. + * + * Generated from protobuf field bytes data = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $data = ''; + /** + * Optional. An optional CRC32C checksum of the + * [AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data]) + * is equal to + * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $data_crc32c = null; + + /** + * @param string $name Required. The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for + * signing. Please see + * {@see KeyManagementServiceClient::cryptoKeyVersionName()} for help formatting this field. + * @param \Google\Cloud\Kms\V1\Digest $digest 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][google.cloud.kms.v1.CryptoKeyVersion.algorithm]. + * + * This field may not be supplied if + * [AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data] + * is supplied. + * + * @return \Google\Cloud\Kms\V1\AsymmetricSignRequest + * + * @experimental + */ + public static function build(string $name, \Google\Cloud\Kms\V1\Digest $digest): self + { + return (new self()) + ->setName($name) + ->setDigest($digest); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for + * signing. + * @type \Google\Cloud\Kms\V1\Digest $digest + * 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][google.cloud.kms.v1.CryptoKeyVersion.algorithm]. + * This field may not be supplied if + * [AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data] + * is supplied. + * @type \Google\Protobuf\Int64Value $digest_crc32c + * Optional. An optional CRC32C checksum of the + * [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]) + * is equal to + * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.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. + * @type string $data + * Optional. The data to sign. + * It can't be supplied if + * [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest] + * is supplied. + * @type \Google\Protobuf\Int64Value $data_crc32c + * Optional. An optional CRC32C checksum of the + * [AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data]) + * is equal to + * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.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. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for + * signing. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for + * signing. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * 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][google.cloud.kms.v1.CryptoKeyVersion.algorithm]. + * This field may not be supplied if + * [AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data] + * is supplied. + * + * Generated from protobuf field .google.cloud.kms.v1.Digest digest = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Kms\V1\Digest|null + */ + public function getDigest() + { + return $this->digest; + } + + public function hasDigest() + { + return isset($this->digest); + } + + public function clearDigest() + { + unset($this->digest); + } + + /** + * 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][google.cloud.kms.v1.CryptoKeyVersion.algorithm]. + * This field may not be supplied if + * [AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data] + * is supplied. + * + * Generated from protobuf field .google.cloud.kms.v1.Digest digest = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Kms\V1\Digest $var + * @return $this + */ + public function setDigest($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\Digest::class); + $this->digest = $var; + + return $this; + } + + /** + * Optional. An optional CRC32C checksum of the + * [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]) + * is equal to + * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value digest_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Int64Value|null + */ + public function getDigestCrc32C() + { + return $this->digest_crc32c; + } + + public function hasDigestCrc32C() + { + return isset($this->digest_crc32c); + } + + public function clearDigestCrc32C() + { + unset($this->digest_crc32c); + } + + /** + * Returns the unboxed value from getDigestCrc32C() + + * Optional. An optional CRC32C checksum of the + * [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]) + * is equal to + * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value digest_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string|null + */ + public function getDigestCrc32CUnwrapped() + { + return $this->readWrapperValue("digest_crc32c"); + } + + /** + * Optional. An optional CRC32C checksum of the + * [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]) + * is equal to + * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value digest_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setDigestCrc32C($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->digest_crc32c = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. + + * Optional. An optional CRC32C checksum of the + * [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]) + * is equal to + * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value digest_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string|null $var + * @return $this + */ + public function setDigestCrc32CUnwrapped($var) + { + $this->writeWrapperValue("digest_crc32c", $var); + return $this;} + + /** + * Optional. The data to sign. + * It can't be supplied if + * [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest] + * is supplied. + * + * Generated from protobuf field bytes data = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getData() + { + return $this->data; + } + + /** + * Optional. The data to sign. + * It can't be supplied if + * [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest] + * is supplied. + * + * Generated from protobuf field bytes data = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setData($var) + { + GPBUtil::checkString($var, False); + $this->data = $var; + + return $this; + } + + /** + * Optional. An optional CRC32C checksum of the + * [AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data]) + * is equal to + * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Int64Value|null + */ + public function getDataCrc32C() + { + return $this->data_crc32c; + } + + public function hasDataCrc32C() + { + return isset($this->data_crc32c); + } + + public function clearDataCrc32C() + { + unset($this->data_crc32c); + } + + /** + * Returns the unboxed value from getDataCrc32C() + + * Optional. An optional CRC32C checksum of the + * [AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data]) + * is equal to + * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string|null + */ + public function getDataCrc32CUnwrapped() + { + return $this->readWrapperValue("data_crc32c"); + } + + /** + * Optional. An optional CRC32C checksum of the + * [AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data]) + * is equal to + * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setDataCrc32C($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->data_crc32c = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. + + * Optional. An optional CRC32C checksum of the + * [AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data]) + * is equal to + * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string|null $var + * @return $this + */ + public function setDataCrc32CUnwrapped($var) + { + $this->writeWrapperValue("data_crc32c", $var); + return $this;} + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AsymmetricSignResponse.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AsymmetricSignResponse.php new file mode 100644 index 000000000000..efec99a14768 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AsymmetricSignResponse.php @@ -0,0 +1,463 @@ +google.cloud.kms.v1.AsymmetricSignResponse + */ +class AsymmetricSignResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The created signature. + * + * Generated from protobuf field bytes signature = 1; + */ + protected $signature = ''; + /** + * Integrity verification field. A CRC32C checksum of the returned + * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature]. + * An integrity check of + * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] + * can be performed by computing the CRC32C checksum of + * [AsymmetricSignResponse.signature][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value signature_crc32c = 2; + */ + protected $signature_crc32c = null; + /** + * Integrity verification field. A flag indicating whether + * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of the + * [digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]. A false value + * of this field indicates either that + * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * + * Generated from protobuf field bool verified_digest_crc32c = 3; + */ + protected $verified_digest_crc32c = false; + /** + * The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. + * Check this field to verify that the intended resource was used for signing. + * + * Generated from protobuf field string name = 4; + */ + protected $name = ''; + /** + * Integrity verification field. A flag indicating whether + * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of the + * [data][google.cloud.kms.v1.AsymmetricSignRequest.data]. A false value of + * this field indicates either that + * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * + * Generated from protobuf field bool verified_data_crc32c = 5; + */ + protected $verified_data_crc32c = false; + /** + * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. + * + * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 6; + */ + protected $protection_level = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $signature + * The created signature. + * @type \Google\Protobuf\Int64Value $signature_crc32c + * Integrity verification field. A CRC32C checksum of the returned + * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature]. + * An integrity check of + * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] + * can be performed by computing the CRC32C checksum of + * [AsymmetricSignResponse.signature][google.cloud.kms.v1.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. + * @type bool $verified_digest_crc32c + * Integrity verification field. A flag indicating whether + * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of the + * [digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]. A false value + * of this field indicates either that + * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * @type string $name + * The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. + * Check this field to verify that the intended resource was used for signing. + * @type bool $verified_data_crc32c + * Integrity verification field. A flag indicating whether + * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of the + * [data][google.cloud.kms.v1.AsymmetricSignRequest.data]. A false value of + * this field indicates either that + * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * @type int $protection_level + * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * The created signature. + * + * Generated from protobuf field bytes signature = 1; + * @return string + */ + public function getSignature() + { + return $this->signature; + } + + /** + * The created signature. + * + * Generated from protobuf field bytes signature = 1; + * @param string $var + * @return $this + */ + public function setSignature($var) + { + GPBUtil::checkString($var, False); + $this->signature = $var; + + return $this; + } + + /** + * Integrity verification field. A CRC32C checksum of the returned + * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature]. + * An integrity check of + * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] + * can be performed by computing the CRC32C checksum of + * [AsymmetricSignResponse.signature][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value signature_crc32c = 2; + * @return \Google\Protobuf\Int64Value|null + */ + public function getSignatureCrc32C() + { + return $this->signature_crc32c; + } + + public function hasSignatureCrc32C() + { + return isset($this->signature_crc32c); + } + + public function clearSignatureCrc32C() + { + unset($this->signature_crc32c); + } + + /** + * Returns the unboxed value from getSignatureCrc32C() + + * Integrity verification field. A CRC32C checksum of the returned + * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature]. + * An integrity check of + * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] + * can be performed by computing the CRC32C checksum of + * [AsymmetricSignResponse.signature][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value signature_crc32c = 2; + * @return int|string|null + */ + public function getSignatureCrc32CUnwrapped() + { + return $this->readWrapperValue("signature_crc32c"); + } + + /** + * Integrity verification field. A CRC32C checksum of the returned + * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature]. + * An integrity check of + * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] + * can be performed by computing the CRC32C checksum of + * [AsymmetricSignResponse.signature][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value signature_crc32c = 2; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setSignatureCrc32C($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->signature_crc32c = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. + + * Integrity verification field. A CRC32C checksum of the returned + * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature]. + * An integrity check of + * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] + * can be performed by computing the CRC32C checksum of + * [AsymmetricSignResponse.signature][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value signature_crc32c = 2; + * @param int|string|null $var + * @return $this + */ + public function setSignatureCrc32CUnwrapped($var) + { + $this->writeWrapperValue("signature_crc32c", $var); + return $this;} + + /** + * Integrity verification field. A flag indicating whether + * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of the + * [digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]. A false value + * of this field indicates either that + * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * + * Generated from protobuf field bool verified_digest_crc32c = 3; + * @return bool + */ + public function getVerifiedDigestCrc32C() + { + return $this->verified_digest_crc32c; + } + + /** + * Integrity verification field. A flag indicating whether + * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of the + * [digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]. A false value + * of this field indicates either that + * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * + * Generated from protobuf field bool verified_digest_crc32c = 3; + * @param bool $var + * @return $this + */ + public function setVerifiedDigestCrc32C($var) + { + GPBUtil::checkBool($var); + $this->verified_digest_crc32c = $var; + + return $this; + } + + /** + * The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. + * Check this field to verify that the intended resource was used for signing. + * + * Generated from protobuf field string name = 4; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. + * Check this field to verify that the intended resource was used for signing. + * + * Generated from protobuf field string name = 4; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Integrity verification field. A flag indicating whether + * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of the + * [data][google.cloud.kms.v1.AsymmetricSignRequest.data]. A false value of + * this field indicates either that + * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * + * Generated from protobuf field bool verified_data_crc32c = 5; + * @return bool + */ + public function getVerifiedDataCrc32C() + { + return $this->verified_data_crc32c; + } + + /** + * Integrity verification field. A flag indicating whether + * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of the + * [data][google.cloud.kms.v1.AsymmetricSignRequest.data]. A false value of + * this field indicates either that + * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * + * Generated from protobuf field bool verified_data_crc32c = 5; + * @param bool $var + * @return $this + */ + public function setVerifiedDataCrc32C($var) + { + GPBUtil::checkBool($var); + $this->verified_data_crc32c = $var; + + return $this; + } + + /** + * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. + * + * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 6; + * @return int + */ + public function getProtectionLevel() + { + return $this->protection_level; + } + + /** + * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. + * + * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 6; + * @param int $var + * @return $this + */ + public function setProtectionLevel($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\ProtectionLevel::class); + $this->protection_level = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AutokeyConfig.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AutokeyConfig.php new file mode 100644 index 000000000000..cc493fef83be --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AutokeyConfig.php @@ -0,0 +1,271 @@ +google.cloud.kms.v1.AutokeyConfig + */ +class AutokeyConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. Name of the [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig] + * resource, e.g. `folders/{FOLDER_NUMBER}/autokeyConfig` or + * `projects/{PROJECT_NUMBER}/autokeyConfig`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Optional. Name of the key project, e.g. `projects/{PROJECT_ID}` or + * `projects/{PROJECT_NUMBER}`, where Cloud KMS Autokey will provision a new + * [CryptoKey][google.cloud.kms.v1.CryptoKey] when a + * [KeyHandle][google.cloud.kms.v1.KeyHandle] is created. On + * [UpdateAutokeyConfig][google.cloud.kms.v1.AutokeyAdmin.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. + * + * Generated from protobuf field string key_project = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $key_project = ''; + /** + * Output only. The state for the AutokeyConfig. + * + * Generated from protobuf field .google.cloud.kms.v1.AutokeyConfig.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * 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. + * + * Generated from protobuf field string etag = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $etag = ''; + /** + * Optional. KeyProjectResolutionMode for the AutokeyConfig. + * Valid values are `DEDICATED_KEY_PROJECT`, `RESOURCE_PROJECT`, or + * `DISABLED`. + * + * Generated from protobuf field .google.cloud.kms.v1.AutokeyConfig.KeyProjectResolutionMode key_project_resolution_mode = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $key_project_resolution_mode = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. Name of the [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig] + * resource, e.g. `folders/{FOLDER_NUMBER}/autokeyConfig` or + * `projects/{PROJECT_NUMBER}/autokeyConfig`. + * @type string $key_project + * Optional. Name of the key project, e.g. `projects/{PROJECT_ID}` or + * `projects/{PROJECT_NUMBER}`, where Cloud KMS Autokey will provision a new + * [CryptoKey][google.cloud.kms.v1.CryptoKey] when a + * [KeyHandle][google.cloud.kms.v1.KeyHandle] is created. On + * [UpdateAutokeyConfig][google.cloud.kms.v1.AutokeyAdmin.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. + * @type int $state + * Output only. The state for the AutokeyConfig. + * @type string $etag + * 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. + * @type int $key_project_resolution_mode + * Optional. KeyProjectResolutionMode for the AutokeyConfig. + * Valid values are `DEDICATED_KEY_PROJECT`, `RESOURCE_PROJECT`, or + * `DISABLED`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\AutokeyAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. Name of the [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig] + * resource, e.g. `folders/{FOLDER_NUMBER}/autokeyConfig` or + * `projects/{PROJECT_NUMBER}/autokeyConfig`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. Name of the [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig] + * resource, e.g. `folders/{FOLDER_NUMBER}/autokeyConfig` or + * `projects/{PROJECT_NUMBER}/autokeyConfig`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. Name of the key project, e.g. `projects/{PROJECT_ID}` or + * `projects/{PROJECT_NUMBER}`, where Cloud KMS Autokey will provision a new + * [CryptoKey][google.cloud.kms.v1.CryptoKey] when a + * [KeyHandle][google.cloud.kms.v1.KeyHandle] is created. On + * [UpdateAutokeyConfig][google.cloud.kms.v1.AutokeyAdmin.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. + * + * Generated from protobuf field string key_project = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getKeyProject() + { + return $this->key_project; + } + + /** + * Optional. Name of the key project, e.g. `projects/{PROJECT_ID}` or + * `projects/{PROJECT_NUMBER}`, where Cloud KMS Autokey will provision a new + * [CryptoKey][google.cloud.kms.v1.CryptoKey] when a + * [KeyHandle][google.cloud.kms.v1.KeyHandle] is created. On + * [UpdateAutokeyConfig][google.cloud.kms.v1.AutokeyAdmin.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. + * + * Generated from protobuf field string key_project = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setKeyProject($var) + { + GPBUtil::checkString($var, True); + $this->key_project = $var; + + return $this; + } + + /** + * Output only. The state for the AutokeyConfig. + * + * Generated from protobuf field .google.cloud.kms.v1.AutokeyConfig.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The state for the AutokeyConfig. + * + * Generated from protobuf field .google.cloud.kms.v1.AutokeyConfig.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\AutokeyConfig\State::class); + $this->state = $var; + + return $this; + } + + /** + * 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. + * + * Generated from protobuf field string etag = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * 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. + * + * Generated from protobuf field string etag = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + + /** + * Optional. KeyProjectResolutionMode for the AutokeyConfig. + * Valid values are `DEDICATED_KEY_PROJECT`, `RESOURCE_PROJECT`, or + * `DISABLED`. + * + * Generated from protobuf field .google.cloud.kms.v1.AutokeyConfig.KeyProjectResolutionMode key_project_resolution_mode = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getKeyProjectResolutionMode() + { + return $this->key_project_resolution_mode; + } + + /** + * Optional. KeyProjectResolutionMode for the AutokeyConfig. + * Valid values are `DEDICATED_KEY_PROJECT`, `RESOURCE_PROJECT`, or + * `DISABLED`. + * + * Generated from protobuf field .google.cloud.kms.v1.AutokeyConfig.KeyProjectResolutionMode key_project_resolution_mode = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setKeyProjectResolutionMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\AutokeyConfig\KeyProjectResolutionMode::class); + $this->key_project_resolution_mode = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AutokeyConfig/KeyProjectResolutionMode.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AutokeyConfig/KeyProjectResolutionMode.php new file mode 100644 index 000000000000..f235653a2686 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AutokeyConfig/KeyProjectResolutionMode.php @@ -0,0 +1,86 @@ +google.cloud.kms.v1.AutokeyConfig.KeyProjectResolutionMode + */ +class KeyProjectResolutionMode +{ + /** + * Default value. KeyProjectResolutionMode when not specified will act as + * `DEDICATED_KEY_PROJECT`. + * + * Generated from protobuf enum KEY_PROJECT_RESOLUTION_MODE_UNSPECIFIED = 0; + */ + const KEY_PROJECT_RESOLUTION_MODE_UNSPECIFIED = 0; + /** + * Keys are created in a dedicated project specified by `key_project`. + * + * Generated from protobuf enum DEDICATED_KEY_PROJECT = 1; + */ + const DEDICATED_KEY_PROJECT = 1; + /** + * 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. + * + * Generated from protobuf enum RESOURCE_PROJECT = 2; + */ + const RESOURCE_PROJECT = 2; + /** + * 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). + * + * Generated from protobuf enum DISABLED = 3; + */ + const DISABLED = 3; + + private static $valueToName = [ + self::KEY_PROJECT_RESOLUTION_MODE_UNSPECIFIED => 'KEY_PROJECT_RESOLUTION_MODE_UNSPECIFIED', + self::DEDICATED_KEY_PROJECT => 'DEDICATED_KEY_PROJECT', + self::RESOURCE_PROJECT => 'RESOURCE_PROJECT', + self::DISABLED => 'DISABLED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(KeyProjectResolutionMode::class, \Google\Cloud\Kms\V1\AutokeyConfig_KeyProjectResolutionMode::class); + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AutokeyConfig/State.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AutokeyConfig/State.php new file mode 100644 index 000000000000..a53708d6b0ca --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AutokeyConfig/State.php @@ -0,0 +1,81 @@ +google.cloud.kms.v1.AutokeyConfig.State + */ +class State +{ + /** + * The state of the AutokeyConfig is unspecified. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The AutokeyConfig is currently active. + * + * Generated from protobuf enum ACTIVE = 1; + */ + const ACTIVE = 1; + /** + * A previously configured key project has been deleted and the current + * AutokeyConfig is unusable. + * + * Generated from protobuf enum KEY_PROJECT_DELETED = 2; + */ + const KEY_PROJECT_DELETED = 2; + /** + * The AutokeyConfig is not yet initialized or has been reset to its default + * uninitialized state. + * + * Generated from protobuf enum UNINITIALIZED = 3; + */ + const UNINITIALIZED = 3; + /** + * The service account lacks the necessary permissions in the key project to + * configure Autokey. + * + * Generated from protobuf enum KEY_PROJECT_PERMISSION_DENIED = 4; + */ + const KEY_PROJECT_PERMISSION_DENIED = 4; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::ACTIVE => 'ACTIVE', + self::KEY_PROJECT_DELETED => 'KEY_PROJECT_DELETED', + self::UNINITIALIZED => 'UNINITIALIZED', + self::KEY_PROJECT_PERMISSION_DENIED => 'KEY_PROJECT_PERMISSION_DENIED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\Kms\V1\AutokeyConfig_State::class); + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/Certificate.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/Certificate.php new file mode 100644 index 000000000000..db653c93c4a9 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/Certificate.php @@ -0,0 +1,388 @@ +google.cloud.kms.v1.Certificate + */ +class Certificate extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The raw certificate bytes in DER format. + * + * Generated from protobuf field bytes raw_der = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $raw_der = ''; + /** + * Output only. True if the certificate was parsed successfully. + * + * Generated from protobuf field bool parsed = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $parsed = false; + /** + * Output only. The issuer distinguished name in RFC 2253 format. Only present + * if [parsed][google.cloud.kms.v1.Certificate.parsed] is true. + * + * Generated from protobuf field string issuer = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $issuer = ''; + /** + * Output only. The subject distinguished name in RFC 2253 format. Only + * present if [parsed][google.cloud.kms.v1.Certificate.parsed] is true. + * + * Generated from protobuf field string subject = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $subject = ''; + /** + * Output only. The subject Alternative DNS names. Only present if + * [parsed][google.cloud.kms.v1.Certificate.parsed] is true. + * + * Generated from protobuf field repeated string subject_alternative_dns_names = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $subject_alternative_dns_names; + /** + * Output only. The certificate is not valid before this time. Only present if + * [parsed][google.cloud.kms.v1.Certificate.parsed] is true. + * + * Generated from protobuf field .google.protobuf.Timestamp not_before_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $not_before_time = null; + /** + * Output only. The certificate is not valid after this time. Only present if + * [parsed][google.cloud.kms.v1.Certificate.parsed] is true. + * + * Generated from protobuf field .google.protobuf.Timestamp not_after_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $not_after_time = null; + /** + * Output only. The certificate serial number as a hex string. Only present if + * [parsed][google.cloud.kms.v1.Certificate.parsed] is true. + * + * Generated from protobuf field string serial_number = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $serial_number = ''; + /** + * Output only. The SHA-256 certificate fingerprint as a hex string. Only + * present if [parsed][google.cloud.kms.v1.Certificate.parsed] is true. + * + * Generated from protobuf field string sha256_fingerprint = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $sha256_fingerprint = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $raw_der + * Required. The raw certificate bytes in DER format. + * @type bool $parsed + * Output only. True if the certificate was parsed successfully. + * @type string $issuer + * Output only. The issuer distinguished name in RFC 2253 format. Only present + * if [parsed][google.cloud.kms.v1.Certificate.parsed] is true. + * @type string $subject + * Output only. The subject distinguished name in RFC 2253 format. Only + * present if [parsed][google.cloud.kms.v1.Certificate.parsed] is true. + * @type array|\Google\Protobuf\Internal\RepeatedField $subject_alternative_dns_names + * Output only. The subject Alternative DNS names. Only present if + * [parsed][google.cloud.kms.v1.Certificate.parsed] is true. + * @type \Google\Protobuf\Timestamp $not_before_time + * Output only. The certificate is not valid before this time. Only present if + * [parsed][google.cloud.kms.v1.Certificate.parsed] is true. + * @type \Google\Protobuf\Timestamp $not_after_time + * Output only. The certificate is not valid after this time. Only present if + * [parsed][google.cloud.kms.v1.Certificate.parsed] is true. + * @type string $serial_number + * Output only. The certificate serial number as a hex string. Only present if + * [parsed][google.cloud.kms.v1.Certificate.parsed] is true. + * @type string $sha256_fingerprint + * Output only. The SHA-256 certificate fingerprint as a hex string. Only + * present if [parsed][google.cloud.kms.v1.Certificate.parsed] is true. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\EkmService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The raw certificate bytes in DER format. + * + * Generated from protobuf field bytes raw_der = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getRawDer() + { + return $this->raw_der; + } + + /** + * Required. The raw certificate bytes in DER format. + * + * Generated from protobuf field bytes raw_der = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setRawDer($var) + { + GPBUtil::checkString($var, False); + $this->raw_der = $var; + + return $this; + } + + /** + * Output only. True if the certificate was parsed successfully. + * + * Generated from protobuf field bool parsed = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getParsed() + { + return $this->parsed; + } + + /** + * Output only. True if the certificate was parsed successfully. + * + * Generated from protobuf field bool parsed = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setParsed($var) + { + GPBUtil::checkBool($var); + $this->parsed = $var; + + return $this; + } + + /** + * Output only. The issuer distinguished name in RFC 2253 format. Only present + * if [parsed][google.cloud.kms.v1.Certificate.parsed] is true. + * + * Generated from protobuf field string issuer = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getIssuer() + { + return $this->issuer; + } + + /** + * Output only. The issuer distinguished name in RFC 2253 format. Only present + * if [parsed][google.cloud.kms.v1.Certificate.parsed] is true. + * + * Generated from protobuf field string issuer = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setIssuer($var) + { + GPBUtil::checkString($var, True); + $this->issuer = $var; + + return $this; + } + + /** + * Output only. The subject distinguished name in RFC 2253 format. Only + * present if [parsed][google.cloud.kms.v1.Certificate.parsed] is true. + * + * Generated from protobuf field string subject = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getSubject() + { + return $this->subject; + } + + /** + * Output only. The subject distinguished name in RFC 2253 format. Only + * present if [parsed][google.cloud.kms.v1.Certificate.parsed] is true. + * + * Generated from protobuf field string subject = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setSubject($var) + { + GPBUtil::checkString($var, True); + $this->subject = $var; + + return $this; + } + + /** + * Output only. The subject Alternative DNS names. Only present if + * [parsed][google.cloud.kms.v1.Certificate.parsed] is true. + * + * Generated from protobuf field repeated string subject_alternative_dns_names = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSubjectAlternativeDnsNames() + { + return $this->subject_alternative_dns_names; + } + + /** + * Output only. The subject Alternative DNS names. Only present if + * [parsed][google.cloud.kms.v1.Certificate.parsed] is true. + * + * Generated from protobuf field repeated string subject_alternative_dns_names = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSubjectAlternativeDnsNames($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->subject_alternative_dns_names = $arr; + + return $this; + } + + /** + * Output only. The certificate is not valid before this time. Only present if + * [parsed][google.cloud.kms.v1.Certificate.parsed] is true. + * + * Generated from protobuf field .google.protobuf.Timestamp not_before_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getNotBeforeTime() + { + return $this->not_before_time; + } + + public function hasNotBeforeTime() + { + return isset($this->not_before_time); + } + + public function clearNotBeforeTime() + { + unset($this->not_before_time); + } + + /** + * Output only. The certificate is not valid before this time. Only present if + * [parsed][google.cloud.kms.v1.Certificate.parsed] is true. + * + * Generated from protobuf field .google.protobuf.Timestamp not_before_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setNotBeforeTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->not_before_time = $var; + + return $this; + } + + /** + * Output only. The certificate is not valid after this time. Only present if + * [parsed][google.cloud.kms.v1.Certificate.parsed] is true. + * + * Generated from protobuf field .google.protobuf.Timestamp not_after_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getNotAfterTime() + { + return $this->not_after_time; + } + + public function hasNotAfterTime() + { + return isset($this->not_after_time); + } + + public function clearNotAfterTime() + { + unset($this->not_after_time); + } + + /** + * Output only. The certificate is not valid after this time. Only present if + * [parsed][google.cloud.kms.v1.Certificate.parsed] is true. + * + * Generated from protobuf field .google.protobuf.Timestamp not_after_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setNotAfterTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->not_after_time = $var; + + return $this; + } + + /** + * Output only. The certificate serial number as a hex string. Only present if + * [parsed][google.cloud.kms.v1.Certificate.parsed] is true. + * + * Generated from protobuf field string serial_number = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getSerialNumber() + { + return $this->serial_number; + } + + /** + * Output only. The certificate serial number as a hex string. Only present if + * [parsed][google.cloud.kms.v1.Certificate.parsed] is true. + * + * Generated from protobuf field string serial_number = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setSerialNumber($var) + { + GPBUtil::checkString($var, True); + $this->serial_number = $var; + + return $this; + } + + /** + * Output only. The SHA-256 certificate fingerprint as a hex string. Only + * present if [parsed][google.cloud.kms.v1.Certificate.parsed] is true. + * + * Generated from protobuf field string sha256_fingerprint = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getSha256Fingerprint() + { + return $this->sha256_fingerprint; + } + + /** + * Output only. The SHA-256 certificate fingerprint as a hex string. Only + * present if [parsed][google.cloud.kms.v1.Certificate.parsed] is true. + * + * Generated from protobuf field string sha256_fingerprint = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setSha256Fingerprint($var) + { + GPBUtil::checkString($var, True); + $this->sha256_fingerprint = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/Challenge.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/Challenge.php new file mode 100644 index 000000000000..792814caa3de --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/Challenge.php @@ -0,0 +1,109 @@ +google.cloud.kms.v1.Challenge + */ +class Challenge extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The challenge to be signed by the 2FA key indicated by the + * public key. + * + * Generated from protobuf field bytes challenge = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $challenge = ''; + /** + * Output only. The public key associated with the 2FA key that should sign + * the challenge. + * + * Generated from protobuf field string public_key_pem = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $public_key_pem = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $challenge + * Output only. The challenge to be signed by the 2FA key indicated by the + * public key. + * @type string $public_key_pem + * Output only. The public key associated with the 2FA key that should sign + * the challenge. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\HsmManagement::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The challenge to be signed by the 2FA key indicated by the + * public key. + * + * Generated from protobuf field bytes challenge = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getChallenge() + { + return $this->challenge; + } + + /** + * Output only. The challenge to be signed by the 2FA key indicated by the + * public key. + * + * Generated from protobuf field bytes challenge = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setChallenge($var) + { + GPBUtil::checkString($var, False); + $this->challenge = $var; + + return $this; + } + + /** + * Output only. The public key associated with the 2FA key that should sign + * the challenge. + * + * Generated from protobuf field string public_key_pem = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getPublicKeyPem() + { + return $this->public_key_pem; + } + + /** + * Output only. The public key associated with the 2FA key that should sign + * the challenge. + * + * Generated from protobuf field string public_key_pem = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setPublicKeyPem($var) + { + GPBUtil::checkString($var, True); + $this->public_key_pem = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ChallengeReply.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ChallengeReply.php new file mode 100644 index 000000000000..7aba6f546ba8 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ChallengeReply.php @@ -0,0 +1,105 @@ +google.cloud.kms.v1.ChallengeReply + */ +class ChallengeReply extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The signed challenge associated with the 2FA key. + * The signature must be RSASSA-PKCS1 v1.5 with a SHA256 digest. + * + * Generated from protobuf field bytes signed_challenge = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $signed_challenge = ''; + /** + * Required. The public key associated with the 2FA key. + * + * Generated from protobuf field string public_key_pem = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $public_key_pem = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $signed_challenge + * Required. The signed challenge associated with the 2FA key. + * The signature must be RSASSA-PKCS1 v1.5 with a SHA256 digest. + * @type string $public_key_pem + * Required. The public key associated with the 2FA key. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\HsmManagement::initOnce(); + parent::__construct($data); + } + + /** + * Required. The signed challenge associated with the 2FA key. + * The signature must be RSASSA-PKCS1 v1.5 with a SHA256 digest. + * + * Generated from protobuf field bytes signed_challenge = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getSignedChallenge() + { + return $this->signed_challenge; + } + + /** + * Required. The signed challenge associated with the 2FA key. + * The signature must be RSASSA-PKCS1 v1.5 with a SHA256 digest. + * + * Generated from protobuf field bytes signed_challenge = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setSignedChallenge($var) + { + GPBUtil::checkString($var, False); + $this->signed_challenge = $var; + + return $this; + } + + /** + * Required. The public key associated with the 2FA key. + * + * Generated from protobuf field string public_key_pem = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPublicKeyPem() + { + return $this->public_key_pem; + } + + /** + * Required. The public key associated with the 2FA key. + * + * Generated from protobuf field string public_key_pem = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPublicKeyPem($var) + { + GPBUtil::checkString($var, True); + $this->public_key_pem = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ChecksummedData.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ChecksummedData.php new file mode 100644 index 000000000000..871655706ae9 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ChecksummedData.php @@ -0,0 +1,216 @@ +google.cloud.kms.v1.ChecksummedData + */ +class ChecksummedData extends \Google\Protobuf\Internal\Message +{ + /** + * Raw Data. + * + * Generated from protobuf field bytes data = 3; + */ + protected $data = ''; + /** + * Integrity verification field. A CRC32C + * checksum of the returned + * [ChecksummedData.data][google.cloud.kms.v1.ChecksummedData.data]. An + * integrity check of + * [ChecksummedData.data][google.cloud.kms.v1.ChecksummedData.data] can be + * performed by computing the CRC32C checksum of + * [ChecksummedData.data][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value crc32c_checksum = 2; + */ + protected $crc32c_checksum = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $data + * Raw Data. + * @type \Google\Protobuf\Int64Value $crc32c_checksum + * Integrity verification field. A CRC32C + * checksum of the returned + * [ChecksummedData.data][google.cloud.kms.v1.ChecksummedData.data]. An + * integrity check of + * [ChecksummedData.data][google.cloud.kms.v1.ChecksummedData.data] can be + * performed by computing the CRC32C checksum of + * [ChecksummedData.data][google.cloud.kms.v1.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. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Raw Data. + * + * Generated from protobuf field bytes data = 3; + * @return string + */ + public function getData() + { + return $this->data; + } + + /** + * Raw Data. + * + * Generated from protobuf field bytes data = 3; + * @param string $var + * @return $this + */ + public function setData($var) + { + GPBUtil::checkString($var, False); + $this->data = $var; + + return $this; + } + + /** + * Integrity verification field. A CRC32C + * checksum of the returned + * [ChecksummedData.data][google.cloud.kms.v1.ChecksummedData.data]. An + * integrity check of + * [ChecksummedData.data][google.cloud.kms.v1.ChecksummedData.data] can be + * performed by computing the CRC32C checksum of + * [ChecksummedData.data][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value crc32c_checksum = 2; + * @return \Google\Protobuf\Int64Value|null + */ + public function getCrc32CChecksum() + { + return $this->crc32c_checksum; + } + + public function hasCrc32CChecksum() + { + return isset($this->crc32c_checksum); + } + + public function clearCrc32CChecksum() + { + unset($this->crc32c_checksum); + } + + /** + * Returns the unboxed value from getCrc32CChecksum() + + * Integrity verification field. A CRC32C + * checksum of the returned + * [ChecksummedData.data][google.cloud.kms.v1.ChecksummedData.data]. An + * integrity check of + * [ChecksummedData.data][google.cloud.kms.v1.ChecksummedData.data] can be + * performed by computing the CRC32C checksum of + * [ChecksummedData.data][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value crc32c_checksum = 2; + * @return int|string|null + */ + public function getCrc32CChecksumUnwrapped() + { + return $this->readWrapperValue("crc32c_checksum"); + } + + /** + * Integrity verification field. A CRC32C + * checksum of the returned + * [ChecksummedData.data][google.cloud.kms.v1.ChecksummedData.data]. An + * integrity check of + * [ChecksummedData.data][google.cloud.kms.v1.ChecksummedData.data] can be + * performed by computing the CRC32C checksum of + * [ChecksummedData.data][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value crc32c_checksum = 2; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setCrc32CChecksum($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->crc32c_checksum = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. + + * Integrity verification field. A CRC32C + * checksum of the returned + * [ChecksummedData.data][google.cloud.kms.v1.ChecksummedData.data]. An + * integrity check of + * [ChecksummedData.data][google.cloud.kms.v1.ChecksummedData.data] can be + * performed by computing the CRC32C checksum of + * [ChecksummedData.data][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value crc32c_checksum = 2; + * @param int|string|null $var + * @return $this + */ + public function setCrc32CChecksumUnwrapped($var) + { + $this->writeWrapperValue("crc32c_checksum", $var); + return $this;} + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateCryptoKeyRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateCryptoKeyRequest.php new file mode 100644 index 000000000000..2eefa5ea5baa --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateCryptoKeyRequest.php @@ -0,0 +1,241 @@ +google.cloud.kms.v1.CreateCryptoKeyRequest + */ +class CreateCryptoKeyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The [name][google.cloud.kms.v1.KeyRing.name] of the KeyRing + * associated with the [CryptoKeys][google.cloud.kms.v1.CryptoKey]. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. It must be unique within a KeyRing and match the regular + * expression `[a-zA-Z0-9_-]{1,63}` + * + * Generated from protobuf field string crypto_key_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $crypto_key_id = ''; + /** + * Required. A [CryptoKey][google.cloud.kms.v1.CryptoKey] with initial field + * values. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKey crypto_key = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $crypto_key = null; + /** + * If set to true, the request will create a + * [CryptoKey][google.cloud.kms.v1.CryptoKey] without any + * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. You must + * manually call + * [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion] + * or + * [ImportCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.ImportCryptoKeyVersion] + * before you can use this [CryptoKey][google.cloud.kms.v1.CryptoKey]. + * + * Generated from protobuf field bool skip_initial_version_creation = 5; + */ + protected $skip_initial_version_creation = false; + + /** + * @param string $parent Required. The [name][google.cloud.kms.v1.KeyRing.name] of the KeyRing + * associated with the [CryptoKeys][google.cloud.kms.v1.CryptoKey]. Please see + * {@see KeyManagementServiceClient::keyRingName()} for help formatting this field. + * @param string $cryptoKeyId Required. It must be unique within a KeyRing and match the regular + * expression `[a-zA-Z0-9_-]{1,63}` + * @param \Google\Cloud\Kms\V1\CryptoKey $cryptoKey Required. A [CryptoKey][google.cloud.kms.v1.CryptoKey] with initial field + * values. + * + * @return \Google\Cloud\Kms\V1\CreateCryptoKeyRequest + * + * @experimental + */ + public static function build(string $parent, string $cryptoKeyId, \Google\Cloud\Kms\V1\CryptoKey $cryptoKey): self + { + return (new self()) + ->setParent($parent) + ->setCryptoKeyId($cryptoKeyId) + ->setCryptoKey($cryptoKey); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The [name][google.cloud.kms.v1.KeyRing.name] of the KeyRing + * associated with the [CryptoKeys][google.cloud.kms.v1.CryptoKey]. + * @type string $crypto_key_id + * Required. It must be unique within a KeyRing and match the regular + * expression `[a-zA-Z0-9_-]{1,63}` + * @type \Google\Cloud\Kms\V1\CryptoKey $crypto_key + * Required. A [CryptoKey][google.cloud.kms.v1.CryptoKey] with initial field + * values. + * @type bool $skip_initial_version_creation + * If set to true, the request will create a + * [CryptoKey][google.cloud.kms.v1.CryptoKey] without any + * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. You must + * manually call + * [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion] + * or + * [ImportCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.ImportCryptoKeyVersion] + * before you can use this [CryptoKey][google.cloud.kms.v1.CryptoKey]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The [name][google.cloud.kms.v1.KeyRing.name] of the KeyRing + * associated with the [CryptoKeys][google.cloud.kms.v1.CryptoKey]. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The [name][google.cloud.kms.v1.KeyRing.name] of the KeyRing + * associated with the [CryptoKeys][google.cloud.kms.v1.CryptoKey]. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. It must be unique within a KeyRing and match the regular + * expression `[a-zA-Z0-9_-]{1,63}` + * + * Generated from protobuf field string crypto_key_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getCryptoKeyId() + { + return $this->crypto_key_id; + } + + /** + * Required. It must be unique within a KeyRing and match the regular + * expression `[a-zA-Z0-9_-]{1,63}` + * + * Generated from protobuf field string crypto_key_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setCryptoKeyId($var) + { + GPBUtil::checkString($var, True); + $this->crypto_key_id = $var; + + return $this; + } + + /** + * Required. A [CryptoKey][google.cloud.kms.v1.CryptoKey] with initial field + * values. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKey crypto_key = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Kms\V1\CryptoKey|null + */ + public function getCryptoKey() + { + return $this->crypto_key; + } + + public function hasCryptoKey() + { + return isset($this->crypto_key); + } + + public function clearCryptoKey() + { + unset($this->crypto_key); + } + + /** + * Required. A [CryptoKey][google.cloud.kms.v1.CryptoKey] with initial field + * values. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKey crypto_key = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Kms\V1\CryptoKey $var + * @return $this + */ + public function setCryptoKey($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\CryptoKey::class); + $this->crypto_key = $var; + + return $this; + } + + /** + * If set to true, the request will create a + * [CryptoKey][google.cloud.kms.v1.CryptoKey] without any + * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. You must + * manually call + * [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion] + * or + * [ImportCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.ImportCryptoKeyVersion] + * before you can use this [CryptoKey][google.cloud.kms.v1.CryptoKey]. + * + * Generated from protobuf field bool skip_initial_version_creation = 5; + * @return bool + */ + public function getSkipInitialVersionCreation() + { + return $this->skip_initial_version_creation; + } + + /** + * If set to true, the request will create a + * [CryptoKey][google.cloud.kms.v1.CryptoKey] without any + * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. You must + * manually call + * [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion] + * or + * [ImportCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.ImportCryptoKeyVersion] + * before you can use this [CryptoKey][google.cloud.kms.v1.CryptoKey]. + * + * Generated from protobuf field bool skip_initial_version_creation = 5; + * @param bool $var + * @return $this + */ + public function setSkipInitialVersionCreation($var) + { + GPBUtil::checkBool($var); + $this->skip_initial_version_creation = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateCryptoKeyVersionRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateCryptoKeyVersionRequest.php new file mode 100644 index 000000000000..ed1c2af7bf26 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateCryptoKeyVersionRequest.php @@ -0,0 +1,143 @@ +google.cloud.kms.v1.CreateCryptoKeyVersionRequest + */ +class CreateCryptoKeyVersionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The [name][google.cloud.kms.v1.CryptoKey.name] of the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] associated with the + * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. A [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with + * initial field values. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion crypto_key_version = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $crypto_key_version = null; + + /** + * @param string $parent Required. The [name][google.cloud.kms.v1.CryptoKey.name] of the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] associated with the + * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. Please see + * {@see KeyManagementServiceClient::cryptoKeyName()} for help formatting this field. + * @param \Google\Cloud\Kms\V1\CryptoKeyVersion $cryptoKeyVersion Required. A [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with + * initial field values. + * + * @return \Google\Cloud\Kms\V1\CreateCryptoKeyVersionRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Kms\V1\CryptoKeyVersion $cryptoKeyVersion): self + { + return (new self()) + ->setParent($parent) + ->setCryptoKeyVersion($cryptoKeyVersion); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The [name][google.cloud.kms.v1.CryptoKey.name] of the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] associated with the + * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. + * @type \Google\Cloud\Kms\V1\CryptoKeyVersion $crypto_key_version + * Required. A [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with + * initial field values. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The [name][google.cloud.kms.v1.CryptoKey.name] of the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] associated with the + * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The [name][google.cloud.kms.v1.CryptoKey.name] of the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] associated with the + * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. A [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with + * initial field values. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion crypto_key_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Kms\V1\CryptoKeyVersion|null + */ + public function getCryptoKeyVersion() + { + return $this->crypto_key_version; + } + + public function hasCryptoKeyVersion() + { + return isset($this->crypto_key_version); + } + + public function clearCryptoKeyVersion() + { + unset($this->crypto_key_version); + } + + /** + * Required. A [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with + * initial field values. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion crypto_key_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Kms\V1\CryptoKeyVersion $var + * @return $this + */ + public function setCryptoKeyVersion($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\CryptoKeyVersion::class); + $this->crypto_key_version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateEkmConnectionRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateEkmConnectionRequest.php new file mode 100644 index 000000000000..0b087b989419 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateEkmConnectionRequest.php @@ -0,0 +1,184 @@ +google.cloud.kms.v1.CreateEkmConnectionRequest + */ +class CreateEkmConnectionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the location associated with the + * [EkmConnection][google.cloud.kms.v1.EkmConnection], in the format + * `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. It must be unique within a location and match the regular + * expression `[a-zA-Z0-9_-]{1,63}`. + * + * Generated from protobuf field string ekm_connection_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $ekm_connection_id = ''; + /** + * Required. An [EkmConnection][google.cloud.kms.v1.EkmConnection] with + * initial field values. + * + * Generated from protobuf field .google.cloud.kms.v1.EkmConnection ekm_connection = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $ekm_connection = null; + + /** + * @param string $parent Required. The resource name of the location associated with the + * [EkmConnection][google.cloud.kms.v1.EkmConnection], in the format + * `projects/*/locations/*`. Please see + * {@see EkmServiceClient::locationName()} for help formatting this field. + * @param string $ekmConnectionId Required. It must be unique within a location and match the regular + * expression `[a-zA-Z0-9_-]{1,63}`. + * @param \Google\Cloud\Kms\V1\EkmConnection $ekmConnection Required. An [EkmConnection][google.cloud.kms.v1.EkmConnection] with + * initial field values. + * + * @return \Google\Cloud\Kms\V1\CreateEkmConnectionRequest + * + * @experimental + */ + public static function build(string $parent, string $ekmConnectionId, \Google\Cloud\Kms\V1\EkmConnection $ekmConnection): self + { + return (new self()) + ->setParent($parent) + ->setEkmConnectionId($ekmConnectionId) + ->setEkmConnection($ekmConnection); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the location associated with the + * [EkmConnection][google.cloud.kms.v1.EkmConnection], in the format + * `projects/*/locations/*`. + * @type string $ekm_connection_id + * Required. It must be unique within a location and match the regular + * expression `[a-zA-Z0-9_-]{1,63}`. + * @type \Google\Cloud\Kms\V1\EkmConnection $ekm_connection + * Required. An [EkmConnection][google.cloud.kms.v1.EkmConnection] with + * initial field values. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\EkmService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the location associated with the + * [EkmConnection][google.cloud.kms.v1.EkmConnection], in the format + * `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The resource name of the location associated with the + * [EkmConnection][google.cloud.kms.v1.EkmConnection], in the format + * `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. It must be unique within a location and match the regular + * expression `[a-zA-Z0-9_-]{1,63}`. + * + * Generated from protobuf field string ekm_connection_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getEkmConnectionId() + { + return $this->ekm_connection_id; + } + + /** + * Required. It must be unique within a location and match the regular + * expression `[a-zA-Z0-9_-]{1,63}`. + * + * Generated from protobuf field string ekm_connection_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setEkmConnectionId($var) + { + GPBUtil::checkString($var, True); + $this->ekm_connection_id = $var; + + return $this; + } + + /** + * Required. An [EkmConnection][google.cloud.kms.v1.EkmConnection] with + * initial field values. + * + * Generated from protobuf field .google.cloud.kms.v1.EkmConnection ekm_connection = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Kms\V1\EkmConnection|null + */ + public function getEkmConnection() + { + return $this->ekm_connection; + } + + public function hasEkmConnection() + { + return isset($this->ekm_connection); + } + + public function clearEkmConnection() + { + unset($this->ekm_connection); + } + + /** + * Required. An [EkmConnection][google.cloud.kms.v1.EkmConnection] with + * initial field values. + * + * Generated from protobuf field .google.cloud.kms.v1.EkmConnection ekm_connection = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Kms\V1\EkmConnection $var + * @return $this + */ + public function setEkmConnection($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\EkmConnection::class); + $this->ekm_connection = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateImportJobRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateImportJobRequest.php new file mode 100644 index 000000000000..cf82ffb0e04a --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateImportJobRequest.php @@ -0,0 +1,184 @@ +google.cloud.kms.v1.CreateImportJobRequest + */ +class CreateImportJobRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The [name][google.cloud.kms.v1.KeyRing.name] of the + * [KeyRing][google.cloud.kms.v1.KeyRing] associated with the + * [ImportJobs][google.cloud.kms.v1.ImportJob]. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. It must be unique within a KeyRing and match the regular + * expression `[a-zA-Z0-9_-]{1,63}` + * + * Generated from protobuf field string import_job_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $import_job_id = ''; + /** + * Required. An [ImportJob][google.cloud.kms.v1.ImportJob] with initial field + * values. + * + * Generated from protobuf field .google.cloud.kms.v1.ImportJob import_job = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $import_job = null; + + /** + * @param string $parent Required. The [name][google.cloud.kms.v1.KeyRing.name] of the + * [KeyRing][google.cloud.kms.v1.KeyRing] associated with the + * [ImportJobs][google.cloud.kms.v1.ImportJob]. Please see + * {@see KeyManagementServiceClient::keyRingName()} for help formatting this field. + * @param string $importJobId Required. It must be unique within a KeyRing and match the regular + * expression `[a-zA-Z0-9_-]{1,63}` + * @param \Google\Cloud\Kms\V1\ImportJob $importJob Required. An [ImportJob][google.cloud.kms.v1.ImportJob] with initial field + * values. + * + * @return \Google\Cloud\Kms\V1\CreateImportJobRequest + * + * @experimental + */ + public static function build(string $parent, string $importJobId, \Google\Cloud\Kms\V1\ImportJob $importJob): self + { + return (new self()) + ->setParent($parent) + ->setImportJobId($importJobId) + ->setImportJob($importJob); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The [name][google.cloud.kms.v1.KeyRing.name] of the + * [KeyRing][google.cloud.kms.v1.KeyRing] associated with the + * [ImportJobs][google.cloud.kms.v1.ImportJob]. + * @type string $import_job_id + * Required. It must be unique within a KeyRing and match the regular + * expression `[a-zA-Z0-9_-]{1,63}` + * @type \Google\Cloud\Kms\V1\ImportJob $import_job + * Required. An [ImportJob][google.cloud.kms.v1.ImportJob] with initial field + * values. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The [name][google.cloud.kms.v1.KeyRing.name] of the + * [KeyRing][google.cloud.kms.v1.KeyRing] associated with the + * [ImportJobs][google.cloud.kms.v1.ImportJob]. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The [name][google.cloud.kms.v1.KeyRing.name] of the + * [KeyRing][google.cloud.kms.v1.KeyRing] associated with the + * [ImportJobs][google.cloud.kms.v1.ImportJob]. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. It must be unique within a KeyRing and match the regular + * expression `[a-zA-Z0-9_-]{1,63}` + * + * Generated from protobuf field string import_job_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getImportJobId() + { + return $this->import_job_id; + } + + /** + * Required. It must be unique within a KeyRing and match the regular + * expression `[a-zA-Z0-9_-]{1,63}` + * + * Generated from protobuf field string import_job_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setImportJobId($var) + { + GPBUtil::checkString($var, True); + $this->import_job_id = $var; + + return $this; + } + + /** + * Required. An [ImportJob][google.cloud.kms.v1.ImportJob] with initial field + * values. + * + * Generated from protobuf field .google.cloud.kms.v1.ImportJob import_job = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Kms\V1\ImportJob|null + */ + public function getImportJob() + { + return $this->import_job; + } + + public function hasImportJob() + { + return isset($this->import_job); + } + + public function clearImportJob() + { + unset($this->import_job); + } + + /** + * Required. An [ImportJob][google.cloud.kms.v1.ImportJob] with initial field + * values. + * + * Generated from protobuf field .google.cloud.kms.v1.ImportJob import_job = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Kms\V1\ImportJob $var + * @return $this + */ + public function setImportJob($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\ImportJob::class); + $this->import_job = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateKeyHandleMetadata.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateKeyHandleMetadata.php new file mode 100644 index 000000000000..c55a5d085cd8 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateKeyHandleMetadata.php @@ -0,0 +1,35 @@ +google.cloud.kms.v1.CreateKeyHandleMetadata + */ +class CreateKeyHandleMetadata extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Autokey::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateKeyHandleRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateKeyHandleRequest.php new file mode 100644 index 000000000000..b8cdd62f5531 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateKeyHandleRequest.php @@ -0,0 +1,184 @@ +google.cloud.kms.v1.CreateKeyHandleRequest + */ +class CreateKeyHandleRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the resource project and location to create the + * [KeyHandle][google.cloud.kms.v1.KeyHandle] in, e.g. + * `projects/{PROJECT_ID}/locations/{LOCATION}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Id of the [KeyHandle][google.cloud.kms.v1.KeyHandle]. Must be + * unique to the resource project and location. If not provided by the caller, + * a new UUID is used. + * + * Generated from protobuf field string key_handle_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $key_handle_id = ''; + /** + * Required. [KeyHandle][google.cloud.kms.v1.KeyHandle] to create. + * + * Generated from protobuf field .google.cloud.kms.v1.KeyHandle key_handle = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $key_handle = null; + + /** + * @param string $parent Required. Name of the resource project and location to create the + * [KeyHandle][google.cloud.kms.v1.KeyHandle] in, e.g. + * `projects/{PROJECT_ID}/locations/{LOCATION}`. Please see + * {@see AutokeyClient::locationName()} for help formatting this field. + * @param \Google\Cloud\Kms\V1\KeyHandle $keyHandle Required. [KeyHandle][google.cloud.kms.v1.KeyHandle] to create. + * @param string $keyHandleId Optional. Id of the [KeyHandle][google.cloud.kms.v1.KeyHandle]. Must be + * unique to the resource project and location. If not provided by the caller, + * a new UUID is used. + * + * @return \Google\Cloud\Kms\V1\CreateKeyHandleRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Kms\V1\KeyHandle $keyHandle, string $keyHandleId): self + { + return (new self()) + ->setParent($parent) + ->setKeyHandle($keyHandle) + ->setKeyHandleId($keyHandleId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Name of the resource project and location to create the + * [KeyHandle][google.cloud.kms.v1.KeyHandle] in, e.g. + * `projects/{PROJECT_ID}/locations/{LOCATION}`. + * @type string $key_handle_id + * Optional. Id of the [KeyHandle][google.cloud.kms.v1.KeyHandle]. Must be + * unique to the resource project and location. If not provided by the caller, + * a new UUID is used. + * @type \Google\Cloud\Kms\V1\KeyHandle $key_handle + * Required. [KeyHandle][google.cloud.kms.v1.KeyHandle] to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Autokey::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the resource project and location to create the + * [KeyHandle][google.cloud.kms.v1.KeyHandle] in, e.g. + * `projects/{PROJECT_ID}/locations/{LOCATION}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Name of the resource project and location to create the + * [KeyHandle][google.cloud.kms.v1.KeyHandle] in, e.g. + * `projects/{PROJECT_ID}/locations/{LOCATION}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. Id of the [KeyHandle][google.cloud.kms.v1.KeyHandle]. Must be + * unique to the resource project and location. If not provided by the caller, + * a new UUID is used. + * + * Generated from protobuf field string key_handle_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getKeyHandleId() + { + return $this->key_handle_id; + } + + /** + * Optional. Id of the [KeyHandle][google.cloud.kms.v1.KeyHandle]. Must be + * unique to the resource project and location. If not provided by the caller, + * a new UUID is used. + * + * Generated from protobuf field string key_handle_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setKeyHandleId($var) + { + GPBUtil::checkString($var, True); + $this->key_handle_id = $var; + + return $this; + } + + /** + * Required. [KeyHandle][google.cloud.kms.v1.KeyHandle] to create. + * + * Generated from protobuf field .google.cloud.kms.v1.KeyHandle key_handle = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Kms\V1\KeyHandle|null + */ + public function getKeyHandle() + { + return $this->key_handle; + } + + public function hasKeyHandle() + { + return isset($this->key_handle); + } + + public function clearKeyHandle() + { + unset($this->key_handle); + } + + /** + * Required. [KeyHandle][google.cloud.kms.v1.KeyHandle] to create. + * + * Generated from protobuf field .google.cloud.kms.v1.KeyHandle key_handle = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Kms\V1\KeyHandle $var + * @return $this + */ + public function setKeyHandle($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\KeyHandle::class); + $this->key_handle = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateKeyRingRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateKeyRingRequest.php new file mode 100644 index 000000000000..22c6f3b3054f --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateKeyRingRequest.php @@ -0,0 +1,184 @@ +google.cloud.kms.v1.CreateKeyRingRequest + */ +class CreateKeyRingRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the location associated with the + * [KeyRings][google.cloud.kms.v1.KeyRing], in the format + * `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. It must be unique within a location and match the regular + * expression `[a-zA-Z0-9_-]{1,63}` + * + * Generated from protobuf field string key_ring_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $key_ring_id = ''; + /** + * Required. A [KeyRing][google.cloud.kms.v1.KeyRing] with initial field + * values. + * + * Generated from protobuf field .google.cloud.kms.v1.KeyRing key_ring = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $key_ring = null; + + /** + * @param string $parent Required. The resource name of the location associated with the + * [KeyRings][google.cloud.kms.v1.KeyRing], in the format + * `projects/*/locations/*`. Please see + * {@see KeyManagementServiceClient::locationName()} for help formatting this field. + * @param string $keyRingId Required. It must be unique within a location and match the regular + * expression `[a-zA-Z0-9_-]{1,63}` + * @param \Google\Cloud\Kms\V1\KeyRing $keyRing Required. A [KeyRing][google.cloud.kms.v1.KeyRing] with initial field + * values. + * + * @return \Google\Cloud\Kms\V1\CreateKeyRingRequest + * + * @experimental + */ + public static function build(string $parent, string $keyRingId, \Google\Cloud\Kms\V1\KeyRing $keyRing): self + { + return (new self()) + ->setParent($parent) + ->setKeyRingId($keyRingId) + ->setKeyRing($keyRing); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the location associated with the + * [KeyRings][google.cloud.kms.v1.KeyRing], in the format + * `projects/*/locations/*`. + * @type string $key_ring_id + * Required. It must be unique within a location and match the regular + * expression `[a-zA-Z0-9_-]{1,63}` + * @type \Google\Cloud\Kms\V1\KeyRing $key_ring + * Required. A [KeyRing][google.cloud.kms.v1.KeyRing] with initial field + * values. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the location associated with the + * [KeyRings][google.cloud.kms.v1.KeyRing], in the format + * `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The resource name of the location associated with the + * [KeyRings][google.cloud.kms.v1.KeyRing], in the format + * `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. It must be unique within a location and match the regular + * expression `[a-zA-Z0-9_-]{1,63}` + * + * Generated from protobuf field string key_ring_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getKeyRingId() + { + return $this->key_ring_id; + } + + /** + * Required. It must be unique within a location and match the regular + * expression `[a-zA-Z0-9_-]{1,63}` + * + * Generated from protobuf field string key_ring_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setKeyRingId($var) + { + GPBUtil::checkString($var, True); + $this->key_ring_id = $var; + + return $this; + } + + /** + * Required. A [KeyRing][google.cloud.kms.v1.KeyRing] with initial field + * values. + * + * Generated from protobuf field .google.cloud.kms.v1.KeyRing key_ring = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Kms\V1\KeyRing|null + */ + public function getKeyRing() + { + return $this->key_ring; + } + + public function hasKeyRing() + { + return isset($this->key_ring); + } + + public function clearKeyRing() + { + unset($this->key_ring); + } + + /** + * Required. A [KeyRing][google.cloud.kms.v1.KeyRing] with initial field + * values. + * + * Generated from protobuf field .google.cloud.kms.v1.KeyRing key_ring = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Kms\V1\KeyRing $var + * @return $this + */ + public function setKeyRing($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\KeyRing::class); + $this->key_ring = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateSingleTenantHsmInstanceMetadata.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateSingleTenantHsmInstanceMetadata.php new file mode 100644 index 000000000000..61554c8f30b5 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateSingleTenantHsmInstanceMetadata.php @@ -0,0 +1,35 @@ +google.cloud.kms.v1.CreateSingleTenantHsmInstanceMetadata + */ +class CreateSingleTenantHsmInstanceMetadata extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\HsmManagement::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateSingleTenantHsmInstanceProposalMetadata.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateSingleTenantHsmInstanceProposalMetadata.php new file mode 100644 index 000000000000..c1b37ac76396 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateSingleTenantHsmInstanceProposalMetadata.php @@ -0,0 +1,35 @@ +google.cloud.kms.v1.CreateSingleTenantHsmInstanceProposalMetadata + */ +class CreateSingleTenantHsmInstanceProposalMetadata extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\HsmManagement::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateSingleTenantHsmInstanceProposalRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateSingleTenantHsmInstanceProposalRequest.php new file mode 100644 index 000000000000..a5136abe38c2 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateSingleTenantHsmInstanceProposalRequest.php @@ -0,0 +1,194 @@ +google.cloud.kms.v1.CreateSingleTenantHsmInstanceProposalRequest + */ +class CreateSingleTenantHsmInstanceProposalRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The [name][google.cloud.kms.v1.SingleTenantHsmInstance.name] of + * the [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] + * associated with the + * [SingleTenantHsmInstanceProposals][google.cloud.kms.v1.SingleTenantHsmInstanceProposal]. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. It must be unique within a location and match the regular + * expression `[a-zA-Z0-9_-]{1,63}`. + * + * Generated from protobuf field string single_tenant_hsm_instance_proposal_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $single_tenant_hsm_instance_proposal_id = ''; + /** + * Required. The + * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * to create. + * + * Generated from protobuf field .google.cloud.kms.v1.SingleTenantHsmInstanceProposal single_tenant_hsm_instance_proposal = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $single_tenant_hsm_instance_proposal = null; + + /** + * @param string $parent Required. The [name][google.cloud.kms.v1.SingleTenantHsmInstance.name] of + * the [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] + * associated with the + * [SingleTenantHsmInstanceProposals][google.cloud.kms.v1.SingleTenantHsmInstanceProposal]. Please see + * {@see HsmManagementClient::singleTenantHsmInstanceName()} for help formatting this field. + * @param \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal $singleTenantHsmInstanceProposal Required. The + * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * to create. + * @param string $singleTenantHsmInstanceProposalId Optional. It must be unique within a location and match the regular + * expression `[a-zA-Z0-9_-]{1,63}`. + * + * @return \Google\Cloud\Kms\V1\CreateSingleTenantHsmInstanceProposalRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal $singleTenantHsmInstanceProposal, string $singleTenantHsmInstanceProposalId): self + { + return (new self()) + ->setParent($parent) + ->setSingleTenantHsmInstanceProposal($singleTenantHsmInstanceProposal) + ->setSingleTenantHsmInstanceProposalId($singleTenantHsmInstanceProposalId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The [name][google.cloud.kms.v1.SingleTenantHsmInstance.name] of + * the [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] + * associated with the + * [SingleTenantHsmInstanceProposals][google.cloud.kms.v1.SingleTenantHsmInstanceProposal]. + * @type string $single_tenant_hsm_instance_proposal_id + * Optional. It must be unique within a location and match the regular + * expression `[a-zA-Z0-9_-]{1,63}`. + * @type \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal $single_tenant_hsm_instance_proposal + * Required. The + * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\HsmManagement::initOnce(); + parent::__construct($data); + } + + /** + * Required. The [name][google.cloud.kms.v1.SingleTenantHsmInstance.name] of + * the [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] + * associated with the + * [SingleTenantHsmInstanceProposals][google.cloud.kms.v1.SingleTenantHsmInstanceProposal]. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The [name][google.cloud.kms.v1.SingleTenantHsmInstance.name] of + * the [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] + * associated with the + * [SingleTenantHsmInstanceProposals][google.cloud.kms.v1.SingleTenantHsmInstanceProposal]. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. It must be unique within a location and match the regular + * expression `[a-zA-Z0-9_-]{1,63}`. + * + * Generated from protobuf field string single_tenant_hsm_instance_proposal_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getSingleTenantHsmInstanceProposalId() + { + return $this->single_tenant_hsm_instance_proposal_id; + } + + /** + * Optional. It must be unique within a location and match the regular + * expression `[a-zA-Z0-9_-]{1,63}`. + * + * Generated from protobuf field string single_tenant_hsm_instance_proposal_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setSingleTenantHsmInstanceProposalId($var) + { + GPBUtil::checkString($var, True); + $this->single_tenant_hsm_instance_proposal_id = $var; + + return $this; + } + + /** + * Required. The + * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * to create. + * + * Generated from protobuf field .google.cloud.kms.v1.SingleTenantHsmInstanceProposal single_tenant_hsm_instance_proposal = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal|null + */ + public function getSingleTenantHsmInstanceProposal() + { + return $this->single_tenant_hsm_instance_proposal; + } + + public function hasSingleTenantHsmInstanceProposal() + { + return isset($this->single_tenant_hsm_instance_proposal); + } + + public function clearSingleTenantHsmInstanceProposal() + { + unset($this->single_tenant_hsm_instance_proposal); + } + + /** + * Required. The + * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * to create. + * + * Generated from protobuf field .google.cloud.kms.v1.SingleTenantHsmInstanceProposal single_tenant_hsm_instance_proposal = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal $var + * @return $this + */ + public function setSingleTenantHsmInstanceProposal($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal::class); + $this->single_tenant_hsm_instance_proposal = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateSingleTenantHsmInstanceRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateSingleTenantHsmInstanceRequest.php new file mode 100644 index 000000000000..9863f85180c3 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateSingleTenantHsmInstanceRequest.php @@ -0,0 +1,189 @@ +google.cloud.kms.v1.CreateSingleTenantHsmInstanceRequest + */ +class CreateSingleTenantHsmInstanceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the location associated with the + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance], in + * the format `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. It must be unique within a location and match the regular + * expression `[a-zA-Z0-9_-]{1,63}`. + * + * Generated from protobuf field string single_tenant_hsm_instance_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $single_tenant_hsm_instance_id = ''; + /** + * Required. An + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] with + * initial field values. + * + * Generated from protobuf field .google.cloud.kms.v1.SingleTenantHsmInstance single_tenant_hsm_instance = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $single_tenant_hsm_instance = null; + + /** + * @param string $parent Required. The resource name of the location associated with the + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance], in + * the format `projects/*/locations/*`. Please see + * {@see HsmManagementClient::locationName()} for help formatting this field. + * @param \Google\Cloud\Kms\V1\SingleTenantHsmInstance $singleTenantHsmInstance Required. An + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] with + * initial field values. + * @param string $singleTenantHsmInstanceId Optional. It must be unique within a location and match the regular + * expression `[a-zA-Z0-9_-]{1,63}`. + * + * @return \Google\Cloud\Kms\V1\CreateSingleTenantHsmInstanceRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Kms\V1\SingleTenantHsmInstance $singleTenantHsmInstance, string $singleTenantHsmInstanceId): self + { + return (new self()) + ->setParent($parent) + ->setSingleTenantHsmInstance($singleTenantHsmInstance) + ->setSingleTenantHsmInstanceId($singleTenantHsmInstanceId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the location associated with the + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance], in + * the format `projects/*/locations/*`. + * @type string $single_tenant_hsm_instance_id + * Optional. It must be unique within a location and match the regular + * expression `[a-zA-Z0-9_-]{1,63}`. + * @type \Google\Cloud\Kms\V1\SingleTenantHsmInstance $single_tenant_hsm_instance + * Required. An + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] with + * initial field values. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\HsmManagement::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the location associated with the + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance], in + * the format `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The resource name of the location associated with the + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance], in + * the format `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. It must be unique within a location and match the regular + * expression `[a-zA-Z0-9_-]{1,63}`. + * + * Generated from protobuf field string single_tenant_hsm_instance_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getSingleTenantHsmInstanceId() + { + return $this->single_tenant_hsm_instance_id; + } + + /** + * Optional. It must be unique within a location and match the regular + * expression `[a-zA-Z0-9_-]{1,63}`. + * + * Generated from protobuf field string single_tenant_hsm_instance_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setSingleTenantHsmInstanceId($var) + { + GPBUtil::checkString($var, True); + $this->single_tenant_hsm_instance_id = $var; + + return $this; + } + + /** + * Required. An + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] with + * initial field values. + * + * Generated from protobuf field .google.cloud.kms.v1.SingleTenantHsmInstance single_tenant_hsm_instance = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Kms\V1\SingleTenantHsmInstance|null + */ + public function getSingleTenantHsmInstance() + { + return $this->single_tenant_hsm_instance; + } + + public function hasSingleTenantHsmInstance() + { + return isset($this->single_tenant_hsm_instance); + } + + public function clearSingleTenantHsmInstance() + { + unset($this->single_tenant_hsm_instance); + } + + /** + * Required. An + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] with + * initial field values. + * + * Generated from protobuf field .google.cloud.kms.v1.SingleTenantHsmInstance single_tenant_hsm_instance = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Kms\V1\SingleTenantHsmInstance $var + * @return $this + */ + public function setSingleTenantHsmInstance($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\SingleTenantHsmInstance::class); + $this->single_tenant_hsm_instance = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKey.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKey.php new file mode 100644 index 000000000000..e57c9615ea60 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKey.php @@ -0,0 +1,768 @@ +google.cloud.kms.v1.CryptoKey + */ +class CryptoKey extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The resource name for this + * [CryptoKey][google.cloud.kms.v1.CryptoKey] in the format + * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. A copy of the "primary" + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that will be used + * by [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt] when this + * [CryptoKey][google.cloud.kms.v1.CryptoKey] is given in + * [EncryptRequest.name][google.cloud.kms.v1.EncryptRequest.name]. + * The [CryptoKey][google.cloud.kms.v1.CryptoKey]'s primary version can be + * updated via + * [UpdateCryptoKeyPrimaryVersion][google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyPrimaryVersion]. + * Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose] + * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT] + * may have a primary. For other keys, this field will be omitted. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion primary = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $primary = null; + /** + * Immutable. The immutable purpose of this + * [CryptoKey][google.cloud.kms.v1.CryptoKey]. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose purpose = 3 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $purpose = 0; + /** + * Output only. The time at which this + * [CryptoKey][google.cloud.kms.v1.CryptoKey] was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * At [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time], + * the Key Management Service will automatically: + * 1. Create a new version of this [CryptoKey][google.cloud.kms.v1.CryptoKey]. + * 2. Mark the new version as primary. + * Key rotations performed manually via + * [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion] + * and + * [UpdateCryptoKeyPrimaryVersion][google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyPrimaryVersion] + * do not affect + * [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time]. + * Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose] + * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT] + * support automatic rotation. For other keys, this field must be omitted. + * + * Generated from protobuf field .google.protobuf.Timestamp next_rotation_time = 7; + */ + protected $next_rotation_time = null; + /** + * A template describing settings for new + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] instances. The + * properties of new [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] + * instances created by either + * [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion] + * or auto-rotation are controlled by this template. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersionTemplate version_template = 11; + */ + protected $version_template = null; + /** + * Labels with user-defined metadata. For more information, see + * [Labeling Keys](https://cloud.google.com/kms/docs/labeling-keys). + * + * Generated from protobuf field map labels = 10; + */ + private $labels; + /** + * Immutable. Whether this key may contain imported versions only. + * + * Generated from protobuf field bool import_only = 13 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $import_only = false; + /** + * Immutable. The period of time that versions of this key spend in the + * [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED] + * state before transitioning to + * [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED]. + * If not specified at creation time, the default duration is 30 days. + * + * Generated from protobuf field .google.protobuf.Duration destroy_scheduled_duration = 14 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $destroy_scheduled_duration = null; + /** + * Immutable. The resource name of the backend environment where the key + * material for all [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] + * associated with this [CryptoKey][google.cloud.kms.v1.CryptoKey] reside and + * where all related cryptographic operations are performed. Only applicable + * if [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] have a + * [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of + * [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC], with the + * resource name in the format `projects/*/locations/*/ekmConnections/*`. Only + * applicable if [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] + * have a [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of + * [HSM_SINGLE_TENANT][google.cloud.kms.v1.ProtectionLevel.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][google.cloud.kms.v1.ProtectionLevel] in the future. + * + * Generated from protobuf field string crypto_key_backend = 15 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + */ + protected $crypto_key_backend = ''; + /** + * 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. + * + * Generated from protobuf field .google.cloud.kms.v1.KeyAccessJustificationsPolicy key_access_justifications_policy = 17 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $key_access_justifications_policy = null; + protected $rotation_schedule; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The resource name for this + * [CryptoKey][google.cloud.kms.v1.CryptoKey] in the format + * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. + * @type \Google\Cloud\Kms\V1\CryptoKeyVersion $primary + * Output only. A copy of the "primary" + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that will be used + * by [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt] when this + * [CryptoKey][google.cloud.kms.v1.CryptoKey] is given in + * [EncryptRequest.name][google.cloud.kms.v1.EncryptRequest.name]. + * The [CryptoKey][google.cloud.kms.v1.CryptoKey]'s primary version can be + * updated via + * [UpdateCryptoKeyPrimaryVersion][google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyPrimaryVersion]. + * Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose] + * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT] + * may have a primary. For other keys, this field will be omitted. + * @type int $purpose + * Immutable. The immutable purpose of this + * [CryptoKey][google.cloud.kms.v1.CryptoKey]. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time at which this + * [CryptoKey][google.cloud.kms.v1.CryptoKey] was created. + * @type \Google\Protobuf\Timestamp $next_rotation_time + * At [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time], + * the Key Management Service will automatically: + * 1. Create a new version of this [CryptoKey][google.cloud.kms.v1.CryptoKey]. + * 2. Mark the new version as primary. + * Key rotations performed manually via + * [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion] + * and + * [UpdateCryptoKeyPrimaryVersion][google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyPrimaryVersion] + * do not affect + * [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time]. + * Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose] + * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT] + * support automatic rotation. For other keys, this field must be omitted. + * @type \Google\Protobuf\Duration $rotation_period + * [next_rotation_time][google.cloud.kms.v1.CryptoKey.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][google.cloud.kms.v1.CryptoKey.rotation_period] is + * set, + * [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time] + * must also be set. + * Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose] + * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT] + * support automatic rotation. For other keys, this field must be omitted. + * @type \Google\Cloud\Kms\V1\CryptoKeyVersionTemplate $version_template + * A template describing settings for new + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] instances. The + * properties of new [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] + * instances created by either + * [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion] + * or auto-rotation are controlled by this template. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Labels with user-defined metadata. For more information, see + * [Labeling Keys](https://cloud.google.com/kms/docs/labeling-keys). + * @type bool $import_only + * Immutable. Whether this key may contain imported versions only. + * @type \Google\Protobuf\Duration $destroy_scheduled_duration + * Immutable. The period of time that versions of this key spend in the + * [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED] + * state before transitioning to + * [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED]. + * If not specified at creation time, the default duration is 30 days. + * @type string $crypto_key_backend + * Immutable. The resource name of the backend environment where the key + * material for all [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] + * associated with this [CryptoKey][google.cloud.kms.v1.CryptoKey] reside and + * where all related cryptographic operations are performed. Only applicable + * if [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] have a + * [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of + * [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC], with the + * resource name in the format `projects/*/locations/*/ekmConnections/*`. Only + * applicable if [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] + * have a [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of + * [HSM_SINGLE_TENANT][google.cloud.kms.v1.ProtectionLevel.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][google.cloud.kms.v1.ProtectionLevel] in the future. + * @type \Google\Cloud\Kms\V1\KeyAccessJustificationsPolicy $key_access_justifications_policy + * 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. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The resource name for this + * [CryptoKey][google.cloud.kms.v1.CryptoKey] in the format + * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The resource name for this + * [CryptoKey][google.cloud.kms.v1.CryptoKey] in the format + * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. A copy of the "primary" + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that will be used + * by [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt] when this + * [CryptoKey][google.cloud.kms.v1.CryptoKey] is given in + * [EncryptRequest.name][google.cloud.kms.v1.EncryptRequest.name]. + * The [CryptoKey][google.cloud.kms.v1.CryptoKey]'s primary version can be + * updated via + * [UpdateCryptoKeyPrimaryVersion][google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyPrimaryVersion]. + * Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose] + * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT] + * may have a primary. For other keys, this field will be omitted. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion primary = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Kms\V1\CryptoKeyVersion|null + */ + public function getPrimary() + { + return $this->primary; + } + + public function hasPrimary() + { + return isset($this->primary); + } + + public function clearPrimary() + { + unset($this->primary); + } + + /** + * Output only. A copy of the "primary" + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that will be used + * by [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt] when this + * [CryptoKey][google.cloud.kms.v1.CryptoKey] is given in + * [EncryptRequest.name][google.cloud.kms.v1.EncryptRequest.name]. + * The [CryptoKey][google.cloud.kms.v1.CryptoKey]'s primary version can be + * updated via + * [UpdateCryptoKeyPrimaryVersion][google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyPrimaryVersion]. + * Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose] + * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT] + * may have a primary. For other keys, this field will be omitted. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion primary = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Kms\V1\CryptoKeyVersion $var + * @return $this + */ + public function setPrimary($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\CryptoKeyVersion::class); + $this->primary = $var; + + return $this; + } + + /** + * Immutable. The immutable purpose of this + * [CryptoKey][google.cloud.kms.v1.CryptoKey]. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose purpose = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * @return int + */ + public function getPurpose() + { + return $this->purpose; + } + + /** + * Immutable. The immutable purpose of this + * [CryptoKey][google.cloud.kms.v1.CryptoKey]. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose purpose = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * @param int $var + * @return $this + */ + public function setPurpose($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\CryptoKey\CryptoKeyPurpose::class); + $this->purpose = $var; + + return $this; + } + + /** + * Output only. The time at which this + * [CryptoKey][google.cloud.kms.v1.CryptoKey] was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time at which this + * [CryptoKey][google.cloud.kms.v1.CryptoKey] was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * At [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time], + * the Key Management Service will automatically: + * 1. Create a new version of this [CryptoKey][google.cloud.kms.v1.CryptoKey]. + * 2. Mark the new version as primary. + * Key rotations performed manually via + * [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion] + * and + * [UpdateCryptoKeyPrimaryVersion][google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyPrimaryVersion] + * do not affect + * [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time]. + * Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose] + * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT] + * support automatic rotation. For other keys, this field must be omitted. + * + * Generated from protobuf field .google.protobuf.Timestamp next_rotation_time = 7; + * @return \Google\Protobuf\Timestamp|null + */ + public function getNextRotationTime() + { + return $this->next_rotation_time; + } + + public function hasNextRotationTime() + { + return isset($this->next_rotation_time); + } + + public function clearNextRotationTime() + { + unset($this->next_rotation_time); + } + + /** + * At [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time], + * the Key Management Service will automatically: + * 1. Create a new version of this [CryptoKey][google.cloud.kms.v1.CryptoKey]. + * 2. Mark the new version as primary. + * Key rotations performed manually via + * [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion] + * and + * [UpdateCryptoKeyPrimaryVersion][google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyPrimaryVersion] + * do not affect + * [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time]. + * Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose] + * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT] + * support automatic rotation. For other keys, this field must be omitted. + * + * Generated from protobuf field .google.protobuf.Timestamp next_rotation_time = 7; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setNextRotationTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->next_rotation_time = $var; + + return $this; + } + + /** + * [next_rotation_time][google.cloud.kms.v1.CryptoKey.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][google.cloud.kms.v1.CryptoKey.rotation_period] is + * set, + * [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time] + * must also be set. + * Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose] + * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT] + * support automatic rotation. For other keys, this field must be omitted. + * + * Generated from protobuf field .google.protobuf.Duration rotation_period = 8; + * @return \Google\Protobuf\Duration|null + */ + public function getRotationPeriod() + { + return $this->readOneof(8); + } + + public function hasRotationPeriod() + { + return $this->hasOneof(8); + } + + /** + * [next_rotation_time][google.cloud.kms.v1.CryptoKey.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][google.cloud.kms.v1.CryptoKey.rotation_period] is + * set, + * [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time] + * must also be set. + * Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose] + * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT] + * support automatic rotation. For other keys, this field must be omitted. + * + * Generated from protobuf field .google.protobuf.Duration rotation_period = 8; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setRotationPeriod($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->writeOneof(8, $var); + + return $this; + } + + /** + * A template describing settings for new + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] instances. The + * properties of new [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] + * instances created by either + * [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion] + * or auto-rotation are controlled by this template. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersionTemplate version_template = 11; + * @return \Google\Cloud\Kms\V1\CryptoKeyVersionTemplate|null + */ + public function getVersionTemplate() + { + return $this->version_template; + } + + public function hasVersionTemplate() + { + return isset($this->version_template); + } + + public function clearVersionTemplate() + { + unset($this->version_template); + } + + /** + * A template describing settings for new + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] instances. The + * properties of new [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] + * instances created by either + * [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion] + * or auto-rotation are controlled by this template. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersionTemplate version_template = 11; + * @param \Google\Cloud\Kms\V1\CryptoKeyVersionTemplate $var + * @return $this + */ + public function setVersionTemplate($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\CryptoKeyVersionTemplate::class); + $this->version_template = $var; + + return $this; + } + + /** + * Labels with user-defined metadata. For more information, see + * [Labeling Keys](https://cloud.google.com/kms/docs/labeling-keys). + * + * Generated from protobuf field map labels = 10; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Labels with user-defined metadata. For more information, see + * [Labeling Keys](https://cloud.google.com/kms/docs/labeling-keys). + * + * Generated from protobuf field map labels = 10; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Immutable. Whether this key may contain imported versions only. + * + * Generated from protobuf field bool import_only = 13 [(.google.api.field_behavior) = IMMUTABLE]; + * @return bool + */ + public function getImportOnly() + { + return $this->import_only; + } + + /** + * Immutable. Whether this key may contain imported versions only. + * + * Generated from protobuf field bool import_only = 13 [(.google.api.field_behavior) = IMMUTABLE]; + * @param bool $var + * @return $this + */ + public function setImportOnly($var) + { + GPBUtil::checkBool($var); + $this->import_only = $var; + + return $this; + } + + /** + * Immutable. The period of time that versions of this key spend in the + * [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED] + * state before transitioning to + * [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED]. + * If not specified at creation time, the default duration is 30 days. + * + * Generated from protobuf field .google.protobuf.Duration destroy_scheduled_duration = 14 [(.google.api.field_behavior) = IMMUTABLE]; + * @return \Google\Protobuf\Duration|null + */ + public function getDestroyScheduledDuration() + { + return $this->destroy_scheduled_duration; + } + + public function hasDestroyScheduledDuration() + { + return isset($this->destroy_scheduled_duration); + } + + public function clearDestroyScheduledDuration() + { + unset($this->destroy_scheduled_duration); + } + + /** + * Immutable. The period of time that versions of this key spend in the + * [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED] + * state before transitioning to + * [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED]. + * If not specified at creation time, the default duration is 30 days. + * + * Generated from protobuf field .google.protobuf.Duration destroy_scheduled_duration = 14 [(.google.api.field_behavior) = IMMUTABLE]; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setDestroyScheduledDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->destroy_scheduled_duration = $var; + + return $this; + } + + /** + * Immutable. The resource name of the backend environment where the key + * material for all [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] + * associated with this [CryptoKey][google.cloud.kms.v1.CryptoKey] reside and + * where all related cryptographic operations are performed. Only applicable + * if [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] have a + * [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of + * [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC], with the + * resource name in the format `projects/*/locations/*/ekmConnections/*`. Only + * applicable if [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] + * have a [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of + * [HSM_SINGLE_TENANT][google.cloud.kms.v1.ProtectionLevel.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][google.cloud.kms.v1.ProtectionLevel] in the future. + * + * Generated from protobuf field string crypto_key_backend = 15 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @return string + */ + public function getCryptoKeyBackend() + { + return $this->crypto_key_backend; + } + + /** + * Immutable. The resource name of the backend environment where the key + * material for all [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] + * associated with this [CryptoKey][google.cloud.kms.v1.CryptoKey] reside and + * where all related cryptographic operations are performed. Only applicable + * if [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] have a + * [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of + * [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC], with the + * resource name in the format `projects/*/locations/*/ekmConnections/*`. Only + * applicable if [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] + * have a [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of + * [HSM_SINGLE_TENANT][google.cloud.kms.v1.ProtectionLevel.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][google.cloud.kms.v1.ProtectionLevel] in the future. + * + * Generated from protobuf field string crypto_key_backend = 15 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setCryptoKeyBackend($var) + { + GPBUtil::checkString($var, True); + $this->crypto_key_backend = $var; + + return $this; + } + + /** + * 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. + * + * Generated from protobuf field .google.cloud.kms.v1.KeyAccessJustificationsPolicy key_access_justifications_policy = 17 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Kms\V1\KeyAccessJustificationsPolicy|null + */ + public function getKeyAccessJustificationsPolicy() + { + return $this->key_access_justifications_policy; + } + + public function hasKeyAccessJustificationsPolicy() + { + return isset($this->key_access_justifications_policy); + } + + public function clearKeyAccessJustificationsPolicy() + { + unset($this->key_access_justifications_policy); + } + + /** + * 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. + * + * Generated from protobuf field .google.cloud.kms.v1.KeyAccessJustificationsPolicy key_access_justifications_policy = 17 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Kms\V1\KeyAccessJustificationsPolicy $var + * @return $this + */ + public function setKeyAccessJustificationsPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\KeyAccessJustificationsPolicy::class); + $this->key_access_justifications_policy = $var; + + return $this; + } + + /** + * @return string + */ + public function getRotationSchedule() + { + return $this->whichOneof("rotation_schedule"); + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKey/CryptoKeyPurpose.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKey/CryptoKeyPurpose.php new file mode 100644 index 000000000000..b0f4767bbd60 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKey/CryptoKeyPurpose.php @@ -0,0 +1,114 @@ +google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose + */ +class CryptoKeyPurpose +{ + /** + * Not specified. + * + * Generated from protobuf enum CRYPTO_KEY_PURPOSE_UNSPECIFIED = 0; + */ + const CRYPTO_KEY_PURPOSE_UNSPECIFIED = 0; + /** + * [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used + * with [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt] and + * [Decrypt][google.cloud.kms.v1.KeyManagementService.Decrypt]. + * + * Generated from protobuf enum ENCRYPT_DECRYPT = 1; + */ + const ENCRYPT_DECRYPT = 1; + /** + * [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used + * with + * [AsymmetricSign][google.cloud.kms.v1.KeyManagementService.AsymmetricSign] + * and + * [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey]. + * + * Generated from protobuf enum ASYMMETRIC_SIGN = 5; + */ + const ASYMMETRIC_SIGN = 5; + /** + * [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used + * with + * [AsymmetricDecrypt][google.cloud.kms.v1.KeyManagementService.AsymmetricDecrypt] + * and + * [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey]. + * + * Generated from protobuf enum ASYMMETRIC_DECRYPT = 6; + */ + const ASYMMETRIC_DECRYPT = 6; + /** + * [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used + * with [RawEncrypt][google.cloud.kms.v1.KeyManagementService.RawEncrypt] + * and [RawDecrypt][google.cloud.kms.v1.KeyManagementService.RawDecrypt]. + * This purpose is meant to be used for interoperable symmetric + * encryption and does not support automatic CryptoKey rotation. + * + * Generated from protobuf enum RAW_ENCRYPT_DECRYPT = 7; + */ + const RAW_ENCRYPT_DECRYPT = 7; + /** + * [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used + * with [MacSign][google.cloud.kms.v1.KeyManagementService.MacSign]. + * + * Generated from protobuf enum MAC = 9; + */ + const MAC = 9; + /** + * [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used + * with + * [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey] + * and [Decapsulate][google.cloud.kms.v1.KeyManagementService.Decapsulate]. + * + * Generated from protobuf enum KEY_ENCAPSULATION = 10; + */ + const KEY_ENCAPSULATION = 10; + + private static $valueToName = [ + self::CRYPTO_KEY_PURPOSE_UNSPECIFIED => 'CRYPTO_KEY_PURPOSE_UNSPECIFIED', + self::ENCRYPT_DECRYPT => 'ENCRYPT_DECRYPT', + self::ASYMMETRIC_SIGN => 'ASYMMETRIC_SIGN', + self::ASYMMETRIC_DECRYPT => 'ASYMMETRIC_DECRYPT', + self::RAW_ENCRYPT_DECRYPT => 'RAW_ENCRYPT_DECRYPT', + self::MAC => 'MAC', + self::KEY_ENCAPSULATION => 'KEY_ENCAPSULATION', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CryptoKeyPurpose::class, \Google\Cloud\Kms\V1\CryptoKey_CryptoKeyPurpose::class); + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersion.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersion.php new file mode 100644 index 000000000000..b88345be44c3 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersion.php @@ -0,0 +1,819 @@ +google.cloud.kms.v1.CryptoKeyVersion + */ +class CryptoKeyVersion extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The resource name for this + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in the format + * `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * The current state of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState state = 3; + */ + protected $state = 0; + /** + * Output only. The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] + * describing how crypto operations are performed with this + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. + * + * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $protection_level = 0; + /** + * Output only. The + * [CryptoKeyVersionAlgorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] + * that this [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] + * supports. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $algorithm = 0; + /** + * 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][google.cloud.kms.v1.CryptoKeyVersion.protection_level] + * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM]. + * + * Generated from protobuf field .google.cloud.kms.v1.KeyOperationAttestation attestation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $attestation = null; + /** + * Output only. The time at which this + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The time this + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material was + * generated. + * + * Generated from protobuf field .google.protobuf.Timestamp generate_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $generate_time = null; + /** + * Output only. The time this + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material is + * scheduled for destruction. Only present if + * [state][google.cloud.kms.v1.CryptoKeyVersion.state] is + * [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED]. + * + * Generated from protobuf field .google.protobuf.Timestamp destroy_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $destroy_time = null; + /** + * Output only. The time this CryptoKeyVersion's key material was + * destroyed. Only present if + * [state][google.cloud.kms.v1.CryptoKeyVersion.state] is + * [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED]. + * + * Generated from protobuf field .google.protobuf.Timestamp destroy_event_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $destroy_event_time = null; + /** + * Output only. The name of the [ImportJob][google.cloud.kms.v1.ImportJob] + * used in the most recent import of this + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. Only present if + * the underlying key material was imported. + * + * Generated from protobuf field string import_job = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $import_job = ''; + /** + * Output only. The time at which this + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material was + * most recently imported. + * + * Generated from protobuf field .google.protobuf.Timestamp import_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $import_time = null; + /** + * Output only. The root cause of the most recent import failure. Only present + * if [state][google.cloud.kms.v1.CryptoKeyVersion.state] is + * [IMPORT_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.IMPORT_FAILED]. + * + * Generated from protobuf field string import_failure_reason = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $import_failure_reason = ''; + /** + * Output only. The root cause of the most recent generation failure. Only + * present if [state][google.cloud.kms.v1.CryptoKeyVersion.state] is + * [GENERATION_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.GENERATION_FAILED]. + * + * Generated from protobuf field string generation_failure_reason = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $generation_failure_reason = ''; + /** + * Output only. The root cause of the most recent external destruction + * failure. Only present if + * [state][google.cloud.kms.v1.CryptoKeyVersion.state] is + * [EXTERNAL_DESTRUCTION_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.EXTERNAL_DESTRUCTION_FAILED]. + * + * Generated from protobuf field string external_destruction_failure_reason = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $external_destruction_failure_reason = ''; + /** + * ExternalProtectionLevelOptions stores a group of additional fields for + * configuring a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that + * are specific to the + * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] protection level + * and [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC] + * protection levels. + * + * Generated from protobuf field .google.cloud.kms.v1.ExternalProtectionLevelOptions external_protection_level_options = 17; + */ + protected $external_protection_level_options = null; + /** + * Output only. Whether or not this key version is eligible for reimport, by + * being specified as a target in + * [ImportCryptoKeyVersionRequest.crypto_key_version][google.cloud.kms.v1.ImportCryptoKeyVersionRequest.crypto_key_version]. + * + * Generated from protobuf field bool reimport_eligible = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $reimport_eligible = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The resource name for this + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in the format + * `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`. + * @type int $state + * The current state of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. + * @type int $protection_level + * Output only. The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] + * describing how crypto operations are performed with this + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. + * @type int $algorithm + * Output only. The + * [CryptoKeyVersionAlgorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] + * that this [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] + * supports. + * @type \Google\Cloud\Kms\V1\KeyOperationAttestation $attestation + * 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][google.cloud.kms.v1.CryptoKeyVersion.protection_level] + * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM]. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time at which this + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] was created. + * @type \Google\Protobuf\Timestamp $generate_time + * Output only. The time this + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material was + * generated. + * @type \Google\Protobuf\Timestamp $destroy_time + * Output only. The time this + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material is + * scheduled for destruction. Only present if + * [state][google.cloud.kms.v1.CryptoKeyVersion.state] is + * [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED]. + * @type \Google\Protobuf\Timestamp $destroy_event_time + * Output only. The time this CryptoKeyVersion's key material was + * destroyed. Only present if + * [state][google.cloud.kms.v1.CryptoKeyVersion.state] is + * [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED]. + * @type string $import_job + * Output only. The name of the [ImportJob][google.cloud.kms.v1.ImportJob] + * used in the most recent import of this + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. Only present if + * the underlying key material was imported. + * @type \Google\Protobuf\Timestamp $import_time + * Output only. The time at which this + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material was + * most recently imported. + * @type string $import_failure_reason + * Output only. The root cause of the most recent import failure. Only present + * if [state][google.cloud.kms.v1.CryptoKeyVersion.state] is + * [IMPORT_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.IMPORT_FAILED]. + * @type string $generation_failure_reason + * Output only. The root cause of the most recent generation failure. Only + * present if [state][google.cloud.kms.v1.CryptoKeyVersion.state] is + * [GENERATION_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.GENERATION_FAILED]. + * @type string $external_destruction_failure_reason + * Output only. The root cause of the most recent external destruction + * failure. Only present if + * [state][google.cloud.kms.v1.CryptoKeyVersion.state] is + * [EXTERNAL_DESTRUCTION_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.EXTERNAL_DESTRUCTION_FAILED]. + * @type \Google\Cloud\Kms\V1\ExternalProtectionLevelOptions $external_protection_level_options + * ExternalProtectionLevelOptions stores a group of additional fields for + * configuring a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that + * are specific to the + * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] protection level + * and [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC] + * protection levels. + * @type bool $reimport_eligible + * Output only. Whether or not this key version is eligible for reimport, by + * being specified as a target in + * [ImportCryptoKeyVersionRequest.crypto_key_version][google.cloud.kms.v1.ImportCryptoKeyVersionRequest.crypto_key_version]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The resource name for this + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in the format + * `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The resource name for this + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in the format + * `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The current state of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState state = 3; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * The current state of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState state = 3; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\CryptoKeyVersion\CryptoKeyVersionState::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] + * describing how crypto operations are performed with this + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. + * + * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getProtectionLevel() + { + return $this->protection_level; + } + + /** + * Output only. The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] + * describing how crypto operations are performed with this + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. + * + * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setProtectionLevel($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\ProtectionLevel::class); + $this->protection_level = $var; + + return $this; + } + + /** + * Output only. The + * [CryptoKeyVersionAlgorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] + * that this [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] + * supports. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getAlgorithm() + { + return $this->algorithm; + } + + /** + * Output only. The + * [CryptoKeyVersionAlgorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] + * that this [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] + * supports. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setAlgorithm($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\CryptoKeyVersion\CryptoKeyVersionAlgorithm::class); + $this->algorithm = $var; + + return $this; + } + + /** + * 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][google.cloud.kms.v1.CryptoKeyVersion.protection_level] + * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM]. + * + * Generated from protobuf field .google.cloud.kms.v1.KeyOperationAttestation attestation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Kms\V1\KeyOperationAttestation|null + */ + public function getAttestation() + { + return $this->attestation; + } + + public function hasAttestation() + { + return isset($this->attestation); + } + + public function clearAttestation() + { + unset($this->attestation); + } + + /** + * 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][google.cloud.kms.v1.CryptoKeyVersion.protection_level] + * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM]. + * + * Generated from protobuf field .google.cloud.kms.v1.KeyOperationAttestation attestation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Kms\V1\KeyOperationAttestation $var + * @return $this + */ + public function setAttestation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\KeyOperationAttestation::class); + $this->attestation = $var; + + return $this; + } + + /** + * Output only. The time at which this + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time at which this + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The time this + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material was + * generated. + * + * Generated from protobuf field .google.protobuf.Timestamp generate_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getGenerateTime() + { + return $this->generate_time; + } + + public function hasGenerateTime() + { + return isset($this->generate_time); + } + + public function clearGenerateTime() + { + unset($this->generate_time); + } + + /** + * Output only. The time this + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material was + * generated. + * + * Generated from protobuf field .google.protobuf.Timestamp generate_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setGenerateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->generate_time = $var; + + return $this; + } + + /** + * Output only. The time this + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material is + * scheduled for destruction. Only present if + * [state][google.cloud.kms.v1.CryptoKeyVersion.state] is + * [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED]. + * + * Generated from protobuf field .google.protobuf.Timestamp destroy_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getDestroyTime() + { + return $this->destroy_time; + } + + public function hasDestroyTime() + { + return isset($this->destroy_time); + } + + public function clearDestroyTime() + { + unset($this->destroy_time); + } + + /** + * Output only. The time this + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material is + * scheduled for destruction. Only present if + * [state][google.cloud.kms.v1.CryptoKeyVersion.state] is + * [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED]. + * + * Generated from protobuf field .google.protobuf.Timestamp destroy_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setDestroyTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->destroy_time = $var; + + return $this; + } + + /** + * Output only. The time this CryptoKeyVersion's key material was + * destroyed. Only present if + * [state][google.cloud.kms.v1.CryptoKeyVersion.state] is + * [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED]. + * + * Generated from protobuf field .google.protobuf.Timestamp destroy_event_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getDestroyEventTime() + { + return $this->destroy_event_time; + } + + public function hasDestroyEventTime() + { + return isset($this->destroy_event_time); + } + + public function clearDestroyEventTime() + { + unset($this->destroy_event_time); + } + + /** + * Output only. The time this CryptoKeyVersion's key material was + * destroyed. Only present if + * [state][google.cloud.kms.v1.CryptoKeyVersion.state] is + * [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED]. + * + * Generated from protobuf field .google.protobuf.Timestamp destroy_event_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setDestroyEventTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->destroy_event_time = $var; + + return $this; + } + + /** + * Output only. The name of the [ImportJob][google.cloud.kms.v1.ImportJob] + * used in the most recent import of this + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. Only present if + * the underlying key material was imported. + * + * Generated from protobuf field string import_job = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getImportJob() + { + return $this->import_job; + } + + /** + * Output only. The name of the [ImportJob][google.cloud.kms.v1.ImportJob] + * used in the most recent import of this + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. Only present if + * the underlying key material was imported. + * + * Generated from protobuf field string import_job = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setImportJob($var) + { + GPBUtil::checkString($var, True); + $this->import_job = $var; + + return $this; + } + + /** + * Output only. The time at which this + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material was + * most recently imported. + * + * Generated from protobuf field .google.protobuf.Timestamp import_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getImportTime() + { + return $this->import_time; + } + + public function hasImportTime() + { + return isset($this->import_time); + } + + public function clearImportTime() + { + unset($this->import_time); + } + + /** + * Output only. The time at which this + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material was + * most recently imported. + * + * Generated from protobuf field .google.protobuf.Timestamp import_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setImportTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->import_time = $var; + + return $this; + } + + /** + * Output only. The root cause of the most recent import failure. Only present + * if [state][google.cloud.kms.v1.CryptoKeyVersion.state] is + * [IMPORT_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.IMPORT_FAILED]. + * + * Generated from protobuf field string import_failure_reason = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getImportFailureReason() + { + return $this->import_failure_reason; + } + + /** + * Output only. The root cause of the most recent import failure. Only present + * if [state][google.cloud.kms.v1.CryptoKeyVersion.state] is + * [IMPORT_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.IMPORT_FAILED]. + * + * Generated from protobuf field string import_failure_reason = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setImportFailureReason($var) + { + GPBUtil::checkString($var, True); + $this->import_failure_reason = $var; + + return $this; + } + + /** + * Output only. The root cause of the most recent generation failure. Only + * present if [state][google.cloud.kms.v1.CryptoKeyVersion.state] is + * [GENERATION_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.GENERATION_FAILED]. + * + * Generated from protobuf field string generation_failure_reason = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getGenerationFailureReason() + { + return $this->generation_failure_reason; + } + + /** + * Output only. The root cause of the most recent generation failure. Only + * present if [state][google.cloud.kms.v1.CryptoKeyVersion.state] is + * [GENERATION_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.GENERATION_FAILED]. + * + * Generated from protobuf field string generation_failure_reason = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setGenerationFailureReason($var) + { + GPBUtil::checkString($var, True); + $this->generation_failure_reason = $var; + + return $this; + } + + /** + * Output only. The root cause of the most recent external destruction + * failure. Only present if + * [state][google.cloud.kms.v1.CryptoKeyVersion.state] is + * [EXTERNAL_DESTRUCTION_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.EXTERNAL_DESTRUCTION_FAILED]. + * + * Generated from protobuf field string external_destruction_failure_reason = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getExternalDestructionFailureReason() + { + return $this->external_destruction_failure_reason; + } + + /** + * Output only. The root cause of the most recent external destruction + * failure. Only present if + * [state][google.cloud.kms.v1.CryptoKeyVersion.state] is + * [EXTERNAL_DESTRUCTION_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.EXTERNAL_DESTRUCTION_FAILED]. + * + * Generated from protobuf field string external_destruction_failure_reason = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setExternalDestructionFailureReason($var) + { + GPBUtil::checkString($var, True); + $this->external_destruction_failure_reason = $var; + + return $this; + } + + /** + * ExternalProtectionLevelOptions stores a group of additional fields for + * configuring a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that + * are specific to the + * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] protection level + * and [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC] + * protection levels. + * + * Generated from protobuf field .google.cloud.kms.v1.ExternalProtectionLevelOptions external_protection_level_options = 17; + * @return \Google\Cloud\Kms\V1\ExternalProtectionLevelOptions|null + */ + public function getExternalProtectionLevelOptions() + { + return $this->external_protection_level_options; + } + + public function hasExternalProtectionLevelOptions() + { + return isset($this->external_protection_level_options); + } + + public function clearExternalProtectionLevelOptions() + { + unset($this->external_protection_level_options); + } + + /** + * ExternalProtectionLevelOptions stores a group of additional fields for + * configuring a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that + * are specific to the + * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] protection level + * and [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC] + * protection levels. + * + * Generated from protobuf field .google.cloud.kms.v1.ExternalProtectionLevelOptions external_protection_level_options = 17; + * @param \Google\Cloud\Kms\V1\ExternalProtectionLevelOptions $var + * @return $this + */ + public function setExternalProtectionLevelOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\ExternalProtectionLevelOptions::class); + $this->external_protection_level_options = $var; + + return $this; + } + + /** + * Output only. Whether or not this key version is eligible for reimport, by + * being specified as a target in + * [ImportCryptoKeyVersionRequest.crypto_key_version][google.cloud.kms.v1.ImportCryptoKeyVersionRequest.crypto_key_version]. + * + * Generated from protobuf field bool reimport_eligible = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getReimportEligible() + { + return $this->reimport_eligible; + } + + /** + * Output only. Whether or not this key version is eligible for reimport, by + * being specified as a target in + * [ImportCryptoKeyVersionRequest.crypto_key_version][google.cloud.kms.v1.ImportCryptoKeyVersionRequest.crypto_key_version]. + * + * Generated from protobuf field bool reimport_eligible = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setReimportEligible($var) + { + GPBUtil::checkBool($var); + $this->reimport_eligible = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersion/CryptoKeyVersionAlgorithm.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersion/CryptoKeyVersionAlgorithm.php new file mode 100644 index 000000000000..b4180f508dca --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersion/CryptoKeyVersionAlgorithm.php @@ -0,0 +1,425 @@ +google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm + */ +class CryptoKeyVersionAlgorithm +{ + /** + * Not specified. + * + * Generated from protobuf enum CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED = 0; + */ + const CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED = 0; + /** + * Creates symmetric encryption keys. + * + * Generated from protobuf enum GOOGLE_SYMMETRIC_ENCRYPTION = 1; + */ + const GOOGLE_SYMMETRIC_ENCRYPTION = 1; + /** + * AES-GCM (Galois Counter Mode) using 128-bit keys. + * + * Generated from protobuf enum AES_128_GCM = 41; + */ + const AES_128_GCM = 41; + /** + * AES-GCM (Galois Counter Mode) using 256-bit keys. + * + * Generated from protobuf enum AES_256_GCM = 19; + */ + const AES_256_GCM = 19; + /** + * AES-CBC (Cipher Block Chaining Mode) using 128-bit keys. + * + * Generated from protobuf enum AES_128_CBC = 42; + */ + const AES_128_CBC = 42; + /** + * AES-CBC (Cipher Block Chaining Mode) using 256-bit keys. + * + * Generated from protobuf enum AES_256_CBC = 43; + */ + const AES_256_CBC = 43; + /** + * AES-CTR (Counter Mode) using 128-bit keys. + * + * Generated from protobuf enum AES_128_CTR = 44; + */ + const AES_128_CTR = 44; + /** + * AES-CTR (Counter Mode) using 256-bit keys. + * + * Generated from protobuf enum AES_256_CTR = 45; + */ + const AES_256_CTR = 45; + /** + * RSASSA-PSS 2048 bit key with a SHA256 digest. + * + * Generated from protobuf enum RSA_SIGN_PSS_2048_SHA256 = 2; + */ + const RSA_SIGN_PSS_2048_SHA256 = 2; + /** + * RSASSA-PSS 3072 bit key with a SHA256 digest. + * + * Generated from protobuf enum RSA_SIGN_PSS_3072_SHA256 = 3; + */ + const RSA_SIGN_PSS_3072_SHA256 = 3; + /** + * RSASSA-PSS 4096 bit key with a SHA256 digest. + * + * Generated from protobuf enum RSA_SIGN_PSS_4096_SHA256 = 4; + */ + const RSA_SIGN_PSS_4096_SHA256 = 4; + /** + * RSASSA-PSS 4096 bit key with a SHA512 digest. + * + * Generated from protobuf enum RSA_SIGN_PSS_4096_SHA512 = 15; + */ + const RSA_SIGN_PSS_4096_SHA512 = 15; + /** + * RSASSA-PKCS1-v1_5 with a 2048 bit key and a SHA256 digest. + * + * Generated from protobuf enum RSA_SIGN_PKCS1_2048_SHA256 = 5; + */ + const RSA_SIGN_PKCS1_2048_SHA256 = 5; + /** + * RSASSA-PKCS1-v1_5 with a 3072 bit key and a SHA256 digest. + * + * Generated from protobuf enum RSA_SIGN_PKCS1_3072_SHA256 = 6; + */ + const RSA_SIGN_PKCS1_3072_SHA256 = 6; + /** + * RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA256 digest. + * + * Generated from protobuf enum RSA_SIGN_PKCS1_4096_SHA256 = 7; + */ + const RSA_SIGN_PKCS1_4096_SHA256 = 7; + /** + * RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA512 digest. + * + * Generated from protobuf enum RSA_SIGN_PKCS1_4096_SHA512 = 16; + */ + const RSA_SIGN_PKCS1_4096_SHA512 = 16; + /** + * RSASSA-PKCS1-v1_5 signing without encoding, with a 2048 bit key. + * + * Generated from protobuf enum RSA_SIGN_RAW_PKCS1_2048 = 28; + */ + const RSA_SIGN_RAW_PKCS1_2048 = 28; + /** + * RSASSA-PKCS1-v1_5 signing without encoding, with a 3072 bit key. + * + * Generated from protobuf enum RSA_SIGN_RAW_PKCS1_3072 = 29; + */ + const RSA_SIGN_RAW_PKCS1_3072 = 29; + /** + * RSASSA-PKCS1-v1_5 signing without encoding, with a 4096 bit key. + * + * Generated from protobuf enum RSA_SIGN_RAW_PKCS1_4096 = 30; + */ + const RSA_SIGN_RAW_PKCS1_4096 = 30; + /** + * RSAES-OAEP 2048 bit key with a SHA256 digest. + * + * Generated from protobuf enum RSA_DECRYPT_OAEP_2048_SHA256 = 8; + */ + const RSA_DECRYPT_OAEP_2048_SHA256 = 8; + /** + * RSAES-OAEP 3072 bit key with a SHA256 digest. + * + * Generated from protobuf enum RSA_DECRYPT_OAEP_3072_SHA256 = 9; + */ + const RSA_DECRYPT_OAEP_3072_SHA256 = 9; + /** + * RSAES-OAEP 4096 bit key with a SHA256 digest. + * + * Generated from protobuf enum RSA_DECRYPT_OAEP_4096_SHA256 = 10; + */ + const RSA_DECRYPT_OAEP_4096_SHA256 = 10; + /** + * RSAES-OAEP 4096 bit key with a SHA512 digest. + * + * Generated from protobuf enum RSA_DECRYPT_OAEP_4096_SHA512 = 17; + */ + const RSA_DECRYPT_OAEP_4096_SHA512 = 17; + /** + * RSAES-OAEP 2048 bit key with a SHA1 digest. + * + * Generated from protobuf enum RSA_DECRYPT_OAEP_2048_SHA1 = 37; + */ + const RSA_DECRYPT_OAEP_2048_SHA1 = 37; + /** + * RSAES-OAEP 3072 bit key with a SHA1 digest. + * + * Generated from protobuf enum RSA_DECRYPT_OAEP_3072_SHA1 = 38; + */ + const RSA_DECRYPT_OAEP_3072_SHA1 = 38; + /** + * RSAES-OAEP 4096 bit key with a SHA1 digest. + * + * Generated from protobuf enum RSA_DECRYPT_OAEP_4096_SHA1 = 39; + */ + const RSA_DECRYPT_OAEP_4096_SHA1 = 39; + /** + * 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 + * + * Generated from protobuf enum EC_SIGN_P256_SHA256 = 12; + */ + const EC_SIGN_P256_SHA256 = 12; + /** + * 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 + * + * Generated from protobuf enum EC_SIGN_P384_SHA384 = 13; + */ + const EC_SIGN_P384_SHA384 = 13; + /** + * 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 + * + * Generated from protobuf enum EC_SIGN_SECP256K1_SHA256 = 31; + */ + const EC_SIGN_SECP256K1_SHA256 = 31; + /** + * EdDSA on the Curve25519 in pure mode (taking data as input). + * + * Generated from protobuf enum EC_SIGN_ED25519 = 40; + */ + const EC_SIGN_ED25519 = 40; + /** + * HMAC-SHA256 signing with a 256 bit key. + * + * Generated from protobuf enum HMAC_SHA256 = 32; + */ + const HMAC_SHA256 = 32; + /** + * HMAC-SHA1 signing with a 160 bit key. + * + * Generated from protobuf enum HMAC_SHA1 = 33; + */ + const HMAC_SHA1 = 33; + /** + * HMAC-SHA384 signing with a 384 bit key. + * + * Generated from protobuf enum HMAC_SHA384 = 34; + */ + const HMAC_SHA384 = 34; + /** + * HMAC-SHA512 signing with a 512 bit key. + * + * Generated from protobuf enum HMAC_SHA512 = 35; + */ + const HMAC_SHA512 = 35; + /** + * HMAC-SHA224 signing with a 224 bit key. + * + * Generated from protobuf enum HMAC_SHA224 = 36; + */ + const HMAC_SHA224 = 36; + /** + * Algorithm representing symmetric encryption by an external key manager. + * + * Generated from protobuf enum EXTERNAL_SYMMETRIC_ENCRYPTION = 18; + */ + const EXTERNAL_SYMMETRIC_ENCRYPTION = 18; + /** + * ML-KEM-768 (FIPS 203) + * + * Generated from protobuf enum ML_KEM_768 = 47; + */ + const ML_KEM_768 = 47; + /** + * ML-KEM-1024 (FIPS 203) + * + * Generated from protobuf enum ML_KEM_1024 = 48; + */ + const ML_KEM_1024 = 48; + /** + * X-Wing hybrid KEM combining ML-KEM-768 with X25519 following + * datatracker.ietf.org/doc/draft-connolly-cfrg-xwing-kem/. + * + * Generated from protobuf enum KEM_XWING = 63; + */ + const KEM_XWING = 63; + /** + * The post-quantum Module-Lattice-Based Digital Signature Algorithm, at + * security level 1. Randomized version. + * + * Generated from protobuf enum PQ_SIGN_ML_DSA_44 = 68; + */ + const PQ_SIGN_ML_DSA_44 = 68; + /** + * The post-quantum Module-Lattice-Based Digital Signature Algorithm, at + * security level 3. Randomized version. + * + * Generated from protobuf enum PQ_SIGN_ML_DSA_65 = 56; + */ + const PQ_SIGN_ML_DSA_65 = 56; + /** + * The post-quantum Module-Lattice-Based Digital Signature Algorithm, at + * security level 5. Randomized version. + * + * Generated from protobuf enum PQ_SIGN_ML_DSA_87 = 69; + */ + const PQ_SIGN_ML_DSA_87 = 69; + /** + * The post-quantum stateless hash-based digital signature algorithm, at + * security level 1. Randomized version. + * + * Generated from protobuf enum PQ_SIGN_SLH_DSA_SHA2_128S = 57; + */ + const PQ_SIGN_SLH_DSA_SHA2_128S = 57; + /** + * The post-quantum stateless hash-based digital signature algorithm, at + * security level 1. Randomized pre-hash version supporting SHA256 digests. + * + * Generated from protobuf enum PQ_SIGN_HASH_SLH_DSA_SHA2_128S_SHA256 = 60; + */ + const PQ_SIGN_HASH_SLH_DSA_SHA2_128S_SHA256 = 60; + /** + * The post-quantum Module-Lattice-Based Digital Signature Algorithm, at + * security level 1. Randomized version supporting externally-computed + * message representatives. + * + * Generated from protobuf enum PQ_SIGN_ML_DSA_44_EXTERNAL_MU = 70; + */ + const PQ_SIGN_ML_DSA_44_EXTERNAL_MU = 70; + /** + * The post-quantum Module-Lattice-Based Digital Signature Algorithm, at + * security level 3. Randomized version supporting externally-computed + * message representatives. + * + * Generated from protobuf enum PQ_SIGN_ML_DSA_65_EXTERNAL_MU = 67; + */ + const PQ_SIGN_ML_DSA_65_EXTERNAL_MU = 67; + /** + * The post-quantum Module-Lattice-Based Digital Signature Algorithm, at + * security level 5. Randomized version supporting externally-computed + * message representatives. + * + * Generated from protobuf enum PQ_SIGN_ML_DSA_87_EXTERNAL_MU = 71; + */ + const PQ_SIGN_ML_DSA_87_EXTERNAL_MU = 71; + + private static $valueToName = [ + self::CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED => 'CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED', + self::GOOGLE_SYMMETRIC_ENCRYPTION => 'GOOGLE_SYMMETRIC_ENCRYPTION', + self::AES_128_GCM => 'AES_128_GCM', + self::AES_256_GCM => 'AES_256_GCM', + self::AES_128_CBC => 'AES_128_CBC', + self::AES_256_CBC => 'AES_256_CBC', + self::AES_128_CTR => 'AES_128_CTR', + self::AES_256_CTR => 'AES_256_CTR', + self::RSA_SIGN_PSS_2048_SHA256 => 'RSA_SIGN_PSS_2048_SHA256', + self::RSA_SIGN_PSS_3072_SHA256 => 'RSA_SIGN_PSS_3072_SHA256', + self::RSA_SIGN_PSS_4096_SHA256 => 'RSA_SIGN_PSS_4096_SHA256', + self::RSA_SIGN_PSS_4096_SHA512 => 'RSA_SIGN_PSS_4096_SHA512', + self::RSA_SIGN_PKCS1_2048_SHA256 => 'RSA_SIGN_PKCS1_2048_SHA256', + self::RSA_SIGN_PKCS1_3072_SHA256 => 'RSA_SIGN_PKCS1_3072_SHA256', + self::RSA_SIGN_PKCS1_4096_SHA256 => 'RSA_SIGN_PKCS1_4096_SHA256', + self::RSA_SIGN_PKCS1_4096_SHA512 => 'RSA_SIGN_PKCS1_4096_SHA512', + self::RSA_SIGN_RAW_PKCS1_2048 => 'RSA_SIGN_RAW_PKCS1_2048', + self::RSA_SIGN_RAW_PKCS1_3072 => 'RSA_SIGN_RAW_PKCS1_3072', + self::RSA_SIGN_RAW_PKCS1_4096 => 'RSA_SIGN_RAW_PKCS1_4096', + self::RSA_DECRYPT_OAEP_2048_SHA256 => 'RSA_DECRYPT_OAEP_2048_SHA256', + self::RSA_DECRYPT_OAEP_3072_SHA256 => 'RSA_DECRYPT_OAEP_3072_SHA256', + self::RSA_DECRYPT_OAEP_4096_SHA256 => 'RSA_DECRYPT_OAEP_4096_SHA256', + self::RSA_DECRYPT_OAEP_4096_SHA512 => 'RSA_DECRYPT_OAEP_4096_SHA512', + self::RSA_DECRYPT_OAEP_2048_SHA1 => 'RSA_DECRYPT_OAEP_2048_SHA1', + self::RSA_DECRYPT_OAEP_3072_SHA1 => 'RSA_DECRYPT_OAEP_3072_SHA1', + self::RSA_DECRYPT_OAEP_4096_SHA1 => 'RSA_DECRYPT_OAEP_4096_SHA1', + self::EC_SIGN_P256_SHA256 => 'EC_SIGN_P256_SHA256', + self::EC_SIGN_P384_SHA384 => 'EC_SIGN_P384_SHA384', + self::EC_SIGN_SECP256K1_SHA256 => 'EC_SIGN_SECP256K1_SHA256', + self::EC_SIGN_ED25519 => 'EC_SIGN_ED25519', + self::HMAC_SHA256 => 'HMAC_SHA256', + self::HMAC_SHA1 => 'HMAC_SHA1', + self::HMAC_SHA384 => 'HMAC_SHA384', + self::HMAC_SHA512 => 'HMAC_SHA512', + self::HMAC_SHA224 => 'HMAC_SHA224', + self::EXTERNAL_SYMMETRIC_ENCRYPTION => 'EXTERNAL_SYMMETRIC_ENCRYPTION', + self::ML_KEM_768 => 'ML_KEM_768', + self::ML_KEM_1024 => 'ML_KEM_1024', + self::KEM_XWING => 'KEM_XWING', + self::PQ_SIGN_ML_DSA_44 => 'PQ_SIGN_ML_DSA_44', + self::PQ_SIGN_ML_DSA_65 => 'PQ_SIGN_ML_DSA_65', + self::PQ_SIGN_ML_DSA_87 => 'PQ_SIGN_ML_DSA_87', + self::PQ_SIGN_SLH_DSA_SHA2_128S => 'PQ_SIGN_SLH_DSA_SHA2_128S', + self::PQ_SIGN_HASH_SLH_DSA_SHA2_128S_SHA256 => 'PQ_SIGN_HASH_SLH_DSA_SHA2_128S_SHA256', + self::PQ_SIGN_ML_DSA_44_EXTERNAL_MU => 'PQ_SIGN_ML_DSA_44_EXTERNAL_MU', + self::PQ_SIGN_ML_DSA_65_EXTERNAL_MU => 'PQ_SIGN_ML_DSA_65_EXTERNAL_MU', + self::PQ_SIGN_ML_DSA_87_EXTERNAL_MU => 'PQ_SIGN_ML_DSA_87_EXTERNAL_MU', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CryptoKeyVersionAlgorithm::class, \Google\Cloud\Kms\V1\CryptoKeyVersion_CryptoKeyVersionAlgorithm::class); + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersion/CryptoKeyVersionState.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersion/CryptoKeyVersionState.php new file mode 100644 index 000000000000..50c11d918474 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersion/CryptoKeyVersionState.php @@ -0,0 +1,154 @@ +google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState + */ +class CryptoKeyVersionState +{ + /** + * Not specified. + * + * Generated from protobuf enum CRYPTO_KEY_VERSION_STATE_UNSPECIFIED = 0; + */ + const CRYPTO_KEY_VERSION_STATE_UNSPECIFIED = 0; + /** + * This version is still being generated. It may not be used, enabled, + * disabled, or destroyed yet. Cloud KMS will automatically mark this + * version + * [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED] + * as soon as the version is ready. + * + * Generated from protobuf enum PENDING_GENERATION = 5; + */ + const PENDING_GENERATION = 5; + /** + * This version may be used for cryptographic operations. + * + * Generated from protobuf enum ENABLED = 1; + */ + const ENABLED = 1; + /** + * This version may not be used, but the key material is still available, + * and the version can be placed back into the + * [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED] + * state. + * + * Generated from protobuf enum DISABLED = 2; + */ + const DISABLED = 2; + /** + * The key material of this version is destroyed and no longer stored. + * This version may only become + * [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED] + * again if this version is + * [reimport_eligible][google.cloud.kms.v1.CryptoKeyVersion.reimport_eligible] + * and the original key material is reimported with a call to + * [KeyManagementService.ImportCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.ImportCryptoKeyVersion]. + * + * Generated from protobuf enum DESTROYED = 3; + */ + const DESTROYED = 3; + /** + * This version is scheduled for destruction, and will be destroyed soon. + * Call + * [RestoreCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.RestoreCryptoKeyVersion] + * to put it back into the + * [DISABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DISABLED] + * state. + * + * Generated from protobuf enum DESTROY_SCHEDULED = 4; + */ + const DESTROY_SCHEDULED = 4; + /** + * This version is still being imported. It may not be used, enabled, + * disabled, or destroyed yet. Cloud KMS will automatically mark this + * version + * [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED] + * as soon as the version is ready. + * + * Generated from protobuf enum PENDING_IMPORT = 6; + */ + const PENDING_IMPORT = 6; + /** + * 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][google.cloud.kms.v1.CryptoKeyVersion.import_failure_reason]. + * + * Generated from protobuf enum IMPORT_FAILED = 7; + */ + const IMPORT_FAILED = 7; + /** + * 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][google.cloud.kms.v1.CryptoKeyVersion.generation_failure_reason]. + * + * Generated from protobuf enum GENERATION_FAILED = 8; + */ + const GENERATION_FAILED = 8; + /** + * 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. + * + * Generated from protobuf enum PENDING_EXTERNAL_DESTRUCTION = 9; + */ + const PENDING_EXTERNAL_DESTRUCTION = 9; + /** + * 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][google.cloud.kms.v1.CryptoKeyVersion.external_destruction_failure_reason]. + * + * Generated from protobuf enum EXTERNAL_DESTRUCTION_FAILED = 10; + */ + const EXTERNAL_DESTRUCTION_FAILED = 10; + + private static $valueToName = [ + self::CRYPTO_KEY_VERSION_STATE_UNSPECIFIED => 'CRYPTO_KEY_VERSION_STATE_UNSPECIFIED', + self::PENDING_GENERATION => 'PENDING_GENERATION', + self::ENABLED => 'ENABLED', + self::DISABLED => 'DISABLED', + self::DESTROYED => 'DESTROYED', + self::DESTROY_SCHEDULED => 'DESTROY_SCHEDULED', + self::PENDING_IMPORT => 'PENDING_IMPORT', + self::IMPORT_FAILED => 'IMPORT_FAILED', + self::GENERATION_FAILED => 'GENERATION_FAILED', + self::PENDING_EXTERNAL_DESTRUCTION => 'PENDING_EXTERNAL_DESTRUCTION', + self::EXTERNAL_DESTRUCTION_FAILED => 'EXTERNAL_DESTRUCTION_FAILED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CryptoKeyVersionState::class, \Google\Cloud\Kms\V1\CryptoKeyVersion_CryptoKeyVersionState::class); + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersion/CryptoKeyVersionView.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersion/CryptoKeyVersionView.php new file mode 100644 index 000000000000..33a471de9ad7 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersion/CryptoKeyVersionView.php @@ -0,0 +1,67 @@ +google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionView + */ +class CryptoKeyVersionView +{ + /** + * Default view for each + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. Does not + * include the + * [attestation][google.cloud.kms.v1.CryptoKeyVersion.attestation] field. + * + * Generated from protobuf enum CRYPTO_KEY_VERSION_VIEW_UNSPECIFIED = 0; + */ + const CRYPTO_KEY_VERSION_VIEW_UNSPECIFIED = 0; + /** + * Provides all fields in each + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion], including the + * [attestation][google.cloud.kms.v1.CryptoKeyVersion.attestation]. + * + * Generated from protobuf enum FULL = 1; + */ + const FULL = 1; + + private static $valueToName = [ + self::CRYPTO_KEY_VERSION_VIEW_UNSPECIFIED => 'CRYPTO_KEY_VERSION_VIEW_UNSPECIFIED', + self::FULL => 'FULL', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CryptoKeyVersionView::class, \Google\Cloud\Kms\V1\CryptoKeyVersion_CryptoKeyVersionView::class); + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersionTemplate.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersionTemplate.php new file mode 100644 index 000000000000..6f88091103eb --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersionTemplate.php @@ -0,0 +1,150 @@ +google.cloud.kms.v1.CryptoKeyVersionTemplate + */ +class CryptoKeyVersionTemplate extends \Google\Protobuf\Internal\Message +{ + /** + * [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] to use when creating + * a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] based on this + * template. Immutable. Defaults to + * [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE]. + * + * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 1; + */ + protected $protection_level = 0; + /** + * Required. + * [Algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] + * to use when creating a + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] based on this + * template. + * For backwards compatibility, GOOGLE_SYMMETRIC_ENCRYPTION is implied if both + * this field is omitted and + * [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] is + * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $algorithm = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $protection_level + * [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] to use when creating + * a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] based on this + * template. Immutable. Defaults to + * [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE]. + * @type int $algorithm + * Required. + * [Algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] + * to use when creating a + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] based on this + * template. + * For backwards compatibility, GOOGLE_SYMMETRIC_ENCRYPTION is implied if both + * this field is omitted and + * [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] is + * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] to use when creating + * a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] based on this + * template. Immutable. Defaults to + * [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE]. + * + * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 1; + * @return int + */ + public function getProtectionLevel() + { + return $this->protection_level; + } + + /** + * [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] to use when creating + * a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] based on this + * template. Immutable. Defaults to + * [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE]. + * + * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 1; + * @param int $var + * @return $this + */ + public function setProtectionLevel($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\ProtectionLevel::class); + $this->protection_level = $var; + + return $this; + } + + /** + * Required. + * [Algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] + * to use when creating a + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] based on this + * template. + * For backwards compatibility, GOOGLE_SYMMETRIC_ENCRYPTION is implied if both + * this field is omitted and + * [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] is + * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getAlgorithm() + { + return $this->algorithm; + } + + /** + * Required. + * [Algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] + * to use when creating a + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] based on this + * template. + * For backwards compatibility, GOOGLE_SYMMETRIC_ENCRYPTION is implied if both + * this field is omitted and + * [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] is + * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setAlgorithm($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\CryptoKeyVersion\CryptoKeyVersionAlgorithm::class); + $this->algorithm = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DecapsulateRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DecapsulateRequest.php new file mode 100644 index 000000000000..22782c6d33d5 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DecapsulateRequest.php @@ -0,0 +1,297 @@ +google.cloud.kms.v1.DecapsulateRequest + */ +class DecapsulateRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for + * decapsulation. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. The ciphertext produced from encapsulation with the + * named [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public + * key(s). + * + * Generated from protobuf field bytes ciphertext = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $ciphertext = ''; + /** + * Optional. A CRC32C checksum of the + * [DecapsulateRequest.ciphertext][google.cloud.kms.v1.DecapsulateRequest.ciphertext]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [DecapsulateRequest.ciphertext][google.cloud.kms.v1.DecapsulateRequest.ciphertext] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([DecapsulateRequest.ciphertext][google.cloud.kms.v1.DecapsulateRequest.ciphertext]) + * is equal to + * [DecapsulateRequest.ciphertext_crc32c][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $ciphertext_crc32c = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for + * decapsulation. + * @type string $ciphertext + * Required. The ciphertext produced from encapsulation with the + * named [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public + * key(s). + * @type \Google\Protobuf\Int64Value $ciphertext_crc32c + * Optional. A CRC32C checksum of the + * [DecapsulateRequest.ciphertext][google.cloud.kms.v1.DecapsulateRequest.ciphertext]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [DecapsulateRequest.ciphertext][google.cloud.kms.v1.DecapsulateRequest.ciphertext] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([DecapsulateRequest.ciphertext][google.cloud.kms.v1.DecapsulateRequest.ciphertext]) + * is equal to + * [DecapsulateRequest.ciphertext_crc32c][google.cloud.kms.v1.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. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for + * decapsulation. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for + * decapsulation. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The ciphertext produced from encapsulation with the + * named [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public + * key(s). + * + * Generated from protobuf field bytes ciphertext = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getCiphertext() + { + return $this->ciphertext; + } + + /** + * Required. The ciphertext produced from encapsulation with the + * named [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public + * key(s). + * + * Generated from protobuf field bytes ciphertext = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setCiphertext($var) + { + GPBUtil::checkString($var, False); + $this->ciphertext = $var; + + return $this; + } + + /** + * Optional. A CRC32C checksum of the + * [DecapsulateRequest.ciphertext][google.cloud.kms.v1.DecapsulateRequest.ciphertext]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [DecapsulateRequest.ciphertext][google.cloud.kms.v1.DecapsulateRequest.ciphertext] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([DecapsulateRequest.ciphertext][google.cloud.kms.v1.DecapsulateRequest.ciphertext]) + * is equal to + * [DecapsulateRequest.ciphertext_crc32c][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Int64Value|null + */ + public function getCiphertextCrc32C() + { + return $this->ciphertext_crc32c; + } + + public function hasCiphertextCrc32C() + { + return isset($this->ciphertext_crc32c); + } + + public function clearCiphertextCrc32C() + { + unset($this->ciphertext_crc32c); + } + + /** + * Returns the unboxed value from getCiphertextCrc32C() + + * Optional. A CRC32C checksum of the + * [DecapsulateRequest.ciphertext][google.cloud.kms.v1.DecapsulateRequest.ciphertext]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [DecapsulateRequest.ciphertext][google.cloud.kms.v1.DecapsulateRequest.ciphertext] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([DecapsulateRequest.ciphertext][google.cloud.kms.v1.DecapsulateRequest.ciphertext]) + * is equal to + * [DecapsulateRequest.ciphertext_crc32c][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string|null + */ + public function getCiphertextCrc32CUnwrapped() + { + return $this->readWrapperValue("ciphertext_crc32c"); + } + + /** + * Optional. A CRC32C checksum of the + * [DecapsulateRequest.ciphertext][google.cloud.kms.v1.DecapsulateRequest.ciphertext]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [DecapsulateRequest.ciphertext][google.cloud.kms.v1.DecapsulateRequest.ciphertext] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([DecapsulateRequest.ciphertext][google.cloud.kms.v1.DecapsulateRequest.ciphertext]) + * is equal to + * [DecapsulateRequest.ciphertext_crc32c][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setCiphertextCrc32C($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->ciphertext_crc32c = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. + + * Optional. A CRC32C checksum of the + * [DecapsulateRequest.ciphertext][google.cloud.kms.v1.DecapsulateRequest.ciphertext]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [DecapsulateRequest.ciphertext][google.cloud.kms.v1.DecapsulateRequest.ciphertext] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([DecapsulateRequest.ciphertext][google.cloud.kms.v1.DecapsulateRequest.ciphertext]) + * is equal to + * [DecapsulateRequest.ciphertext_crc32c][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string|null $var + * @return $this + */ + public function setCiphertextCrc32CUnwrapped($var) + { + $this->writeWrapperValue("ciphertext_crc32c", $var); + return $this;} + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DecapsulateResponse.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DecapsulateResponse.php new file mode 100644 index 000000000000..508782e5932c --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DecapsulateResponse.php @@ -0,0 +1,354 @@ +google.cloud.kms.v1.DecapsulateResponse + */ +class DecapsulateResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for + * decapsulation. Check this field to verify that the intended resource was + * used for decapsulation. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The decapsulated shared_secret originally encapsulated with the matching + * public key. + * + * Generated from protobuf field bytes shared_secret = 2; + */ + protected $shared_secret = ''; + /** + * Integrity verification field. A CRC32C checksum of the returned + * [DecapsulateResponse.shared_secret][google.cloud.kms.v1.DecapsulateResponse.shared_secret]. + * An integrity check of + * [DecapsulateResponse.shared_secret][google.cloud.kms.v1.DecapsulateResponse.shared_secret] + * can be performed by computing the CRC32C checksum of + * [DecapsulateResponse.shared_secret][google.cloud.kms.v1.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][google.cloud.kms.v1.KeyManagementService] is able to + * successfully decrypt the + * [ciphertext][google.cloud.kms.v1.DecapsulateRequest.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. + * + * Generated from protobuf field optional int64 shared_secret_crc32c = 3; + */ + protected $shared_secret_crc32c = null; + /** + * Integrity verification field. A flag indicating whether + * [DecapsulateRequest.ciphertext_crc32c][google.cloud.kms.v1.DecapsulateRequest.ciphertext_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of the + * [ciphertext][google.cloud.kms.v1.DecapsulateRequest.ciphertext]. A false + * value of this field indicates either that + * [DecapsulateRequest.ciphertext_crc32c][google.cloud.kms.v1.DecapsulateRequest.ciphertext_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [DecapsulateRequest.ciphertext_crc32c][google.cloud.kms.v1.DecapsulateRequest.ciphertext_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * + * Generated from protobuf field bool verified_ciphertext_crc32c = 4; + */ + protected $verified_ciphertext_crc32c = false; + /** + * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in + * decapsulation. + * + * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 5; + */ + protected $protection_level = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for + * decapsulation. Check this field to verify that the intended resource was + * used for decapsulation. + * @type string $shared_secret + * The decapsulated shared_secret originally encapsulated with the matching + * public key. + * @type int|string $shared_secret_crc32c + * Integrity verification field. A CRC32C checksum of the returned + * [DecapsulateResponse.shared_secret][google.cloud.kms.v1.DecapsulateResponse.shared_secret]. + * An integrity check of + * [DecapsulateResponse.shared_secret][google.cloud.kms.v1.DecapsulateResponse.shared_secret] + * can be performed by computing the CRC32C checksum of + * [DecapsulateResponse.shared_secret][google.cloud.kms.v1.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][google.cloud.kms.v1.KeyManagementService] is able to + * successfully decrypt the + * [ciphertext][google.cloud.kms.v1.DecapsulateRequest.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. + * @type bool $verified_ciphertext_crc32c + * Integrity verification field. A flag indicating whether + * [DecapsulateRequest.ciphertext_crc32c][google.cloud.kms.v1.DecapsulateRequest.ciphertext_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of the + * [ciphertext][google.cloud.kms.v1.DecapsulateRequest.ciphertext]. A false + * value of this field indicates either that + * [DecapsulateRequest.ciphertext_crc32c][google.cloud.kms.v1.DecapsulateRequest.ciphertext_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [DecapsulateRequest.ciphertext_crc32c][google.cloud.kms.v1.DecapsulateRequest.ciphertext_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * @type int $protection_level + * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in + * decapsulation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for + * decapsulation. Check this field to verify that the intended resource was + * used for decapsulation. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for + * decapsulation. Check this field to verify that the intended resource was + * used for decapsulation. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The decapsulated shared_secret originally encapsulated with the matching + * public key. + * + * Generated from protobuf field bytes shared_secret = 2; + * @return string + */ + public function getSharedSecret() + { + return $this->shared_secret; + } + + /** + * The decapsulated shared_secret originally encapsulated with the matching + * public key. + * + * Generated from protobuf field bytes shared_secret = 2; + * @param string $var + * @return $this + */ + public function setSharedSecret($var) + { + GPBUtil::checkString($var, False); + $this->shared_secret = $var; + + return $this; + } + + /** + * Integrity verification field. A CRC32C checksum of the returned + * [DecapsulateResponse.shared_secret][google.cloud.kms.v1.DecapsulateResponse.shared_secret]. + * An integrity check of + * [DecapsulateResponse.shared_secret][google.cloud.kms.v1.DecapsulateResponse.shared_secret] + * can be performed by computing the CRC32C checksum of + * [DecapsulateResponse.shared_secret][google.cloud.kms.v1.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][google.cloud.kms.v1.KeyManagementService] is able to + * successfully decrypt the + * [ciphertext][google.cloud.kms.v1.DecapsulateRequest.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. + * + * Generated from protobuf field optional int64 shared_secret_crc32c = 3; + * @return int|string + */ + public function getSharedSecretCrc32C() + { + return isset($this->shared_secret_crc32c) ? $this->shared_secret_crc32c : 0; + } + + public function hasSharedSecretCrc32C() + { + return isset($this->shared_secret_crc32c); + } + + public function clearSharedSecretCrc32C() + { + unset($this->shared_secret_crc32c); + } + + /** + * Integrity verification field. A CRC32C checksum of the returned + * [DecapsulateResponse.shared_secret][google.cloud.kms.v1.DecapsulateResponse.shared_secret]. + * An integrity check of + * [DecapsulateResponse.shared_secret][google.cloud.kms.v1.DecapsulateResponse.shared_secret] + * can be performed by computing the CRC32C checksum of + * [DecapsulateResponse.shared_secret][google.cloud.kms.v1.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][google.cloud.kms.v1.KeyManagementService] is able to + * successfully decrypt the + * [ciphertext][google.cloud.kms.v1.DecapsulateRequest.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. + * + * Generated from protobuf field optional int64 shared_secret_crc32c = 3; + * @param int|string $var + * @return $this + */ + public function setSharedSecretCrc32C($var) + { + GPBUtil::checkInt64($var); + $this->shared_secret_crc32c = $var; + + return $this; + } + + /** + * Integrity verification field. A flag indicating whether + * [DecapsulateRequest.ciphertext_crc32c][google.cloud.kms.v1.DecapsulateRequest.ciphertext_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of the + * [ciphertext][google.cloud.kms.v1.DecapsulateRequest.ciphertext]. A false + * value of this field indicates either that + * [DecapsulateRequest.ciphertext_crc32c][google.cloud.kms.v1.DecapsulateRequest.ciphertext_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [DecapsulateRequest.ciphertext_crc32c][google.cloud.kms.v1.DecapsulateRequest.ciphertext_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * + * Generated from protobuf field bool verified_ciphertext_crc32c = 4; + * @return bool + */ + public function getVerifiedCiphertextCrc32C() + { + return $this->verified_ciphertext_crc32c; + } + + /** + * Integrity verification field. A flag indicating whether + * [DecapsulateRequest.ciphertext_crc32c][google.cloud.kms.v1.DecapsulateRequest.ciphertext_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of the + * [ciphertext][google.cloud.kms.v1.DecapsulateRequest.ciphertext]. A false + * value of this field indicates either that + * [DecapsulateRequest.ciphertext_crc32c][google.cloud.kms.v1.DecapsulateRequest.ciphertext_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [DecapsulateRequest.ciphertext_crc32c][google.cloud.kms.v1.DecapsulateRequest.ciphertext_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * + * Generated from protobuf field bool verified_ciphertext_crc32c = 4; + * @param bool $var + * @return $this + */ + public function setVerifiedCiphertextCrc32C($var) + { + GPBUtil::checkBool($var); + $this->verified_ciphertext_crc32c = $var; + + return $this; + } + + /** + * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in + * decapsulation. + * + * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 5; + * @return int + */ + public function getProtectionLevel() + { + return $this->protection_level; + } + + /** + * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in + * decapsulation. + * + * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 5; + * @param int $var + * @return $this + */ + public function setProtectionLevel($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\ProtectionLevel::class); + $this->protection_level = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DecryptRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DecryptRequest.php new file mode 100644 index 000000000000..86cf3cc753e8 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DecryptRequest.php @@ -0,0 +1,529 @@ +google.cloud.kms.v1.DecryptRequest + */ +class DecryptRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] to use for decryption. The + * server will choose the appropriate version. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. The encrypted data originally returned in + * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext]. + * + * Generated from protobuf field bytes ciphertext = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $ciphertext = ''; + /** + * Optional. Optional data that must match the data originally supplied in + * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. + * + * Generated from protobuf field bytes additional_authenticated_data = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $additional_authenticated_data = ''; + /** + * Optional. An optional CRC32C checksum of the + * [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]) + * is equal to + * [DecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $ciphertext_crc32c = null; + /** + * Optional. An optional CRC32C checksum of the + * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.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][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]) + * is equal to + * [DecryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value additional_authenticated_data_crc32c = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $additional_authenticated_data_crc32c = null; + + /** + * @param string $name Required. The resource name of the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] to use for decryption. The + * server will choose the appropriate version. Please see + * {@see KeyManagementServiceClient::cryptoKeyName()} for help formatting this field. + * @param string $ciphertext Required. The encrypted data originally returned in + * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext]. + * + * @return \Google\Cloud\Kms\V1\DecryptRequest + * + * @experimental + */ + public static function build(string $name, string $ciphertext): self + { + return (new self()) + ->setName($name) + ->setCiphertext($ciphertext); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] to use for decryption. The + * server will choose the appropriate version. + * @type string $ciphertext + * Required. The encrypted data originally returned in + * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext]. + * @type string $additional_authenticated_data + * Optional. Optional data that must match the data originally supplied in + * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. + * @type \Google\Protobuf\Int64Value $ciphertext_crc32c + * Optional. An optional CRC32C checksum of the + * [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]) + * is equal to + * [DecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.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. + * @type \Google\Protobuf\Int64Value $additional_authenticated_data_crc32c + * Optional. An optional CRC32C checksum of the + * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.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][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]) + * is equal to + * [DecryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.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. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] to use for decryption. The + * server will choose the appropriate version. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] to use for decryption. The + * server will choose the appropriate version. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The encrypted data originally returned in + * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext]. + * + * Generated from protobuf field bytes ciphertext = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getCiphertext() + { + return $this->ciphertext; + } + + /** + * Required. The encrypted data originally returned in + * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext]. + * + * Generated from protobuf field bytes ciphertext = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setCiphertext($var) + { + GPBUtil::checkString($var, False); + $this->ciphertext = $var; + + return $this; + } + + /** + * Optional. Optional data that must match the data originally supplied in + * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. + * + * Generated from protobuf field bytes additional_authenticated_data = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getAdditionalAuthenticatedData() + { + return $this->additional_authenticated_data; + } + + /** + * Optional. Optional data that must match the data originally supplied in + * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. + * + * Generated from protobuf field bytes additional_authenticated_data = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setAdditionalAuthenticatedData($var) + { + GPBUtil::checkString($var, False); + $this->additional_authenticated_data = $var; + + return $this; + } + + /** + * Optional. An optional CRC32C checksum of the + * [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]) + * is equal to + * [DecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Int64Value|null + */ + public function getCiphertextCrc32C() + { + return $this->ciphertext_crc32c; + } + + public function hasCiphertextCrc32C() + { + return isset($this->ciphertext_crc32c); + } + + public function clearCiphertextCrc32C() + { + unset($this->ciphertext_crc32c); + } + + /** + * Returns the unboxed value from getCiphertextCrc32C() + + * Optional. An optional CRC32C checksum of the + * [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]) + * is equal to + * [DecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string|null + */ + public function getCiphertextCrc32CUnwrapped() + { + return $this->readWrapperValue("ciphertext_crc32c"); + } + + /** + * Optional. An optional CRC32C checksum of the + * [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]) + * is equal to + * [DecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setCiphertextCrc32C($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->ciphertext_crc32c = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. + + * Optional. An optional CRC32C checksum of the + * [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]) + * is equal to + * [DecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string|null $var + * @return $this + */ + public function setCiphertextCrc32CUnwrapped($var) + { + $this->writeWrapperValue("ciphertext_crc32c", $var); + return $this;} + + /** + * Optional. An optional CRC32C checksum of the + * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.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][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]) + * is equal to + * [DecryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value additional_authenticated_data_crc32c = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Int64Value|null + */ + public function getAdditionalAuthenticatedDataCrc32C() + { + return $this->additional_authenticated_data_crc32c; + } + + public function hasAdditionalAuthenticatedDataCrc32C() + { + return isset($this->additional_authenticated_data_crc32c); + } + + public function clearAdditionalAuthenticatedDataCrc32C() + { + unset($this->additional_authenticated_data_crc32c); + } + + /** + * Returns the unboxed value from getAdditionalAuthenticatedDataCrc32C() + + * Optional. An optional CRC32C checksum of the + * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.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][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]) + * is equal to + * [DecryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value additional_authenticated_data_crc32c = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string|null + */ + public function getAdditionalAuthenticatedDataCrc32CUnwrapped() + { + return $this->readWrapperValue("additional_authenticated_data_crc32c"); + } + + /** + * Optional. An optional CRC32C checksum of the + * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.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][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]) + * is equal to + * [DecryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value additional_authenticated_data_crc32c = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setAdditionalAuthenticatedDataCrc32C($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->additional_authenticated_data_crc32c = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. + + * Optional. An optional CRC32C checksum of the + * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.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][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]) + * is equal to + * [DecryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value additional_authenticated_data_crc32c = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string|null $var + * @return $this + */ + public function setAdditionalAuthenticatedDataCrc32CUnwrapped($var) + { + $this->writeWrapperValue("additional_authenticated_data_crc32c", $var); + return $this;} + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DecryptResponse.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DecryptResponse.php new file mode 100644 index 000000000000..3910ec3ae0eb --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DecryptResponse.php @@ -0,0 +1,315 @@ +google.cloud.kms.v1.DecryptResponse + */ +class DecryptResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The decrypted data originally supplied in + * [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. + * + * Generated from protobuf field bytes plaintext = 1; + */ + protected $plaintext = ''; + /** + * Integrity verification field. A CRC32C checksum of the returned + * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext]. + * An integrity check of + * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext] + * can be performed by computing the CRC32C checksum of + * [DecryptResponse.plaintext][google.cloud.kms.v1.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][google.cloud.kms.v1.KeyManagementService] is able to + * successfully decrypt the + * [ciphertext][google.cloud.kms.v1.DecryptRequest.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. + * + * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 2; + */ + protected $plaintext_crc32c = null; + /** + * Whether the Decryption was performed using the primary key version. + * + * Generated from protobuf field bool used_primary = 3; + */ + protected $used_primary = false; + /** + * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in + * decryption. + * + * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 4; + */ + protected $protection_level = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $plaintext + * The decrypted data originally supplied in + * [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. + * @type \Google\Protobuf\Int64Value $plaintext_crc32c + * Integrity verification field. A CRC32C checksum of the returned + * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext]. + * An integrity check of + * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext] + * can be performed by computing the CRC32C checksum of + * [DecryptResponse.plaintext][google.cloud.kms.v1.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][google.cloud.kms.v1.KeyManagementService] is able to + * successfully decrypt the + * [ciphertext][google.cloud.kms.v1.DecryptRequest.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. + * @type bool $used_primary + * Whether the Decryption was performed using the primary key version. + * @type int $protection_level + * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in + * decryption. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * The decrypted data originally supplied in + * [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. + * + * Generated from protobuf field bytes plaintext = 1; + * @return string + */ + public function getPlaintext() + { + return $this->plaintext; + } + + /** + * The decrypted data originally supplied in + * [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. + * + * Generated from protobuf field bytes plaintext = 1; + * @param string $var + * @return $this + */ + public function setPlaintext($var) + { + GPBUtil::checkString($var, False); + $this->plaintext = $var; + + return $this; + } + + /** + * Integrity verification field. A CRC32C checksum of the returned + * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext]. + * An integrity check of + * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext] + * can be performed by computing the CRC32C checksum of + * [DecryptResponse.plaintext][google.cloud.kms.v1.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][google.cloud.kms.v1.KeyManagementService] is able to + * successfully decrypt the + * [ciphertext][google.cloud.kms.v1.DecryptRequest.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. + * + * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 2; + * @return \Google\Protobuf\Int64Value|null + */ + public function getPlaintextCrc32C() + { + return $this->plaintext_crc32c; + } + + public function hasPlaintextCrc32C() + { + return isset($this->plaintext_crc32c); + } + + public function clearPlaintextCrc32C() + { + unset($this->plaintext_crc32c); + } + + /** + * Returns the unboxed value from getPlaintextCrc32C() + + * Integrity verification field. A CRC32C checksum of the returned + * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext]. + * An integrity check of + * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext] + * can be performed by computing the CRC32C checksum of + * [DecryptResponse.plaintext][google.cloud.kms.v1.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][google.cloud.kms.v1.KeyManagementService] is able to + * successfully decrypt the + * [ciphertext][google.cloud.kms.v1.DecryptRequest.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. + * + * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 2; + * @return int|string|null + */ + public function getPlaintextCrc32CUnwrapped() + { + return $this->readWrapperValue("plaintext_crc32c"); + } + + /** + * Integrity verification field. A CRC32C checksum of the returned + * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext]. + * An integrity check of + * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext] + * can be performed by computing the CRC32C checksum of + * [DecryptResponse.plaintext][google.cloud.kms.v1.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][google.cloud.kms.v1.KeyManagementService] is able to + * successfully decrypt the + * [ciphertext][google.cloud.kms.v1.DecryptRequest.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. + * + * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 2; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setPlaintextCrc32C($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->plaintext_crc32c = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. + + * Integrity verification field. A CRC32C checksum of the returned + * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext]. + * An integrity check of + * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext] + * can be performed by computing the CRC32C checksum of + * [DecryptResponse.plaintext][google.cloud.kms.v1.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][google.cloud.kms.v1.KeyManagementService] is able to + * successfully decrypt the + * [ciphertext][google.cloud.kms.v1.DecryptRequest.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. + * + * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 2; + * @param int|string|null $var + * @return $this + */ + public function setPlaintextCrc32CUnwrapped($var) + { + $this->writeWrapperValue("plaintext_crc32c", $var); + return $this;} + + /** + * Whether the Decryption was performed using the primary key version. + * + * Generated from protobuf field bool used_primary = 3; + * @return bool + */ + public function getUsedPrimary() + { + return $this->used_primary; + } + + /** + * Whether the Decryption was performed using the primary key version. + * + * Generated from protobuf field bool used_primary = 3; + * @param bool $var + * @return $this + */ + public function setUsedPrimary($var) + { + GPBUtil::checkBool($var); + $this->used_primary = $var; + + return $this; + } + + /** + * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in + * decryption. + * + * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 4; + * @return int + */ + public function getProtectionLevel() + { + return $this->protection_level; + } + + /** + * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in + * decryption. + * + * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 4; + * @param int $var + * @return $this + */ + public function setProtectionLevel($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\ProtectionLevel::class); + $this->protection_level = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DeleteCryptoKeyMetadata.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DeleteCryptoKeyMetadata.php new file mode 100644 index 000000000000..5b0f4dac2960 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DeleteCryptoKeyMetadata.php @@ -0,0 +1,81 @@ +google.cloud.kms.v1.DeleteCryptoKeyMetadata + */ +class DeleteCryptoKeyMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The resource name of the + * [RetiredResource][google.cloud.kms.v1.RetiredResource] created as a result + * of this operation, in the format + * `projects/*/locations/*/retiredResources/*`. + * + * Generated from protobuf field string retired_resource = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $retired_resource = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $retired_resource + * Output only. The resource name of the + * [RetiredResource][google.cloud.kms.v1.RetiredResource] created as a result + * of this operation, in the format + * `projects/*/locations/*/retiredResources/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The resource name of the + * [RetiredResource][google.cloud.kms.v1.RetiredResource] created as a result + * of this operation, in the format + * `projects/*/locations/*/retiredResources/*`. + * + * Generated from protobuf field string retired_resource = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getRetiredResource() + { + return $this->retired_resource; + } + + /** + * Output only. The resource name of the + * [RetiredResource][google.cloud.kms.v1.RetiredResource] created as a result + * of this operation, in the format + * `projects/*/locations/*/retiredResources/*`. + * + * Generated from protobuf field string retired_resource = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setRetiredResource($var) + { + GPBUtil::checkString($var, True); + $this->retired_resource = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DeleteCryptoKeyRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DeleteCryptoKeyRequest.php new file mode 100644 index 000000000000..9de3c796200e --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DeleteCryptoKeyRequest.php @@ -0,0 +1,87 @@ +google.cloud.kms.v1.DeleteCryptoKeyRequest + */ +class DeleteCryptoKeyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The [name][google.cloud.kms.v1.CryptoKey.name] of the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] to delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The [name][google.cloud.kms.v1.CryptoKey.name] of the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] to delete. Please see + * {@see KeyManagementServiceClient::cryptoKeyName()} for help formatting this field. + * + * @return \Google\Cloud\Kms\V1\DeleteCryptoKeyRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The [name][google.cloud.kms.v1.CryptoKey.name] of the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] to delete. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The [name][google.cloud.kms.v1.CryptoKey.name] of the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] to delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The [name][google.cloud.kms.v1.CryptoKey.name] of the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] to delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DeleteCryptoKeyVersionMetadata.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DeleteCryptoKeyVersionMetadata.php new file mode 100644 index 000000000000..9f59dca4fa2a --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DeleteCryptoKeyVersionMetadata.php @@ -0,0 +1,35 @@ +google.cloud.kms.v1.DeleteCryptoKeyVersionMetadata + */ +class DeleteCryptoKeyVersionMetadata extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DeleteCryptoKeyVersionRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DeleteCryptoKeyVersionRequest.php new file mode 100644 index 000000000000..36abc2b6e1ed --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DeleteCryptoKeyVersionRequest.php @@ -0,0 +1,87 @@ +google.cloud.kms.v1.DeleteCryptoKeyVersionRequest + */ +class DeleteCryptoKeyVersionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to delete. Please see + * {@see KeyManagementServiceClient::cryptoKeyVersionName()} for help formatting this field. + * + * @return \Google\Cloud\Kms\V1\DeleteCryptoKeyVersionRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to delete. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DeleteSingleTenantHsmInstanceProposalRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DeleteSingleTenantHsmInstanceProposalRequest.php new file mode 100644 index 000000000000..ffdee6ceb58e --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DeleteSingleTenantHsmInstanceProposalRequest.php @@ -0,0 +1,97 @@ +google.cloud.kms.v1.DeleteSingleTenantHsmInstanceProposalRequest + */ +class DeleteSingleTenantHsmInstanceProposalRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The + * [name][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.name] of the + * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * to delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The + * [name][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.name] of the + * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * to delete. Please see + * {@see HsmManagementClient::singleTenantHsmInstanceProposalName()} for help formatting this field. + * + * @return \Google\Cloud\Kms\V1\DeleteSingleTenantHsmInstanceProposalRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The + * [name][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.name] of the + * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * to delete. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\HsmManagement::initOnce(); + parent::__construct($data); + } + + /** + * Required. The + * [name][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.name] of the + * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * to delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The + * [name][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.name] of the + * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * to delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DestroyCryptoKeyVersionRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DestroyCryptoKeyVersionRequest.php new file mode 100644 index 000000000000..71fbcb00be4b --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DestroyCryptoKeyVersionRequest.php @@ -0,0 +1,87 @@ +google.cloud.kms.v1.DestroyCryptoKeyVersionRequest + */ +class DestroyCryptoKeyVersionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to destroy. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to destroy. Please see + * {@see KeyManagementServiceClient::cryptoKeyVersionName()} for help formatting this field. + * + * @return \Google\Cloud\Kms\V1\DestroyCryptoKeyVersionRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to destroy. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to destroy. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to destroy. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/Digest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/Digest.php new file mode 100644 index 000000000000..90201ffc30de --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/Digest.php @@ -0,0 +1,141 @@ +google.cloud.kms.v1.Digest + */ +class Digest extends \Google\Protobuf\Internal\Message +{ + protected $digest; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $sha256 + * A message digest produced with the SHA-256 algorithm. + * @type string $sha384 + * A message digest produced with the SHA-384 algorithm. + * @type string $sha512 + * A message digest produced with the SHA-512 algorithm. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * A message digest produced with the SHA-256 algorithm. + * + * Generated from protobuf field bytes sha256 = 1; + * @return string + */ + public function getSha256() + { + return $this->readOneof(1); + } + + public function hasSha256() + { + return $this->hasOneof(1); + } + + /** + * A message digest produced with the SHA-256 algorithm. + * + * Generated from protobuf field bytes sha256 = 1; + * @param string $var + * @return $this + */ + public function setSha256($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * A message digest produced with the SHA-384 algorithm. + * + * Generated from protobuf field bytes sha384 = 2; + * @return string + */ + public function getSha384() + { + return $this->readOneof(2); + } + + public function hasSha384() + { + return $this->hasOneof(2); + } + + /** + * A message digest produced with the SHA-384 algorithm. + * + * Generated from protobuf field bytes sha384 = 2; + * @param string $var + * @return $this + */ + public function setSha384($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * A message digest produced with the SHA-512 algorithm. + * + * Generated from protobuf field bytes sha512 = 3; + * @return string + */ + public function getSha512() + { + return $this->readOneof(3); + } + + public function hasSha512() + { + return $this->hasOneof(3); + } + + /** + * A message digest produced with the SHA-512 algorithm. + * + * Generated from protobuf field bytes sha512 = 3; + * @param string $var + * @return $this + */ + public function setSha512($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getDigest() + { + return $this->whichOneof("digest"); + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EkmConfig.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EkmConfig.php new file mode 100644 index 000000000000..6c69ba7f6652 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EkmConfig.php @@ -0,0 +1,123 @@ +google.cloud.kms.v1.EkmConfig + */ +class EkmConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The resource name for the + * [EkmConfig][google.cloud.kms.v1.EkmConfig] in the format + * `projects/*/locations/*/ekmConfig`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Optional. Resource name of the default + * [EkmConnection][google.cloud.kms.v1.EkmConnection]. Setting this field to + * the empty string removes the default. + * + * Generated from protobuf field string default_ekm_connection = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $default_ekm_connection = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The resource name for the + * [EkmConfig][google.cloud.kms.v1.EkmConfig] in the format + * `projects/*/locations/*/ekmConfig`. + * @type string $default_ekm_connection + * Optional. Resource name of the default + * [EkmConnection][google.cloud.kms.v1.EkmConnection]. Setting this field to + * the empty string removes the default. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\EkmService::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The resource name for the + * [EkmConfig][google.cloud.kms.v1.EkmConfig] in the format + * `projects/*/locations/*/ekmConfig`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The resource name for the + * [EkmConfig][google.cloud.kms.v1.EkmConfig] in the format + * `projects/*/locations/*/ekmConfig`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. Resource name of the default + * [EkmConnection][google.cloud.kms.v1.EkmConnection]. Setting this field to + * the empty string removes the default. + * + * Generated from protobuf field string default_ekm_connection = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getDefaultEkmConnection() + { + return $this->default_ekm_connection; + } + + /** + * Optional. Resource name of the default + * [EkmConnection][google.cloud.kms.v1.EkmConnection]. Setting this field to + * the empty string removes the default. + * + * Generated from protobuf field string default_ekm_connection = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setDefaultEkmConnection($var) + { + GPBUtil::checkString($var, True); + $this->default_ekm_connection = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EkmConnection.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EkmConnection.php new file mode 100644 index 000000000000..dd7b3fd2fc92 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EkmConnection.php @@ -0,0 +1,314 @@ +google.cloud.kms.v1.EkmConnection + */ +class EkmConnection extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The resource name for the + * [EkmConnection][google.cloud.kms.v1.EkmConnection] in the format + * `projects/*/locations/*/ekmConnections/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. The time at which the + * [EkmConnection][google.cloud.kms.v1.EkmConnection] was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Optional. A list of + * [ServiceResolvers][google.cloud.kms.v1.EkmConnection.ServiceResolver] where + * the EKM can be reached. There should be one ServiceResolver per EKM + * replica. Currently, only a single + * [ServiceResolver][google.cloud.kms.v1.EkmConnection.ServiceResolver] is + * supported. + * + * Generated from protobuf field repeated .google.cloud.kms.v1.EkmConnection.ServiceResolver service_resolvers = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $service_resolvers; + /** + * Optional. Etag of the currently stored + * [EkmConnection][google.cloud.kms.v1.EkmConnection]. + * + * Generated from protobuf field string etag = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $etag = ''; + /** + * Optional. Describes who can perform control plane operations on the EKM. If + * unset, this defaults to + * [MANUAL][google.cloud.kms.v1.EkmConnection.KeyManagementMode.MANUAL]. + * + * Generated from protobuf field .google.cloud.kms.v1.EkmConnection.KeyManagementMode key_management_mode = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $key_management_mode = 0; + /** + * Optional. Identifies the EKM Crypto Space that this + * [EkmConnection][google.cloud.kms.v1.EkmConnection] maps to. Note: This + * field is required if + * [KeyManagementMode][google.cloud.kms.v1.EkmConnection.KeyManagementMode] is + * [CLOUD_KMS][google.cloud.kms.v1.EkmConnection.KeyManagementMode.CLOUD_KMS]. + * + * Generated from protobuf field string crypto_space_path = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $crypto_space_path = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The resource name for the + * [EkmConnection][google.cloud.kms.v1.EkmConnection] in the format + * `projects/*/locations/*/ekmConnections/*`. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time at which the + * [EkmConnection][google.cloud.kms.v1.EkmConnection] was created. + * @type array<\Google\Cloud\Kms\V1\EkmConnection\ServiceResolver>|\Google\Protobuf\Internal\RepeatedField $service_resolvers + * Optional. A list of + * [ServiceResolvers][google.cloud.kms.v1.EkmConnection.ServiceResolver] where + * the EKM can be reached. There should be one ServiceResolver per EKM + * replica. Currently, only a single + * [ServiceResolver][google.cloud.kms.v1.EkmConnection.ServiceResolver] is + * supported. + * @type string $etag + * Optional. Etag of the currently stored + * [EkmConnection][google.cloud.kms.v1.EkmConnection]. + * @type int $key_management_mode + * Optional. Describes who can perform control plane operations on the EKM. If + * unset, this defaults to + * [MANUAL][google.cloud.kms.v1.EkmConnection.KeyManagementMode.MANUAL]. + * @type string $crypto_space_path + * Optional. Identifies the EKM Crypto Space that this + * [EkmConnection][google.cloud.kms.v1.EkmConnection] maps to. Note: This + * field is required if + * [KeyManagementMode][google.cloud.kms.v1.EkmConnection.KeyManagementMode] is + * [CLOUD_KMS][google.cloud.kms.v1.EkmConnection.KeyManagementMode.CLOUD_KMS]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\EkmService::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The resource name for the + * [EkmConnection][google.cloud.kms.v1.EkmConnection] in the format + * `projects/*/locations/*/ekmConnections/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The resource name for the + * [EkmConnection][google.cloud.kms.v1.EkmConnection] in the format + * `projects/*/locations/*/ekmConnections/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The time at which the + * [EkmConnection][google.cloud.kms.v1.EkmConnection] was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time at which the + * [EkmConnection][google.cloud.kms.v1.EkmConnection] was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Optional. A list of + * [ServiceResolvers][google.cloud.kms.v1.EkmConnection.ServiceResolver] where + * the EKM can be reached. There should be one ServiceResolver per EKM + * replica. Currently, only a single + * [ServiceResolver][google.cloud.kms.v1.EkmConnection.ServiceResolver] is + * supported. + * + * Generated from protobuf field repeated .google.cloud.kms.v1.EkmConnection.ServiceResolver service_resolvers = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getServiceResolvers() + { + return $this->service_resolvers; + } + + /** + * Optional. A list of + * [ServiceResolvers][google.cloud.kms.v1.EkmConnection.ServiceResolver] where + * the EKM can be reached. There should be one ServiceResolver per EKM + * replica. Currently, only a single + * [ServiceResolver][google.cloud.kms.v1.EkmConnection.ServiceResolver] is + * supported. + * + * Generated from protobuf field repeated .google.cloud.kms.v1.EkmConnection.ServiceResolver service_resolvers = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\Kms\V1\EkmConnection\ServiceResolver>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setServiceResolvers($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Kms\V1\EkmConnection\ServiceResolver::class); + $this->service_resolvers = $arr; + + return $this; + } + + /** + * Optional. Etag of the currently stored + * [EkmConnection][google.cloud.kms.v1.EkmConnection]. + * + * Generated from protobuf field string etag = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * Optional. Etag of the currently stored + * [EkmConnection][google.cloud.kms.v1.EkmConnection]. + * + * Generated from protobuf field string etag = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + + /** + * Optional. Describes who can perform control plane operations on the EKM. If + * unset, this defaults to + * [MANUAL][google.cloud.kms.v1.EkmConnection.KeyManagementMode.MANUAL]. + * + * Generated from protobuf field .google.cloud.kms.v1.EkmConnection.KeyManagementMode key_management_mode = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getKeyManagementMode() + { + return $this->key_management_mode; + } + + /** + * Optional. Describes who can perform control plane operations on the EKM. If + * unset, this defaults to + * [MANUAL][google.cloud.kms.v1.EkmConnection.KeyManagementMode.MANUAL]. + * + * Generated from protobuf field .google.cloud.kms.v1.EkmConnection.KeyManagementMode key_management_mode = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setKeyManagementMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\EkmConnection\KeyManagementMode::class); + $this->key_management_mode = $var; + + return $this; + } + + /** + * Optional. Identifies the EKM Crypto Space that this + * [EkmConnection][google.cloud.kms.v1.EkmConnection] maps to. Note: This + * field is required if + * [KeyManagementMode][google.cloud.kms.v1.EkmConnection.KeyManagementMode] is + * [CLOUD_KMS][google.cloud.kms.v1.EkmConnection.KeyManagementMode.CLOUD_KMS]. + * + * Generated from protobuf field string crypto_space_path = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getCryptoSpacePath() + { + return $this->crypto_space_path; + } + + /** + * Optional. Identifies the EKM Crypto Space that this + * [EkmConnection][google.cloud.kms.v1.EkmConnection] maps to. Note: This + * field is required if + * [KeyManagementMode][google.cloud.kms.v1.EkmConnection.KeyManagementMode] is + * [CLOUD_KMS][google.cloud.kms.v1.EkmConnection.KeyManagementMode.CLOUD_KMS]. + * + * Generated from protobuf field string crypto_space_path = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setCryptoSpacePath($var) + { + GPBUtil::checkString($var, True); + $this->crypto_space_path = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EkmConnection/KeyManagementMode.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EkmConnection/KeyManagementMode.php new file mode 100644 index 000000000000..c1afacefc14a --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EkmConnection/KeyManagementMode.php @@ -0,0 +1,91 @@ +google.cloud.kms.v1.EkmConnection.KeyManagementMode + */ +class KeyManagementMode +{ + /** + * Not specified. + * + * Generated from protobuf enum KEY_MANAGEMENT_MODE_UNSPECIFIED = 0; + */ + const KEY_MANAGEMENT_MODE_UNSPECIFIED = 0; + /** + * EKM-side key management operations on + * [CryptoKeys][google.cloud.kms.v1.CryptoKey] created with this + * [EkmConnection][google.cloud.kms.v1.EkmConnection] must be initiated from + * the EKM directly and cannot be performed from Cloud KMS. This means that: + * * When creating a + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] associated with + * this + * [EkmConnection][google.cloud.kms.v1.EkmConnection], the caller must + * supply the key path of pre-existing external key material that will be + * linked to the [CryptoKeyVersion][google.cloud.kms.v1.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. + * + * Generated from protobuf enum MANUAL = 1; + */ + const MANUAL = 1; + /** + * All [CryptoKeys][google.cloud.kms.v1.CryptoKey] created with this + * [EkmConnection][google.cloud.kms.v1.EkmConnection] use EKM-side key + * management operations initiated from Cloud KMS. This means that: + * * When a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] + * associated with this [EkmConnection][google.cloud.kms.v1.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][google.cloud.kms.v1.EkmConnection] can be requested by + * calling + * [DestroyCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.DestroyCryptoKeyVersion]. + * * Automatic rotation of key material is supported. + * + * Generated from protobuf enum CLOUD_KMS = 2; + */ + const CLOUD_KMS = 2; + + private static $valueToName = [ + self::KEY_MANAGEMENT_MODE_UNSPECIFIED => 'KEY_MANAGEMENT_MODE_UNSPECIFIED', + self::MANUAL => 'MANUAL', + self::CLOUD_KMS => 'CLOUD_KMS', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(KeyManagementMode::class, \Google\Cloud\Kms\V1\EkmConnection_KeyManagementMode::class); + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EkmConnection/ServiceResolver.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EkmConnection/ServiceResolver.php new file mode 100644 index 000000000000..37e72fe4b1a8 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EkmConnection/ServiceResolver.php @@ -0,0 +1,206 @@ +google.cloud.kms.v1.EkmConnection.ServiceResolver + */ +class ServiceResolver extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the Service Directory service pointing to + * an EKM replica, in the format + * `projects/*/locations/*/namespaces/*/services/*`. + * + * Generated from protobuf field string service_directory_service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $service_directory_service = ''; + /** + * 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. + * + * Generated from protobuf field string endpoint_filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $endpoint_filter = ''; + /** + * Required. The hostname of the EKM replica used at TLS and HTTP layers. + * + * Generated from protobuf field string hostname = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $hostname = ''; + /** + * Required. A list of leaf server certificates used to authenticate HTTPS + * connections to the EKM replica. Currently, a maximum of 10 + * [Certificate][google.cloud.kms.v1.Certificate] is supported. + * + * Generated from protobuf field repeated .google.cloud.kms.v1.Certificate server_certificates = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + private $server_certificates; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $service_directory_service + * Required. The resource name of the Service Directory service pointing to + * an EKM replica, in the format + * `projects/*/locations/*/namespaces/*/services/*`. + * @type string $endpoint_filter + * 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. + * @type string $hostname + * Required. The hostname of the EKM replica used at TLS and HTTP layers. + * @type array<\Google\Cloud\Kms\V1\Certificate>|\Google\Protobuf\Internal\RepeatedField $server_certificates + * Required. A list of leaf server certificates used to authenticate HTTPS + * connections to the EKM replica. Currently, a maximum of 10 + * [Certificate][google.cloud.kms.v1.Certificate] is supported. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\EkmService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the Service Directory service pointing to + * an EKM replica, in the format + * `projects/*/locations/*/namespaces/*/services/*`. + * + * Generated from protobuf field string service_directory_service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getServiceDirectoryService() + { + return $this->service_directory_service; + } + + /** + * Required. The resource name of the Service Directory service pointing to + * an EKM replica, in the format + * `projects/*/locations/*/namespaces/*/services/*`. + * + * Generated from protobuf field string service_directory_service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setServiceDirectoryService($var) + { + GPBUtil::checkString($var, True); + $this->service_directory_service = $var; + + return $this; + } + + /** + * 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. + * + * Generated from protobuf field string endpoint_filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getEndpointFilter() + { + return $this->endpoint_filter; + } + + /** + * 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. + * + * Generated from protobuf field string endpoint_filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setEndpointFilter($var) + { + GPBUtil::checkString($var, True); + $this->endpoint_filter = $var; + + return $this; + } + + /** + * Required. The hostname of the EKM replica used at TLS and HTTP layers. + * + * Generated from protobuf field string hostname = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getHostname() + { + return $this->hostname; + } + + /** + * Required. The hostname of the EKM replica used at TLS and HTTP layers. + * + * Generated from protobuf field string hostname = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setHostname($var) + { + GPBUtil::checkString($var, True); + $this->hostname = $var; + + return $this; + } + + /** + * Required. A list of leaf server certificates used to authenticate HTTPS + * connections to the EKM replica. Currently, a maximum of 10 + * [Certificate][google.cloud.kms.v1.Certificate] is supported. + * + * Generated from protobuf field repeated .google.cloud.kms.v1.Certificate server_certificates = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getServerCertificates() + { + return $this->server_certificates; + } + + /** + * Required. A list of leaf server certificates used to authenticate HTTPS + * connections to the EKM replica. Currently, a maximum of 10 + * [Certificate][google.cloud.kms.v1.Certificate] is supported. + * + * Generated from protobuf field repeated .google.cloud.kms.v1.Certificate server_certificates = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\Kms\V1\Certificate>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setServerCertificates($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Kms\V1\Certificate::class); + $this->server_certificates = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ServiceResolver::class, \Google\Cloud\Kms\V1\EkmConnection_ServiceResolver::class); + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EncryptRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EncryptRequest.php new file mode 100644 index 000000000000..54a6c404dbc8 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EncryptRequest.php @@ -0,0 +1,625 @@ +google.cloud.kms.v1.EncryptRequest + */ +class EncryptRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] or + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for + * encryption. + * If a [CryptoKey][google.cloud.kms.v1.CryptoKey] is specified, the server + * will use its [primary version][google.cloud.kms.v1.CryptoKey.primary]. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. The data to encrypt. Must be no larger than 64KiB. + * The maximum size depends on the key version's + * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]. + * For [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE], + * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL], and + * [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC] keys, the + * plaintext must be no larger than 64KiB. For + * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] keys, the combined length of + * the plaintext and additional_authenticated_data fields must be no larger + * than 8KiB. + * + * Generated from protobuf field bytes plaintext = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $plaintext = ''; + /** + * Optional. Optional data that, if specified, must also be provided during + * decryption through + * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]. + * The maximum size depends on the key version's + * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]. + * For [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE], + * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL], and + * [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC] keys the + * AAD must be no larger than 64KiB. For + * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] keys, the combined length of + * the plaintext and additional_authenticated_data fields must be no larger + * than 8KiB. + * + * Generated from protobuf field bytes additional_authenticated_data = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $additional_authenticated_data = ''; + /** + * Optional. An optional CRC32C checksum of the + * [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]) + * is equal to + * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $plaintext_crc32c = null; + /** + * Optional. An optional CRC32C checksum of the + * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.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][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]) + * is equal to + * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value additional_authenticated_data_crc32c = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $additional_authenticated_data_crc32c = null; + + /** + * @param string $name Required. The resource name of the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] or + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for + * encryption. + * + * If a [CryptoKey][google.cloud.kms.v1.CryptoKey] is specified, the server + * will use its [primary version][google.cloud.kms.v1.CryptoKey.primary]. + * @param string $plaintext Required. The data to encrypt. Must be no larger than 64KiB. + * + * The maximum size depends on the key version's + * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]. + * For [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE], + * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL], and + * [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC] keys, the + * plaintext must be no larger than 64KiB. For + * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] keys, the combined length of + * the plaintext and additional_authenticated_data fields must be no larger + * than 8KiB. + * + * @return \Google\Cloud\Kms\V1\EncryptRequest + * + * @experimental + */ + public static function build(string $name, string $plaintext): self + { + return (new self()) + ->setName($name) + ->setPlaintext($plaintext); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] or + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for + * encryption. + * If a [CryptoKey][google.cloud.kms.v1.CryptoKey] is specified, the server + * will use its [primary version][google.cloud.kms.v1.CryptoKey.primary]. + * @type string $plaintext + * Required. The data to encrypt. Must be no larger than 64KiB. + * The maximum size depends on the key version's + * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]. + * For [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE], + * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL], and + * [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC] keys, the + * plaintext must be no larger than 64KiB. For + * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] keys, the combined length of + * the plaintext and additional_authenticated_data fields must be no larger + * than 8KiB. + * @type string $additional_authenticated_data + * Optional. Optional data that, if specified, must also be provided during + * decryption through + * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]. + * The maximum size depends on the key version's + * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]. + * For [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE], + * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL], and + * [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC] keys the + * AAD must be no larger than 64KiB. For + * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] keys, the combined length of + * the plaintext and additional_authenticated_data fields must be no larger + * than 8KiB. + * @type \Google\Protobuf\Int64Value $plaintext_crc32c + * Optional. An optional CRC32C checksum of the + * [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]) + * is equal to + * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.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. + * @type \Google\Protobuf\Int64Value $additional_authenticated_data_crc32c + * Optional. An optional CRC32C checksum of the + * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.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][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]) + * is equal to + * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.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. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] or + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for + * encryption. + * If a [CryptoKey][google.cloud.kms.v1.CryptoKey] is specified, the server + * will use its [primary version][google.cloud.kms.v1.CryptoKey.primary]. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] or + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for + * encryption. + * If a [CryptoKey][google.cloud.kms.v1.CryptoKey] is specified, the server + * will use its [primary version][google.cloud.kms.v1.CryptoKey.primary]. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The data to encrypt. Must be no larger than 64KiB. + * The maximum size depends on the key version's + * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]. + * For [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE], + * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL], and + * [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC] keys, the + * plaintext must be no larger than 64KiB. For + * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] keys, the combined length of + * the plaintext and additional_authenticated_data fields must be no larger + * than 8KiB. + * + * Generated from protobuf field bytes plaintext = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPlaintext() + { + return $this->plaintext; + } + + /** + * Required. The data to encrypt. Must be no larger than 64KiB. + * The maximum size depends on the key version's + * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]. + * For [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE], + * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL], and + * [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC] keys, the + * plaintext must be no larger than 64KiB. For + * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] keys, the combined length of + * the plaintext and additional_authenticated_data fields must be no larger + * than 8KiB. + * + * Generated from protobuf field bytes plaintext = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPlaintext($var) + { + GPBUtil::checkString($var, False); + $this->plaintext = $var; + + return $this; + } + + /** + * Optional. Optional data that, if specified, must also be provided during + * decryption through + * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]. + * The maximum size depends on the key version's + * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]. + * For [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE], + * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL], and + * [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC] keys the + * AAD must be no larger than 64KiB. For + * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] keys, the combined length of + * the plaintext and additional_authenticated_data fields must be no larger + * than 8KiB. + * + * Generated from protobuf field bytes additional_authenticated_data = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getAdditionalAuthenticatedData() + { + return $this->additional_authenticated_data; + } + + /** + * Optional. Optional data that, if specified, must also be provided during + * decryption through + * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]. + * The maximum size depends on the key version's + * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]. + * For [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE], + * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL], and + * [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC] keys the + * AAD must be no larger than 64KiB. For + * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] keys, the combined length of + * the plaintext and additional_authenticated_data fields must be no larger + * than 8KiB. + * + * Generated from protobuf field bytes additional_authenticated_data = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setAdditionalAuthenticatedData($var) + { + GPBUtil::checkString($var, False); + $this->additional_authenticated_data = $var; + + return $this; + } + + /** + * Optional. An optional CRC32C checksum of the + * [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]) + * is equal to + * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Int64Value|null + */ + public function getPlaintextCrc32C() + { + return $this->plaintext_crc32c; + } + + public function hasPlaintextCrc32C() + { + return isset($this->plaintext_crc32c); + } + + public function clearPlaintextCrc32C() + { + unset($this->plaintext_crc32c); + } + + /** + * Returns the unboxed value from getPlaintextCrc32C() + + * Optional. An optional CRC32C checksum of the + * [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]) + * is equal to + * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string|null + */ + public function getPlaintextCrc32CUnwrapped() + { + return $this->readWrapperValue("plaintext_crc32c"); + } + + /** + * Optional. An optional CRC32C checksum of the + * [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]) + * is equal to + * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setPlaintextCrc32C($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->plaintext_crc32c = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. + + * Optional. An optional CRC32C checksum of the + * [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]) + * is equal to + * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string|null $var + * @return $this + */ + public function setPlaintextCrc32CUnwrapped($var) + { + $this->writeWrapperValue("plaintext_crc32c", $var); + return $this;} + + /** + * Optional. An optional CRC32C checksum of the + * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.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][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]) + * is equal to + * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value additional_authenticated_data_crc32c = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Int64Value|null + */ + public function getAdditionalAuthenticatedDataCrc32C() + { + return $this->additional_authenticated_data_crc32c; + } + + public function hasAdditionalAuthenticatedDataCrc32C() + { + return isset($this->additional_authenticated_data_crc32c); + } + + public function clearAdditionalAuthenticatedDataCrc32C() + { + unset($this->additional_authenticated_data_crc32c); + } + + /** + * Returns the unboxed value from getAdditionalAuthenticatedDataCrc32C() + + * Optional. An optional CRC32C checksum of the + * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.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][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]) + * is equal to + * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value additional_authenticated_data_crc32c = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string|null + */ + public function getAdditionalAuthenticatedDataCrc32CUnwrapped() + { + return $this->readWrapperValue("additional_authenticated_data_crc32c"); + } + + /** + * Optional. An optional CRC32C checksum of the + * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.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][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]) + * is equal to + * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value additional_authenticated_data_crc32c = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setAdditionalAuthenticatedDataCrc32C($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->additional_authenticated_data_crc32c = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. + + * Optional. An optional CRC32C checksum of the + * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.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][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]) + * is equal to + * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value additional_authenticated_data_crc32c = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string|null $var + * @return $this + */ + public function setAdditionalAuthenticatedDataCrc32CUnwrapped($var) + { + $this->writeWrapperValue("additional_authenticated_data_crc32c", $var); + return $this;} + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EncryptResponse.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EncryptResponse.php new file mode 100644 index 000000000000..7a18418344b6 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EncryptResponse.php @@ -0,0 +1,471 @@ +google.cloud.kms.v1.EncryptResponse + */ +class EncryptResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in + * encryption. Check this field to verify that the intended resource was used + * for encryption. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The encrypted data. + * + * Generated from protobuf field bytes ciphertext = 2; + */ + protected $ciphertext = ''; + /** + * Integrity verification field. A CRC32C checksum of the returned + * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext]. + * An integrity check of + * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext] + * can be performed by computing the CRC32C checksum of + * [EncryptResponse.ciphertext][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 4; + */ + protected $ciphertext_crc32c = null; + /** + * Integrity verification field. A flag indicating whether + * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of the + * [plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. A false value of + * this field indicates either that + * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * + * Generated from protobuf field bool verified_plaintext_crc32c = 5; + */ + protected $verified_plaintext_crc32c = false; + /** + * Integrity verification field. A flag indicating whether + * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of the + * [AAD][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. A + * false value of this field indicates either that + * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * + * Generated from protobuf field bool verified_additional_authenticated_data_crc32c = 6; + */ + protected $verified_additional_authenticated_data_crc32c = false; + /** + * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in + * encryption. + * + * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 7; + */ + protected $protection_level = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in + * encryption. Check this field to verify that the intended resource was used + * for encryption. + * @type string $ciphertext + * The encrypted data. + * @type \Google\Protobuf\Int64Value $ciphertext_crc32c + * Integrity verification field. A CRC32C checksum of the returned + * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext]. + * An integrity check of + * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext] + * can be performed by computing the CRC32C checksum of + * [EncryptResponse.ciphertext][google.cloud.kms.v1.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. + * @type bool $verified_plaintext_crc32c + * Integrity verification field. A flag indicating whether + * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of the + * [plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. A false value of + * this field indicates either that + * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * @type bool $verified_additional_authenticated_data_crc32c + * Integrity verification field. A flag indicating whether + * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of the + * [AAD][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. A + * false value of this field indicates either that + * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * @type int $protection_level + * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in + * encryption. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in + * encryption. Check this field to verify that the intended resource was used + * for encryption. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in + * encryption. Check this field to verify that the intended resource was used + * for encryption. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The encrypted data. + * + * Generated from protobuf field bytes ciphertext = 2; + * @return string + */ + public function getCiphertext() + { + return $this->ciphertext; + } + + /** + * The encrypted data. + * + * Generated from protobuf field bytes ciphertext = 2; + * @param string $var + * @return $this + */ + public function setCiphertext($var) + { + GPBUtil::checkString($var, False); + $this->ciphertext = $var; + + return $this; + } + + /** + * Integrity verification field. A CRC32C checksum of the returned + * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext]. + * An integrity check of + * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext] + * can be performed by computing the CRC32C checksum of + * [EncryptResponse.ciphertext][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 4; + * @return \Google\Protobuf\Int64Value|null + */ + public function getCiphertextCrc32C() + { + return $this->ciphertext_crc32c; + } + + public function hasCiphertextCrc32C() + { + return isset($this->ciphertext_crc32c); + } + + public function clearCiphertextCrc32C() + { + unset($this->ciphertext_crc32c); + } + + /** + * Returns the unboxed value from getCiphertextCrc32C() + + * Integrity verification field. A CRC32C checksum of the returned + * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext]. + * An integrity check of + * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext] + * can be performed by computing the CRC32C checksum of + * [EncryptResponse.ciphertext][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 4; + * @return int|string|null + */ + public function getCiphertextCrc32CUnwrapped() + { + return $this->readWrapperValue("ciphertext_crc32c"); + } + + /** + * Integrity verification field. A CRC32C checksum of the returned + * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext]. + * An integrity check of + * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext] + * can be performed by computing the CRC32C checksum of + * [EncryptResponse.ciphertext][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 4; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setCiphertextCrc32C($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->ciphertext_crc32c = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. + + * Integrity verification field. A CRC32C checksum of the returned + * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext]. + * An integrity check of + * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext] + * can be performed by computing the CRC32C checksum of + * [EncryptResponse.ciphertext][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 4; + * @param int|string|null $var + * @return $this + */ + public function setCiphertextCrc32CUnwrapped($var) + { + $this->writeWrapperValue("ciphertext_crc32c", $var); + return $this;} + + /** + * Integrity verification field. A flag indicating whether + * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of the + * [plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. A false value of + * this field indicates either that + * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * + * Generated from protobuf field bool verified_plaintext_crc32c = 5; + * @return bool + */ + public function getVerifiedPlaintextCrc32C() + { + return $this->verified_plaintext_crc32c; + } + + /** + * Integrity verification field. A flag indicating whether + * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of the + * [plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. A false value of + * this field indicates either that + * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * + * Generated from protobuf field bool verified_plaintext_crc32c = 5; + * @param bool $var + * @return $this + */ + public function setVerifiedPlaintextCrc32C($var) + { + GPBUtil::checkBool($var); + $this->verified_plaintext_crc32c = $var; + + return $this; + } + + /** + * Integrity verification field. A flag indicating whether + * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of the + * [AAD][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. A + * false value of this field indicates either that + * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * + * Generated from protobuf field bool verified_additional_authenticated_data_crc32c = 6; + * @return bool + */ + public function getVerifiedAdditionalAuthenticatedDataCrc32C() + { + return $this->verified_additional_authenticated_data_crc32c; + } + + /** + * Integrity verification field. A flag indicating whether + * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of the + * [AAD][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. A + * false value of this field indicates either that + * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * + * Generated from protobuf field bool verified_additional_authenticated_data_crc32c = 6; + * @param bool $var + * @return $this + */ + public function setVerifiedAdditionalAuthenticatedDataCrc32C($var) + { + GPBUtil::checkBool($var); + $this->verified_additional_authenticated_data_crc32c = $var; + + return $this; + } + + /** + * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in + * encryption. + * + * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 7; + * @return int + */ + public function getProtectionLevel() + { + return $this->protection_level; + } + + /** + * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in + * encryption. + * + * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 7; + * @param int $var + * @return $this + */ + public function setProtectionLevel($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\ProtectionLevel::class); + $this->protection_level = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ExecuteSingleTenantHsmInstanceProposalMetadata.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ExecuteSingleTenantHsmInstanceProposalMetadata.php new file mode 100644 index 000000000000..79ed45f4b228 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ExecuteSingleTenantHsmInstanceProposalMetadata.php @@ -0,0 +1,35 @@ +google.cloud.kms.v1.ExecuteSingleTenantHsmInstanceProposalMetadata + */ +class ExecuteSingleTenantHsmInstanceProposalMetadata extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\HsmManagement::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ExecuteSingleTenantHsmInstanceProposalRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ExecuteSingleTenantHsmInstanceProposalRequest.php new file mode 100644 index 000000000000..8d13cfd50639 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ExecuteSingleTenantHsmInstanceProposalRequest.php @@ -0,0 +1,97 @@ +google.cloud.kms.v1.ExecuteSingleTenantHsmInstanceProposalRequest + */ +class ExecuteSingleTenantHsmInstanceProposalRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The + * [name][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.name] of the + * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * to execute. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The + * [name][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.name] of the + * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * to execute. Please see + * {@see HsmManagementClient::singleTenantHsmInstanceProposalName()} for help formatting this field. + * + * @return \Google\Cloud\Kms\V1\ExecuteSingleTenantHsmInstanceProposalRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The + * [name][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.name] of the + * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * to execute. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\HsmManagement::initOnce(); + parent::__construct($data); + } + + /** + * Required. The + * [name][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.name] of the + * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * to execute. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The + * [name][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.name] of the + * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * to execute. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ExecuteSingleTenantHsmInstanceProposalResponse.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ExecuteSingleTenantHsmInstanceProposalResponse.php new file mode 100644 index 000000000000..c4103bf4d99b --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ExecuteSingleTenantHsmInstanceProposalResponse.php @@ -0,0 +1,34 @@ +google.cloud.kms.v1.ExecuteSingleTenantHsmInstanceProposalResponse + */ +class ExecuteSingleTenantHsmInstanceProposalResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\HsmManagement::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ExternalProtectionLevelOptions.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ExternalProtectionLevelOptions.php new file mode 100644 index 000000000000..9a8fb7d4fabb --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ExternalProtectionLevelOptions.php @@ -0,0 +1,122 @@ +google.cloud.kms.v1.ExternalProtectionLevelOptions + */ +class ExternalProtectionLevelOptions extends \Google\Protobuf\Internal\Message +{ + /** + * The URI for an external resource that this + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] represents. + * + * Generated from protobuf field string external_key_uri = 1; + */ + protected $external_key_uri = ''; + /** + * The path to the external key material on the EKM when using + * [EkmConnection][google.cloud.kms.v1.EkmConnection] e.g., "v0/my/key". Set + * this field instead of external_key_uri when using an + * [EkmConnection][google.cloud.kms.v1.EkmConnection]. + * + * Generated from protobuf field string ekm_connection_key_path = 2; + */ + protected $ekm_connection_key_path = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $external_key_uri + * The URI for an external resource that this + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] represents. + * @type string $ekm_connection_key_path + * The path to the external key material on the EKM when using + * [EkmConnection][google.cloud.kms.v1.EkmConnection] e.g., "v0/my/key". Set + * this field instead of external_key_uri when using an + * [EkmConnection][google.cloud.kms.v1.EkmConnection]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The URI for an external resource that this + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] represents. + * + * Generated from protobuf field string external_key_uri = 1; + * @return string + */ + public function getExternalKeyUri() + { + return $this->external_key_uri; + } + + /** + * The URI for an external resource that this + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] represents. + * + * Generated from protobuf field string external_key_uri = 1; + * @param string $var + * @return $this + */ + public function setExternalKeyUri($var) + { + GPBUtil::checkString($var, True); + $this->external_key_uri = $var; + + return $this; + } + + /** + * The path to the external key material on the EKM when using + * [EkmConnection][google.cloud.kms.v1.EkmConnection] e.g., "v0/my/key". Set + * this field instead of external_key_uri when using an + * [EkmConnection][google.cloud.kms.v1.EkmConnection]. + * + * Generated from protobuf field string ekm_connection_key_path = 2; + * @return string + */ + public function getEkmConnectionKeyPath() + { + return $this->ekm_connection_key_path; + } + + /** + * The path to the external key material on the EKM when using + * [EkmConnection][google.cloud.kms.v1.EkmConnection] e.g., "v0/my/key". Set + * this field instead of external_key_uri when using an + * [EkmConnection][google.cloud.kms.v1.EkmConnection]. + * + * Generated from protobuf field string ekm_connection_key_path = 2; + * @param string $var + * @return $this + */ + public function setEkmConnectionKeyPath($var) + { + GPBUtil::checkString($var, True); + $this->ekm_connection_key_path = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GenerateRandomBytesRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GenerateRandomBytesRequest.php new file mode 100644 index 000000000000..695206324a5a --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GenerateRandomBytesRequest.php @@ -0,0 +1,179 @@ +google.cloud.kms.v1.GenerateRandomBytesRequest + */ +class GenerateRandomBytesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The project-specific location in which to generate random bytes. + * For example, "projects/my-project/locations/us-central1". + * + * Generated from protobuf field string location = 1; + */ + protected $location = ''; + /** + * The length in bytes of the amount of randomness to retrieve. Minimum 8 + * bytes, maximum 1024 bytes. + * + * Generated from protobuf field int32 length_bytes = 2; + */ + protected $length_bytes = 0; + /** + * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] to use when + * generating the random data. Currently, only + * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] protection level is + * supported. + * + * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 3; + */ + protected $protection_level = 0; + + /** + * @param string $location The project-specific location in which to generate random bytes. + * For example, "projects/my-project/locations/us-central1". + * @param int $lengthBytes The length in bytes of the amount of randomness to retrieve. Minimum 8 + * bytes, maximum 1024 bytes. + * @param int $protectionLevel The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] to use when + * generating the random data. Currently, only + * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] protection level is + * supported. + * For allowed values, use constants defined on {@see \Google\Cloud\Kms\V1\ProtectionLevel} + * + * @return \Google\Cloud\Kms\V1\GenerateRandomBytesRequest + * + * @experimental + */ + public static function build(string $location, int $lengthBytes, int $protectionLevel): self + { + return (new self()) + ->setLocation($location) + ->setLengthBytes($lengthBytes) + ->setProtectionLevel($protectionLevel); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $location + * The project-specific location in which to generate random bytes. + * For example, "projects/my-project/locations/us-central1". + * @type int $length_bytes + * The length in bytes of the amount of randomness to retrieve. Minimum 8 + * bytes, maximum 1024 bytes. + * @type int $protection_level + * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] to use when + * generating the random data. Currently, only + * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] protection level is + * supported. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * The project-specific location in which to generate random bytes. + * For example, "projects/my-project/locations/us-central1". + * + * Generated from protobuf field string location = 1; + * @return string + */ + public function getLocation() + { + return $this->location; + } + + /** + * The project-specific location in which to generate random bytes. + * For example, "projects/my-project/locations/us-central1". + * + * Generated from protobuf field string location = 1; + * @param string $var + * @return $this + */ + public function setLocation($var) + { + GPBUtil::checkString($var, True); + $this->location = $var; + + return $this; + } + + /** + * The length in bytes of the amount of randomness to retrieve. Minimum 8 + * bytes, maximum 1024 bytes. + * + * Generated from protobuf field int32 length_bytes = 2; + * @return int + */ + public function getLengthBytes() + { + return $this->length_bytes; + } + + /** + * The length in bytes of the amount of randomness to retrieve. Minimum 8 + * bytes, maximum 1024 bytes. + * + * Generated from protobuf field int32 length_bytes = 2; + * @param int $var + * @return $this + */ + public function setLengthBytes($var) + { + GPBUtil::checkInt32($var); + $this->length_bytes = $var; + + return $this; + } + + /** + * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] to use when + * generating the random data. Currently, only + * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] protection level is + * supported. + * + * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 3; + * @return int + */ + public function getProtectionLevel() + { + return $this->protection_level; + } + + /** + * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] to use when + * generating the random data. Currently, only + * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] protection level is + * supported. + * + * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 3; + * @param int $var + * @return $this + */ + public function setProtectionLevel($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\ProtectionLevel::class); + $this->protection_level = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GenerateRandomBytesResponse.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GenerateRandomBytesResponse.php new file mode 100644 index 000000000000..4cf4401fde68 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GenerateRandomBytesResponse.php @@ -0,0 +1,211 @@ +google.cloud.kms.v1.GenerateRandomBytesResponse + */ +class GenerateRandomBytesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The generated data. + * + * Generated from protobuf field bytes data = 1; + */ + protected $data = ''; + /** + * Integrity verification field. A CRC32C checksum of the returned + * [GenerateRandomBytesResponse.data][google.cloud.kms.v1.GenerateRandomBytesResponse.data]. + * An integrity check of + * [GenerateRandomBytesResponse.data][google.cloud.kms.v1.GenerateRandomBytesResponse.data] + * can be performed by computing the CRC32C checksum of + * [GenerateRandomBytesResponse.data][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 3; + */ + protected $data_crc32c = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $data + * The generated data. + * @type \Google\Protobuf\Int64Value $data_crc32c + * Integrity verification field. A CRC32C checksum of the returned + * [GenerateRandomBytesResponse.data][google.cloud.kms.v1.GenerateRandomBytesResponse.data]. + * An integrity check of + * [GenerateRandomBytesResponse.data][google.cloud.kms.v1.GenerateRandomBytesResponse.data] + * can be performed by computing the CRC32C checksum of + * [GenerateRandomBytesResponse.data][google.cloud.kms.v1.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. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * The generated data. + * + * Generated from protobuf field bytes data = 1; + * @return string + */ + public function getData() + { + return $this->data; + } + + /** + * The generated data. + * + * Generated from protobuf field bytes data = 1; + * @param string $var + * @return $this + */ + public function setData($var) + { + GPBUtil::checkString($var, False); + $this->data = $var; + + return $this; + } + + /** + * Integrity verification field. A CRC32C checksum of the returned + * [GenerateRandomBytesResponse.data][google.cloud.kms.v1.GenerateRandomBytesResponse.data]. + * An integrity check of + * [GenerateRandomBytesResponse.data][google.cloud.kms.v1.GenerateRandomBytesResponse.data] + * can be performed by computing the CRC32C checksum of + * [GenerateRandomBytesResponse.data][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 3; + * @return \Google\Protobuf\Int64Value|null + */ + public function getDataCrc32C() + { + return $this->data_crc32c; + } + + public function hasDataCrc32C() + { + return isset($this->data_crc32c); + } + + public function clearDataCrc32C() + { + unset($this->data_crc32c); + } + + /** + * Returns the unboxed value from getDataCrc32C() + + * Integrity verification field. A CRC32C checksum of the returned + * [GenerateRandomBytesResponse.data][google.cloud.kms.v1.GenerateRandomBytesResponse.data]. + * An integrity check of + * [GenerateRandomBytesResponse.data][google.cloud.kms.v1.GenerateRandomBytesResponse.data] + * can be performed by computing the CRC32C checksum of + * [GenerateRandomBytesResponse.data][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 3; + * @return int|string|null + */ + public function getDataCrc32CUnwrapped() + { + return $this->readWrapperValue("data_crc32c"); + } + + /** + * Integrity verification field. A CRC32C checksum of the returned + * [GenerateRandomBytesResponse.data][google.cloud.kms.v1.GenerateRandomBytesResponse.data]. + * An integrity check of + * [GenerateRandomBytesResponse.data][google.cloud.kms.v1.GenerateRandomBytesResponse.data] + * can be performed by computing the CRC32C checksum of + * [GenerateRandomBytesResponse.data][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 3; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setDataCrc32C($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->data_crc32c = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. + + * Integrity verification field. A CRC32C checksum of the returned + * [GenerateRandomBytesResponse.data][google.cloud.kms.v1.GenerateRandomBytesResponse.data]. + * An integrity check of + * [GenerateRandomBytesResponse.data][google.cloud.kms.v1.GenerateRandomBytesResponse.data] + * can be performed by computing the CRC32C checksum of + * [GenerateRandomBytesResponse.data][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 3; + * @param int|string|null $var + * @return $this + */ + public function setDataCrc32CUnwrapped($var) + { + $this->writeWrapperValue("data_crc32c", $var); + return $this;} + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetAutokeyConfigRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetAutokeyConfigRequest.php new file mode 100644 index 000000000000..7995e8fa2885 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetAutokeyConfigRequest.php @@ -0,0 +1,92 @@ +google.cloud.kms.v1.GetAutokeyConfigRequest + */ +class GetAutokeyConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig] + * resource, e.g. `folders/{FOLDER_NUMBER}/autokeyConfig` or + * `projects/{PROJECT_NUMBER}/autokeyConfig`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of the [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig] + * resource, e.g. `folders/{FOLDER_NUMBER}/autokeyConfig` or + * `projects/{PROJECT_NUMBER}/autokeyConfig`. Please see + * {@see AutokeyAdminClient::autokeyConfigName()} for help formatting this field. + * + * @return \Google\Cloud\Kms\V1\GetAutokeyConfigRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig] + * resource, e.g. `folders/{FOLDER_NUMBER}/autokeyConfig` or + * `projects/{PROJECT_NUMBER}/autokeyConfig`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\AutokeyAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig] + * resource, e.g. `folders/{FOLDER_NUMBER}/autokeyConfig` or + * `projects/{PROJECT_NUMBER}/autokeyConfig`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig] + * resource, e.g. `folders/{FOLDER_NUMBER}/autokeyConfig` or + * `projects/{PROJECT_NUMBER}/autokeyConfig`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetCryptoKeyRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetCryptoKeyRequest.php new file mode 100644 index 000000000000..a022fcb8a83f --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetCryptoKeyRequest.php @@ -0,0 +1,87 @@ +google.cloud.kms.v1.GetCryptoKeyRequest + */ +class GetCryptoKeyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The [name][google.cloud.kms.v1.CryptoKey.name] of the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] to get. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The [name][google.cloud.kms.v1.CryptoKey.name] of the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] to get. Please see + * {@see KeyManagementServiceClient::cryptoKeyName()} for help formatting this field. + * + * @return \Google\Cloud\Kms\V1\GetCryptoKeyRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The [name][google.cloud.kms.v1.CryptoKey.name] of the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] to get. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The [name][google.cloud.kms.v1.CryptoKey.name] of the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] to get. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The [name][google.cloud.kms.v1.CryptoKey.name] of the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] to get. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetCryptoKeyVersionRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetCryptoKeyVersionRequest.php new file mode 100644 index 000000000000..1a7b994be0d8 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetCryptoKeyVersionRequest.php @@ -0,0 +1,87 @@ +google.cloud.kms.v1.GetCryptoKeyVersionRequest + */ +class GetCryptoKeyVersionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to get. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to get. Please see + * {@see KeyManagementServiceClient::cryptoKeyVersionName()} for help formatting this field. + * + * @return \Google\Cloud\Kms\V1\GetCryptoKeyVersionRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to get. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to get. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to get. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetEkmConfigRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetEkmConfigRequest.php new file mode 100644 index 000000000000..d51d9230caee --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetEkmConfigRequest.php @@ -0,0 +1,87 @@ +google.cloud.kms.v1.GetEkmConfigRequest + */ +class GetEkmConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The [name][google.cloud.kms.v1.EkmConfig.name] of the + * [EkmConfig][google.cloud.kms.v1.EkmConfig] to get. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The [name][google.cloud.kms.v1.EkmConfig.name] of the + * [EkmConfig][google.cloud.kms.v1.EkmConfig] to get. Please see + * {@see EkmServiceClient::ekmConfigName()} for help formatting this field. + * + * @return \Google\Cloud\Kms\V1\GetEkmConfigRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The [name][google.cloud.kms.v1.EkmConfig.name] of the + * [EkmConfig][google.cloud.kms.v1.EkmConfig] to get. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\EkmService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The [name][google.cloud.kms.v1.EkmConfig.name] of the + * [EkmConfig][google.cloud.kms.v1.EkmConfig] to get. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The [name][google.cloud.kms.v1.EkmConfig.name] of the + * [EkmConfig][google.cloud.kms.v1.EkmConfig] to get. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetEkmConnectionRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetEkmConnectionRequest.php new file mode 100644 index 000000000000..8a5e1c04323e --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetEkmConnectionRequest.php @@ -0,0 +1,87 @@ +google.cloud.kms.v1.GetEkmConnectionRequest + */ +class GetEkmConnectionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The [name][google.cloud.kms.v1.EkmConnection.name] of the + * [EkmConnection][google.cloud.kms.v1.EkmConnection] to get. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The [name][google.cloud.kms.v1.EkmConnection.name] of the + * [EkmConnection][google.cloud.kms.v1.EkmConnection] to get. Please see + * {@see EkmServiceClient::ekmConnectionName()} for help formatting this field. + * + * @return \Google\Cloud\Kms\V1\GetEkmConnectionRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The [name][google.cloud.kms.v1.EkmConnection.name] of the + * [EkmConnection][google.cloud.kms.v1.EkmConnection] to get. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\EkmService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The [name][google.cloud.kms.v1.EkmConnection.name] of the + * [EkmConnection][google.cloud.kms.v1.EkmConnection] to get. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The [name][google.cloud.kms.v1.EkmConnection.name] of the + * [EkmConnection][google.cloud.kms.v1.EkmConnection] to get. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetImportJobRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetImportJobRequest.php new file mode 100644 index 000000000000..a8f2614ffbbd --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetImportJobRequest.php @@ -0,0 +1,87 @@ +google.cloud.kms.v1.GetImportJobRequest + */ +class GetImportJobRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The [name][google.cloud.kms.v1.ImportJob.name] of the + * [ImportJob][google.cloud.kms.v1.ImportJob] to get. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The [name][google.cloud.kms.v1.ImportJob.name] of the + * [ImportJob][google.cloud.kms.v1.ImportJob] to get. Please see + * {@see KeyManagementServiceClient::importJobName()} for help formatting this field. + * + * @return \Google\Cloud\Kms\V1\GetImportJobRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The [name][google.cloud.kms.v1.ImportJob.name] of the + * [ImportJob][google.cloud.kms.v1.ImportJob] to get. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The [name][google.cloud.kms.v1.ImportJob.name] of the + * [ImportJob][google.cloud.kms.v1.ImportJob] to get. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The [name][google.cloud.kms.v1.ImportJob.name] of the + * [ImportJob][google.cloud.kms.v1.ImportJob] to get. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetKeyHandleRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetKeyHandleRequest.php new file mode 100644 index 000000000000..5fb3261e6b56 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetKeyHandleRequest.php @@ -0,0 +1,91 @@ +google.cloud.kms.v1.GetKeyHandleRequest + */ +class GetKeyHandleRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the [KeyHandle][google.cloud.kms.v1.KeyHandle] resource, + * e.g. + * `projects/{PROJECT_ID}/locations/{LOCATION}/keyHandles/{KEY_HANDLE_ID}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of the [KeyHandle][google.cloud.kms.v1.KeyHandle] resource, + * e.g. + * `projects/{PROJECT_ID}/locations/{LOCATION}/keyHandles/{KEY_HANDLE_ID}`. Please see + * {@see AutokeyClient::keyHandleName()} for help formatting this field. + * + * @return \Google\Cloud\Kms\V1\GetKeyHandleRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the [KeyHandle][google.cloud.kms.v1.KeyHandle] resource, + * e.g. + * `projects/{PROJECT_ID}/locations/{LOCATION}/keyHandles/{KEY_HANDLE_ID}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Autokey::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the [KeyHandle][google.cloud.kms.v1.KeyHandle] resource, + * e.g. + * `projects/{PROJECT_ID}/locations/{LOCATION}/keyHandles/{KEY_HANDLE_ID}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the [KeyHandle][google.cloud.kms.v1.KeyHandle] resource, + * e.g. + * `projects/{PROJECT_ID}/locations/{LOCATION}/keyHandles/{KEY_HANDLE_ID}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetKeyRingRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetKeyRingRequest.php new file mode 100644 index 000000000000..a34ae4a11196 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetKeyRingRequest.php @@ -0,0 +1,87 @@ +google.cloud.kms.v1.GetKeyRingRequest + */ +class GetKeyRingRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The [name][google.cloud.kms.v1.KeyRing.name] of the + * [KeyRing][google.cloud.kms.v1.KeyRing] to get. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The [name][google.cloud.kms.v1.KeyRing.name] of the + * [KeyRing][google.cloud.kms.v1.KeyRing] to get. Please see + * {@see KeyManagementServiceClient::keyRingName()} for help formatting this field. + * + * @return \Google\Cloud\Kms\V1\GetKeyRingRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The [name][google.cloud.kms.v1.KeyRing.name] of the + * [KeyRing][google.cloud.kms.v1.KeyRing] to get. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The [name][google.cloud.kms.v1.KeyRing.name] of the + * [KeyRing][google.cloud.kms.v1.KeyRing] to get. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The [name][google.cloud.kms.v1.KeyRing.name] of the + * [KeyRing][google.cloud.kms.v1.KeyRing] to get. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetPublicKeyRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetPublicKeyRequest.php new file mode 100644 index 000000000000..cd909aac193c --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetPublicKeyRequest.php @@ -0,0 +1,145 @@ +google.cloud.kms.v1.GetPublicKeyRequest + */ +class GetPublicKeyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key to get. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. The [PublicKey][google.cloud.kms.v1.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][google.cloud.kms.v1.PublicKey.public_key] field in the + * requested format. Otherwise, the [pem][google.cloud.kms.v1.PublicKey.pem] + * field will be populated for non-PQC algorithms, and an error will be + * returned for PQC algorithms. + * + * Generated from protobuf field .google.cloud.kms.v1.PublicKey.PublicKeyFormat public_key_format = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $public_key_format = 0; + + /** + * @param string $name Required. The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key to get. Please see + * {@see KeyManagementServiceClient::cryptoKeyVersionName()} for help formatting this field. + * + * @return \Google\Cloud\Kms\V1\GetPublicKeyRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key to get. + * @type int $public_key_format + * Optional. The [PublicKey][google.cloud.kms.v1.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][google.cloud.kms.v1.PublicKey.public_key] field in the + * requested format. Otherwise, the [pem][google.cloud.kms.v1.PublicKey.pem] + * field will be populated for non-PQC algorithms, and an error will be + * returned for PQC algorithms. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key to get. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key to get. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. The [PublicKey][google.cloud.kms.v1.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][google.cloud.kms.v1.PublicKey.public_key] field in the + * requested format. Otherwise, the [pem][google.cloud.kms.v1.PublicKey.pem] + * field will be populated for non-PQC algorithms, and an error will be + * returned for PQC algorithms. + * + * Generated from protobuf field .google.cloud.kms.v1.PublicKey.PublicKeyFormat public_key_format = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPublicKeyFormat() + { + return $this->public_key_format; + } + + /** + * Optional. The [PublicKey][google.cloud.kms.v1.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][google.cloud.kms.v1.PublicKey.public_key] field in the + * requested format. Otherwise, the [pem][google.cloud.kms.v1.PublicKey.pem] + * field will be populated for non-PQC algorithms, and an error will be + * returned for PQC algorithms. + * + * Generated from protobuf field .google.cloud.kms.v1.PublicKey.PublicKeyFormat public_key_format = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPublicKeyFormat($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\PublicKey\PublicKeyFormat::class); + $this->public_key_format = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetRetiredResourceRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetRetiredResourceRequest.php new file mode 100644 index 000000000000..adc5322024c7 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetRetiredResourceRequest.php @@ -0,0 +1,87 @@ +google.cloud.kms.v1.GetRetiredResourceRequest + */ +class GetRetiredResourceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The [name][google.cloud.kms.v1.RetiredResource.name] of the + * [RetiredResource][google.cloud.kms.v1.RetiredResource] to get. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The [name][google.cloud.kms.v1.RetiredResource.name] of the + * [RetiredResource][google.cloud.kms.v1.RetiredResource] to get. Please see + * {@see KeyManagementServiceClient::retiredResourceName()} for help formatting this field. + * + * @return \Google\Cloud\Kms\V1\GetRetiredResourceRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The [name][google.cloud.kms.v1.RetiredResource.name] of the + * [RetiredResource][google.cloud.kms.v1.RetiredResource] to get. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The [name][google.cloud.kms.v1.RetiredResource.name] of the + * [RetiredResource][google.cloud.kms.v1.RetiredResource] to get. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The [name][google.cloud.kms.v1.RetiredResource.name] of the + * [RetiredResource][google.cloud.kms.v1.RetiredResource] to get. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetSingleTenantHsmInstanceProposalRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetSingleTenantHsmInstanceProposalRequest.php new file mode 100644 index 000000000000..86e2c051a049 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetSingleTenantHsmInstanceProposalRequest.php @@ -0,0 +1,97 @@ +google.cloud.kms.v1.GetSingleTenantHsmInstanceProposalRequest + */ +class GetSingleTenantHsmInstanceProposalRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The + * [name][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.name] of the + * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * to get. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The + * [name][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.name] of the + * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * to get. Please see + * {@see HsmManagementClient::singleTenantHsmInstanceProposalName()} for help formatting this field. + * + * @return \Google\Cloud\Kms\V1\GetSingleTenantHsmInstanceProposalRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The + * [name][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.name] of the + * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * to get. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\HsmManagement::initOnce(); + parent::__construct($data); + } + + /** + * Required. The + * [name][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.name] of the + * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * to get. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The + * [name][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.name] of the + * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * to get. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetSingleTenantHsmInstanceRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetSingleTenantHsmInstanceRequest.php new file mode 100644 index 000000000000..1434e94020bf --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetSingleTenantHsmInstanceRequest.php @@ -0,0 +1,92 @@ +google.cloud.kms.v1.GetSingleTenantHsmInstanceRequest + */ +class GetSingleTenantHsmInstanceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The [name][google.cloud.kms.v1.SingleTenantHsmInstance.name] of + * the [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] + * to get. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The [name][google.cloud.kms.v1.SingleTenantHsmInstance.name] of + * the [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] + * to get. Please see + * {@see HsmManagementClient::singleTenantHsmInstanceName()} for help formatting this field. + * + * @return \Google\Cloud\Kms\V1\GetSingleTenantHsmInstanceRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The [name][google.cloud.kms.v1.SingleTenantHsmInstance.name] of + * the [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] + * to get. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\HsmManagement::initOnce(); + parent::__construct($data); + } + + /** + * Required. The [name][google.cloud.kms.v1.SingleTenantHsmInstance.name] of + * the [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] + * to get. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The [name][google.cloud.kms.v1.SingleTenantHsmInstance.name] of + * the [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] + * to get. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportCryptoKeyVersionRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportCryptoKeyVersionRequest.php new file mode 100644 index 000000000000..2c9ee5ce882e --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportCryptoKeyVersionRequest.php @@ -0,0 +1,499 @@ +google.cloud.kms.v1.ImportCryptoKeyVersionRequest + */ +class ImportCryptoKeyVersionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The [name][google.cloud.kms.v1.CryptoKey.name] of the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] to be imported into. + * The create permission is only required on this key when creating a new + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The optional [name][google.cloud.kms.v1.CryptoKeyVersion.name] of + * an existing [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to + * target for an import operation. If this field is not present, a new + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] containing the + * supplied key material is created. + * If this field is present, the supplied key material is imported into + * the existing [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. To + * import into an existing + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion], the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] must be a child of + * [ImportCryptoKeyVersionRequest.parent][google.cloud.kms.v1.ImportCryptoKeyVersionRequest.parent], + * have been previously created via + * [ImportCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.ImportCryptoKeyVersion], + * and be in + * [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED] + * or + * [IMPORT_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.IMPORT_FAILED] + * state. The key material and algorithm must match the previous + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] exactly if the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] has ever contained + * key material. + * + * Generated from protobuf field string crypto_key_version = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $crypto_key_version = ''; + /** + * Required. The + * [algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] + * of the key being imported. This does not need to match the + * [version_template][google.cloud.kms.v1.CryptoKey.version_template] of the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] this version imports into. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $algorithm = 0; + /** + * Required. The [name][google.cloud.kms.v1.ImportJob.name] of the + * [ImportJob][google.cloud.kms.v1.ImportJob] that was used to wrap this key + * material. + * + * Generated from protobuf field string import_job = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $import_job = ''; + /** + * 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][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_3072_SHA1_AES_256] + * or + * [RSA_OAEP_4096_SHA1_AES_256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_4096_SHA1_AES_256] + * or + * [RSA_OAEP_3072_SHA256_AES_256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_3072_SHA256_AES_256] + * or + * [RSA_OAEP_4096_SHA256_AES_256][google.cloud.kms.v1.ImportJob.ImportMethod.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][google.cloud.kms.v1.ImportJob.public_key] using + * RSAES-OAEP with SHA-1/SHA-256, MGF1 with SHA-1/SHA-256, and an empty + * label. + *
  2. + *
  3. The formatted key to be imported, wrapped with the ephemeral AES-256 + * key using AES-KWP (RFC 5649). + *
  4. + *
+ * 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][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_3072_SHA256] + * or + * [RSA_OAEP_4096_SHA256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_4096_SHA256]), + * this field must contain the formatted key to be imported, wrapped with the + * [public_key][google.cloud.kms.v1.ImportJob.public_key] using RSAES-OAEP + * with SHA-256, MGF1 with SHA-256, and an empty label. + * + * Generated from protobuf field bytes wrapped_key = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $wrapped_key = ''; + protected $wrapped_key_material; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The [name][google.cloud.kms.v1.CryptoKey.name] of the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] to be imported into. + * The create permission is only required on this key when creating a new + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. + * @type string $crypto_key_version + * Optional. The optional [name][google.cloud.kms.v1.CryptoKeyVersion.name] of + * an existing [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to + * target for an import operation. If this field is not present, a new + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] containing the + * supplied key material is created. + * If this field is present, the supplied key material is imported into + * the existing [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. To + * import into an existing + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion], the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] must be a child of + * [ImportCryptoKeyVersionRequest.parent][google.cloud.kms.v1.ImportCryptoKeyVersionRequest.parent], + * have been previously created via + * [ImportCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.ImportCryptoKeyVersion], + * and be in + * [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED] + * or + * [IMPORT_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.IMPORT_FAILED] + * state. The key material and algorithm must match the previous + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] exactly if the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] has ever contained + * key material. + * @type int $algorithm + * Required. The + * [algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] + * of the key being imported. This does not need to match the + * [version_template][google.cloud.kms.v1.CryptoKey.version_template] of the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] this version imports into. + * @type string $import_job + * Required. The [name][google.cloud.kms.v1.ImportJob.name] of the + * [ImportJob][google.cloud.kms.v1.ImportJob] that was used to wrap this key + * material. + * @type string $wrapped_key + * 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][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_3072_SHA1_AES_256] + * or + * [RSA_OAEP_4096_SHA1_AES_256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_4096_SHA1_AES_256] + * or + * [RSA_OAEP_3072_SHA256_AES_256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_3072_SHA256_AES_256] + * or + * [RSA_OAEP_4096_SHA256_AES_256][google.cloud.kms.v1.ImportJob.ImportMethod.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][google.cloud.kms.v1.ImportJob.public_key] using + * RSAES-OAEP with SHA-1/SHA-256, MGF1 with SHA-1/SHA-256, and an empty + * label. + *
  2. + *
  3. The formatted key to be imported, wrapped with the ephemeral AES-256 + * key using AES-KWP (RFC 5649). + *
  4. + *
+ * 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][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_3072_SHA256] + * or + * [RSA_OAEP_4096_SHA256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_4096_SHA256]), + * this field must contain the formatted key to be imported, wrapped with the + * [public_key][google.cloud.kms.v1.ImportJob.public_key] using RSAES-OAEP + * with SHA-256, MGF1 with SHA-256, and an empty label. + * @type string $rsa_aes_wrapped_key + * Optional. This field has the same meaning as + * [wrapped_key][google.cloud.kms.v1.ImportCryptoKeyVersionRequest.wrapped_key]. + * Prefer to use that field in new work. Either that field or this field + * (but not both) must be specified. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The [name][google.cloud.kms.v1.CryptoKey.name] of the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] to be imported into. + * The create permission is only required on this key when creating a new + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The [name][google.cloud.kms.v1.CryptoKey.name] of the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] to be imported into. + * The create permission is only required on this key when creating a new + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The optional [name][google.cloud.kms.v1.CryptoKeyVersion.name] of + * an existing [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to + * target for an import operation. If this field is not present, a new + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] containing the + * supplied key material is created. + * If this field is present, the supplied key material is imported into + * the existing [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. To + * import into an existing + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion], the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] must be a child of + * [ImportCryptoKeyVersionRequest.parent][google.cloud.kms.v1.ImportCryptoKeyVersionRequest.parent], + * have been previously created via + * [ImportCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.ImportCryptoKeyVersion], + * and be in + * [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED] + * or + * [IMPORT_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.IMPORT_FAILED] + * state. The key material and algorithm must match the previous + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] exactly if the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] has ever contained + * key material. + * + * Generated from protobuf field string crypto_key_version = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getCryptoKeyVersion() + { + return $this->crypto_key_version; + } + + /** + * Optional. The optional [name][google.cloud.kms.v1.CryptoKeyVersion.name] of + * an existing [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to + * target for an import operation. If this field is not present, a new + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] containing the + * supplied key material is created. + * If this field is present, the supplied key material is imported into + * the existing [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. To + * import into an existing + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion], the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] must be a child of + * [ImportCryptoKeyVersionRequest.parent][google.cloud.kms.v1.ImportCryptoKeyVersionRequest.parent], + * have been previously created via + * [ImportCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.ImportCryptoKeyVersion], + * and be in + * [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED] + * or + * [IMPORT_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.IMPORT_FAILED] + * state. The key material and algorithm must match the previous + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] exactly if the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] has ever contained + * key material. + * + * Generated from protobuf field string crypto_key_version = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setCryptoKeyVersion($var) + { + GPBUtil::checkString($var, True); + $this->crypto_key_version = $var; + + return $this; + } + + /** + * Required. The + * [algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] + * of the key being imported. This does not need to match the + * [version_template][google.cloud.kms.v1.CryptoKey.version_template] of the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] this version imports into. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getAlgorithm() + { + return $this->algorithm; + } + + /** + * Required. The + * [algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] + * of the key being imported. This does not need to match the + * [version_template][google.cloud.kms.v1.CryptoKey.version_template] of the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] this version imports into. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setAlgorithm($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\CryptoKeyVersion\CryptoKeyVersionAlgorithm::class); + $this->algorithm = $var; + + return $this; + } + + /** + * Required. The [name][google.cloud.kms.v1.ImportJob.name] of the + * [ImportJob][google.cloud.kms.v1.ImportJob] that was used to wrap this key + * material. + * + * Generated from protobuf field string import_job = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getImportJob() + { + return $this->import_job; + } + + /** + * Required. The [name][google.cloud.kms.v1.ImportJob.name] of the + * [ImportJob][google.cloud.kms.v1.ImportJob] that was used to wrap this key + * material. + * + * Generated from protobuf field string import_job = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setImportJob($var) + { + GPBUtil::checkString($var, True); + $this->import_job = $var; + + return $this; + } + + /** + * 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][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_3072_SHA1_AES_256] + * or + * [RSA_OAEP_4096_SHA1_AES_256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_4096_SHA1_AES_256] + * or + * [RSA_OAEP_3072_SHA256_AES_256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_3072_SHA256_AES_256] + * or + * [RSA_OAEP_4096_SHA256_AES_256][google.cloud.kms.v1.ImportJob.ImportMethod.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][google.cloud.kms.v1.ImportJob.public_key] using + * RSAES-OAEP with SHA-1/SHA-256, MGF1 with SHA-1/SHA-256, and an empty + * label. + *
  2. + *
  3. The formatted key to be imported, wrapped with the ephemeral AES-256 + * key using AES-KWP (RFC 5649). + *
  4. + *
+ * 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][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_3072_SHA256] + * or + * [RSA_OAEP_4096_SHA256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_4096_SHA256]), + * this field must contain the formatted key to be imported, wrapped with the + * [public_key][google.cloud.kms.v1.ImportJob.public_key] using RSAES-OAEP + * with SHA-256, MGF1 with SHA-256, and an empty label. + * + * Generated from protobuf field bytes wrapped_key = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getWrappedKey() + { + return $this->wrapped_key; + } + + /** + * 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][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_3072_SHA1_AES_256] + * or + * [RSA_OAEP_4096_SHA1_AES_256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_4096_SHA1_AES_256] + * or + * [RSA_OAEP_3072_SHA256_AES_256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_3072_SHA256_AES_256] + * or + * [RSA_OAEP_4096_SHA256_AES_256][google.cloud.kms.v1.ImportJob.ImportMethod.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][google.cloud.kms.v1.ImportJob.public_key] using + * RSAES-OAEP with SHA-1/SHA-256, MGF1 with SHA-1/SHA-256, and an empty + * label. + *
  2. + *
  3. The formatted key to be imported, wrapped with the ephemeral AES-256 + * key using AES-KWP (RFC 5649). + *
  4. + *
+ * 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][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_3072_SHA256] + * or + * [RSA_OAEP_4096_SHA256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_4096_SHA256]), + * this field must contain the formatted key to be imported, wrapped with the + * [public_key][google.cloud.kms.v1.ImportJob.public_key] using RSAES-OAEP + * with SHA-256, MGF1 with SHA-256, and an empty label. + * + * Generated from protobuf field bytes wrapped_key = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setWrappedKey($var) + { + GPBUtil::checkString($var, False); + $this->wrapped_key = $var; + + return $this; + } + + /** + * Optional. This field has the same meaning as + * [wrapped_key][google.cloud.kms.v1.ImportCryptoKeyVersionRequest.wrapped_key]. + * Prefer to use that field in new work. Either that field or this field + * (but not both) must be specified. + * + * Generated from protobuf field bytes rsa_aes_wrapped_key = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRsaAesWrappedKey() + { + return $this->readOneof(5); + } + + public function hasRsaAesWrappedKey() + { + return $this->hasOneof(5); + } + + /** + * Optional. This field has the same meaning as + * [wrapped_key][google.cloud.kms.v1.ImportCryptoKeyVersionRequest.wrapped_key]. + * Prefer to use that field in new work. Either that field or this field + * (but not both) must be specified. + * + * Generated from protobuf field bytes rsa_aes_wrapped_key = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRsaAesWrappedKey($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * @return string + */ + public function getWrappedKeyMaterial() + { + return $this->whichOneof("wrapped_key_material"); + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportJob.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportJob.php new file mode 100644 index 000000000000..8d5dafa50967 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportJob.php @@ -0,0 +1,607 @@ +google.cloud.kms.v1.ImportJob + */ +class ImportJob extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The resource name for this + * [ImportJob][google.cloud.kms.v1.ImportJob] in the format + * `projects/*/locations/*/keyRings/*/importJobs/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Required. Immutable. The wrapping method to be used for incoming key + * material. + * + * Generated from protobuf field .google.cloud.kms.v1.ImportJob.ImportMethod import_method = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + */ + protected $import_method = 0; + /** + * Required. Immutable. The protection level of the + * [ImportJob][google.cloud.kms.v1.ImportJob]. This must match the + * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level] + * of the [version_template][google.cloud.kms.v1.CryptoKey.version_template] + * on the [CryptoKey][google.cloud.kms.v1.CryptoKey] you attempt to import + * into. + * + * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 9 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + */ + protected $protection_level = 0; + /** + * Output only. The time at which this + * [ImportJob][google.cloud.kms.v1.ImportJob] was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob]'s key + * material was generated. + * + * Generated from protobuf field .google.protobuf.Timestamp generate_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $generate_time = null; + /** + * Output only. The time at which this + * [ImportJob][google.cloud.kms.v1.ImportJob] is scheduled for expiration and + * can no longer be used to import key material. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $expire_time = null; + /** + * Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob] + * expired. Only present if [state][google.cloud.kms.v1.ImportJob.state] is + * [EXPIRED][google.cloud.kms.v1.ImportJob.ImportJobState.EXPIRED]. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_event_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $expire_event_time = null; + /** + * Output only. The current state of the + * [ImportJob][google.cloud.kms.v1.ImportJob], indicating if it can be used. + * + * Generated from protobuf field .google.cloud.kms.v1.ImportJob.ImportJobState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. The public key with which to wrap key material prior to + * import. Only returned if [state][google.cloud.kms.v1.ImportJob.state] is + * [ACTIVE][google.cloud.kms.v1.ImportJob.ImportJobState.ACTIVE]. + * + * Generated from protobuf field .google.cloud.kms.v1.ImportJob.WrappingPublicKey public_key = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $public_key = null; + /** + * 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][google.cloud.kms.v1.ImportJob.ImportMethod] is one with a + * protection level of [HSM][google.cloud.kms.v1.ProtectionLevel.HSM]. + * + * Generated from protobuf field .google.cloud.kms.v1.KeyOperationAttestation attestation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $attestation = null; + /** + * 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][google.cloud.kms.v1.ProtectionLevel] + * in the future. Supported resources: + * * `"projects/*/locations/*/singleTenantHsmInstances/*"` + * + * Generated from protobuf field string crypto_key_backend = 11 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + */ + protected $crypto_key_backend = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The resource name for this + * [ImportJob][google.cloud.kms.v1.ImportJob] in the format + * `projects/*/locations/*/keyRings/*/importJobs/*`. + * @type int $import_method + * Required. Immutable. The wrapping method to be used for incoming key + * material. + * @type int $protection_level + * Required. Immutable. The protection level of the + * [ImportJob][google.cloud.kms.v1.ImportJob]. This must match the + * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level] + * of the [version_template][google.cloud.kms.v1.CryptoKey.version_template] + * on the [CryptoKey][google.cloud.kms.v1.CryptoKey] you attempt to import + * into. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time at which this + * [ImportJob][google.cloud.kms.v1.ImportJob] was created. + * @type \Google\Protobuf\Timestamp $generate_time + * Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob]'s key + * material was generated. + * @type \Google\Protobuf\Timestamp $expire_time + * Output only. The time at which this + * [ImportJob][google.cloud.kms.v1.ImportJob] is scheduled for expiration and + * can no longer be used to import key material. + * @type \Google\Protobuf\Timestamp $expire_event_time + * Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob] + * expired. Only present if [state][google.cloud.kms.v1.ImportJob.state] is + * [EXPIRED][google.cloud.kms.v1.ImportJob.ImportJobState.EXPIRED]. + * @type int $state + * Output only. The current state of the + * [ImportJob][google.cloud.kms.v1.ImportJob], indicating if it can be used. + * @type \Google\Cloud\Kms\V1\ImportJob\WrappingPublicKey $public_key + * Output only. The public key with which to wrap key material prior to + * import. Only returned if [state][google.cloud.kms.v1.ImportJob.state] is + * [ACTIVE][google.cloud.kms.v1.ImportJob.ImportJobState.ACTIVE]. + * @type \Google\Cloud\Kms\V1\KeyOperationAttestation $attestation + * 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][google.cloud.kms.v1.ImportJob.ImportMethod] is one with a + * protection level of [HSM][google.cloud.kms.v1.ProtectionLevel.HSM]. + * @type string $crypto_key_backend + * 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][google.cloud.kms.v1.ProtectionLevel] + * in the future. Supported resources: + * * `"projects/*/locations/*/singleTenantHsmInstances/*"` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The resource name for this + * [ImportJob][google.cloud.kms.v1.ImportJob] in the format + * `projects/*/locations/*/keyRings/*/importJobs/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The resource name for this + * [ImportJob][google.cloud.kms.v1.ImportJob] in the format + * `projects/*/locations/*/keyRings/*/importJobs/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. Immutable. The wrapping method to be used for incoming key + * material. + * + * Generated from protobuf field .google.cloud.kms.v1.ImportJob.ImportMethod import_method = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @return int + */ + public function getImportMethod() + { + return $this->import_method; + } + + /** + * Required. Immutable. The wrapping method to be used for incoming key + * material. + * + * Generated from protobuf field .google.cloud.kms.v1.ImportJob.ImportMethod import_method = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @param int $var + * @return $this + */ + public function setImportMethod($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\ImportJob\ImportMethod::class); + $this->import_method = $var; + + return $this; + } + + /** + * Required. Immutable. The protection level of the + * [ImportJob][google.cloud.kms.v1.ImportJob]. This must match the + * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level] + * of the [version_template][google.cloud.kms.v1.CryptoKey.version_template] + * on the [CryptoKey][google.cloud.kms.v1.CryptoKey] you attempt to import + * into. + * + * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 9 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @return int + */ + public function getProtectionLevel() + { + return $this->protection_level; + } + + /** + * Required. Immutable. The protection level of the + * [ImportJob][google.cloud.kms.v1.ImportJob]. This must match the + * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level] + * of the [version_template][google.cloud.kms.v1.CryptoKey.version_template] + * on the [CryptoKey][google.cloud.kms.v1.CryptoKey] you attempt to import + * into. + * + * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 9 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @param int $var + * @return $this + */ + public function setProtectionLevel($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\ProtectionLevel::class); + $this->protection_level = $var; + + return $this; + } + + /** + * Output only. The time at which this + * [ImportJob][google.cloud.kms.v1.ImportJob] was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time at which this + * [ImportJob][google.cloud.kms.v1.ImportJob] was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob]'s key + * material was generated. + * + * Generated from protobuf field .google.protobuf.Timestamp generate_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getGenerateTime() + { + return $this->generate_time; + } + + public function hasGenerateTime() + { + return isset($this->generate_time); + } + + public function clearGenerateTime() + { + unset($this->generate_time); + } + + /** + * Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob]'s key + * material was generated. + * + * Generated from protobuf field .google.protobuf.Timestamp generate_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setGenerateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->generate_time = $var; + + return $this; + } + + /** + * Output only. The time at which this + * [ImportJob][google.cloud.kms.v1.ImportJob] is scheduled for expiration and + * can no longer be used to import key material. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getExpireTime() + { + return $this->expire_time; + } + + public function hasExpireTime() + { + return isset($this->expire_time); + } + + public function clearExpireTime() + { + unset($this->expire_time); + } + + /** + * Output only. The time at which this + * [ImportJob][google.cloud.kms.v1.ImportJob] is scheduled for expiration and + * can no longer be used to import key material. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setExpireTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->expire_time = $var; + + return $this; + } + + /** + * Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob] + * expired. Only present if [state][google.cloud.kms.v1.ImportJob.state] is + * [EXPIRED][google.cloud.kms.v1.ImportJob.ImportJobState.EXPIRED]. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_event_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getExpireEventTime() + { + return $this->expire_event_time; + } + + public function hasExpireEventTime() + { + return isset($this->expire_event_time); + } + + public function clearExpireEventTime() + { + unset($this->expire_event_time); + } + + /** + * Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob] + * expired. Only present if [state][google.cloud.kms.v1.ImportJob.state] is + * [EXPIRED][google.cloud.kms.v1.ImportJob.ImportJobState.EXPIRED]. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_event_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setExpireEventTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->expire_event_time = $var; + + return $this; + } + + /** + * Output only. The current state of the + * [ImportJob][google.cloud.kms.v1.ImportJob], indicating if it can be used. + * + * Generated from protobuf field .google.cloud.kms.v1.ImportJob.ImportJobState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The current state of the + * [ImportJob][google.cloud.kms.v1.ImportJob], indicating if it can be used. + * + * Generated from protobuf field .google.cloud.kms.v1.ImportJob.ImportJobState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\ImportJob\ImportJobState::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. The public key with which to wrap key material prior to + * import. Only returned if [state][google.cloud.kms.v1.ImportJob.state] is + * [ACTIVE][google.cloud.kms.v1.ImportJob.ImportJobState.ACTIVE]. + * + * Generated from protobuf field .google.cloud.kms.v1.ImportJob.WrappingPublicKey public_key = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Kms\V1\ImportJob\WrappingPublicKey|null + */ + public function getPublicKey() + { + return $this->public_key; + } + + public function hasPublicKey() + { + return isset($this->public_key); + } + + public function clearPublicKey() + { + unset($this->public_key); + } + + /** + * Output only. The public key with which to wrap key material prior to + * import. Only returned if [state][google.cloud.kms.v1.ImportJob.state] is + * [ACTIVE][google.cloud.kms.v1.ImportJob.ImportJobState.ACTIVE]. + * + * Generated from protobuf field .google.cloud.kms.v1.ImportJob.WrappingPublicKey public_key = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Kms\V1\ImportJob\WrappingPublicKey $var + * @return $this + */ + public function setPublicKey($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\ImportJob\WrappingPublicKey::class); + $this->public_key = $var; + + return $this; + } + + /** + * 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][google.cloud.kms.v1.ImportJob.ImportMethod] is one with a + * protection level of [HSM][google.cloud.kms.v1.ProtectionLevel.HSM]. + * + * Generated from protobuf field .google.cloud.kms.v1.KeyOperationAttestation attestation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Kms\V1\KeyOperationAttestation|null + */ + public function getAttestation() + { + return $this->attestation; + } + + public function hasAttestation() + { + return isset($this->attestation); + } + + public function clearAttestation() + { + unset($this->attestation); + } + + /** + * 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][google.cloud.kms.v1.ImportJob.ImportMethod] is one with a + * protection level of [HSM][google.cloud.kms.v1.ProtectionLevel.HSM]. + * + * Generated from protobuf field .google.cloud.kms.v1.KeyOperationAttestation attestation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Kms\V1\KeyOperationAttestation $var + * @return $this + */ + public function setAttestation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\KeyOperationAttestation::class); + $this->attestation = $var; + + return $this; + } + + /** + * 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][google.cloud.kms.v1.ProtectionLevel] + * in the future. Supported resources: + * * `"projects/*/locations/*/singleTenantHsmInstances/*"` + * + * Generated from protobuf field string crypto_key_backend = 11 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @return string + */ + public function getCryptoKeyBackend() + { + return $this->crypto_key_backend; + } + + /** + * 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][google.cloud.kms.v1.ProtectionLevel] + * in the future. Supported resources: + * * `"projects/*/locations/*/singleTenantHsmInstances/*"` + * + * Generated from protobuf field string crypto_key_backend = 11 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setCryptoKeyBackend($var) + { + GPBUtil::checkString($var, True); + $this->crypto_key_backend = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportJob/ImportJobState.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportJob/ImportJobState.php new file mode 100644 index 000000000000..b6e7a3e918ae --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportJob/ImportJobState.php @@ -0,0 +1,79 @@ +google.cloud.kms.v1.ImportJob.ImportJobState + */ +class ImportJobState +{ + /** + * Not specified. + * + * Generated from protobuf enum IMPORT_JOB_STATE_UNSPECIFIED = 0; + */ + const IMPORT_JOB_STATE_UNSPECIFIED = 0; + /** + * The wrapping key for this job is still being generated. It may not be + * used. Cloud KMS will automatically mark this job as + * [ACTIVE][google.cloud.kms.v1.ImportJob.ImportJobState.ACTIVE] as soon as + * the wrapping key is generated. + * + * Generated from protobuf enum PENDING_GENERATION = 1; + */ + const PENDING_GENERATION = 1; + /** + * This job may be used in + * [CreateCryptoKey][google.cloud.kms.v1.KeyManagementService.CreateCryptoKey] + * and + * [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion] + * requests. + * + * Generated from protobuf enum ACTIVE = 2; + */ + const ACTIVE = 2; + /** + * This job can no longer be used and may not leave this state once entered. + * + * Generated from protobuf enum EXPIRED = 3; + */ + const EXPIRED = 3; + + private static $valueToName = [ + self::IMPORT_JOB_STATE_UNSPECIFIED => 'IMPORT_JOB_STATE_UNSPECIFIED', + self::PENDING_GENERATION => 'PENDING_GENERATION', + self::ACTIVE => 'ACTIVE', + self::EXPIRED => 'EXPIRED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ImportJobState::class, \Google\Cloud\Kms\V1\ImportJob_ImportJobState::class); + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportJob/ImportMethod.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportJob/ImportMethod.php new file mode 100644 index 000000000000..f9a854116277 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportJob/ImportMethod.php @@ -0,0 +1,120 @@ +google.cloud.kms.v1.ImportJob.ImportMethod + */ +class ImportMethod +{ + /** + * Not specified. + * + * Generated from protobuf enum IMPORT_METHOD_UNSPECIFIED = 0; + */ + const IMPORT_METHOD_UNSPECIFIED = 0; + /** + * 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). + * + * Generated from protobuf enum RSA_OAEP_3072_SHA1_AES_256 = 1; + */ + const RSA_OAEP_3072_SHA1_AES_256 = 1; + /** + * 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). + * + * Generated from protobuf enum RSA_OAEP_4096_SHA1_AES_256 = 2; + */ + const RSA_OAEP_4096_SHA1_AES_256 = 2; + /** + * 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). + * + * Generated from protobuf enum RSA_OAEP_3072_SHA256_AES_256 = 3; + */ + const RSA_OAEP_3072_SHA256_AES_256 = 3; + /** + * 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). + * + * Generated from protobuf enum RSA_OAEP_4096_SHA256_AES_256 = 4; + */ + const RSA_OAEP_4096_SHA256_AES_256 = 4; + /** + * 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. + * + * Generated from protobuf enum RSA_OAEP_3072_SHA256 = 5; + */ + const RSA_OAEP_3072_SHA256 = 5; + /** + * 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. + * + * Generated from protobuf enum RSA_OAEP_4096_SHA256 = 6; + */ + const RSA_OAEP_4096_SHA256 = 6; + + private static $valueToName = [ + self::IMPORT_METHOD_UNSPECIFIED => 'IMPORT_METHOD_UNSPECIFIED', + self::RSA_OAEP_3072_SHA1_AES_256 => 'RSA_OAEP_3072_SHA1_AES_256', + self::RSA_OAEP_4096_SHA1_AES_256 => 'RSA_OAEP_4096_SHA1_AES_256', + self::RSA_OAEP_3072_SHA256_AES_256 => 'RSA_OAEP_3072_SHA256_AES_256', + self::RSA_OAEP_4096_SHA256_AES_256 => 'RSA_OAEP_4096_SHA256_AES_256', + self::RSA_OAEP_3072_SHA256 => 'RSA_OAEP_3072_SHA256', + self::RSA_OAEP_4096_SHA256 => 'RSA_OAEP_4096_SHA256', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ImportMethod::class, \Google\Cloud\Kms\V1\ImportJob_ImportMethod::class); + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportJob/WrappingPublicKey.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportJob/WrappingPublicKey.php new file mode 100644 index 000000000000..63be4f5d952d --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportJob/WrappingPublicKey.php @@ -0,0 +1,88 @@ +google.cloud.kms.v1.ImportJob.WrappingPublicKey + */ +class WrappingPublicKey extends \Google\Protobuf\Internal\Message +{ + /** + * 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). + * + * Generated from protobuf field string pem = 1; + */ + protected $pem = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $pem + * 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). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * 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). + * + * Generated from protobuf field string pem = 1; + * @return string + */ + public function getPem() + { + return $this->pem; + } + + /** + * 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). + * + * Generated from protobuf field string pem = 1; + * @param string $var + * @return $this + */ + public function setPem($var) + { + GPBUtil::checkString($var, True); + $this->pem = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(WrappingPublicKey::class, \Google\Cloud\Kms\V1\ImportJob_WrappingPublicKey::class); + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyAccessJustificationsPolicy.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyAccessJustificationsPolicy.php new file mode 100644 index 000000000000..f8e478c969ad --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyAccessJustificationsPolicy.php @@ -0,0 +1,87 @@ +google.cloud.kms.v1.KeyAccessJustificationsPolicy + */ +class KeyAccessJustificationsPolicy extends \Google\Protobuf\Internal\Message +{ + /** + * The list of allowed reasons for access to a + * [CryptoKey][google.cloud.kms.v1.CryptoKey]. Zero allowed access reasons + * means all encrypt, decrypt, and sign operations for the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] associated with this policy will + * fail. + * + * Generated from protobuf field repeated .google.cloud.kms.v1.AccessReason allowed_access_reasons = 1; + */ + private $allowed_access_reasons; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $allowed_access_reasons + * The list of allowed reasons for access to a + * [CryptoKey][google.cloud.kms.v1.CryptoKey]. Zero allowed access reasons + * means all encrypt, decrypt, and sign operations for the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] associated with this policy will + * fail. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The list of allowed reasons for access to a + * [CryptoKey][google.cloud.kms.v1.CryptoKey]. Zero allowed access reasons + * means all encrypt, decrypt, and sign operations for the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] associated with this policy will + * fail. + * + * Generated from protobuf field repeated .google.cloud.kms.v1.AccessReason allowed_access_reasons = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAllowedAccessReasons() + { + return $this->allowed_access_reasons; + } + + /** + * The list of allowed reasons for access to a + * [CryptoKey][google.cloud.kms.v1.CryptoKey]. Zero allowed access reasons + * means all encrypt, decrypt, and sign operations for the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] associated with this policy will + * fail. + * + * Generated from protobuf field repeated .google.cloud.kms.v1.AccessReason allowed_access_reasons = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAllowedAccessReasons($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Kms\V1\AccessReason::class); + $this->allowed_access_reasons = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyHandle.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyHandle.php new file mode 100644 index 000000000000..aa4c81b8b765 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyHandle.php @@ -0,0 +1,196 @@ +google.cloud.kms.v1.KeyHandle + */ +class KeyHandle extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. Name of the [KeyHandle][google.cloud.kms.v1.KeyHandle] + * resource, e.g. + * `projects/{PROJECT_ID}/locations/{LOCATION}/keyHandles/{KEY_HANDLE_ID}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. Name of a [CryptoKey][google.cloud.kms.v1.CryptoKey] that has + * been provisioned for Customer Managed Encryption Key (CMEK) use in the + * [KeyHandle][google.cloud.kms.v1.KeyHandle] project and location for the + * requested resource type. The [CryptoKey][google.cloud.kms.v1.CryptoKey] + * project will reflect the value configured in the + * [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig] on the resource + * project's ancestor folder at the time of the + * [KeyHandle][google.cloud.kms.v1.KeyHandle] creation. If more than one + * ancestor folder has a configured + * [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig], the nearest of these + * configurations is used. + * + * Generated from protobuf field string kms_key = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $kms_key = ''; + /** + * Required. Indicates the resource type that the resulting + * [CryptoKey][google.cloud.kms.v1.CryptoKey] is meant to protect, e.g. + * `{SERVICE}.googleapis.com/{TYPE}`. See documentation for supported resource + * types. + * + * Generated from protobuf field string resource_type_selector = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $resource_type_selector = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. Name of the [KeyHandle][google.cloud.kms.v1.KeyHandle] + * resource, e.g. + * `projects/{PROJECT_ID}/locations/{LOCATION}/keyHandles/{KEY_HANDLE_ID}`. + * @type string $kms_key + * Output only. Name of a [CryptoKey][google.cloud.kms.v1.CryptoKey] that has + * been provisioned for Customer Managed Encryption Key (CMEK) use in the + * [KeyHandle][google.cloud.kms.v1.KeyHandle] project and location for the + * requested resource type. The [CryptoKey][google.cloud.kms.v1.CryptoKey] + * project will reflect the value configured in the + * [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig] on the resource + * project's ancestor folder at the time of the + * [KeyHandle][google.cloud.kms.v1.KeyHandle] creation. If more than one + * ancestor folder has a configured + * [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig], the nearest of these + * configurations is used. + * @type string $resource_type_selector + * Required. Indicates the resource type that the resulting + * [CryptoKey][google.cloud.kms.v1.CryptoKey] is meant to protect, e.g. + * `{SERVICE}.googleapis.com/{TYPE}`. See documentation for supported resource + * types. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Autokey::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. Name of the [KeyHandle][google.cloud.kms.v1.KeyHandle] + * resource, e.g. + * `projects/{PROJECT_ID}/locations/{LOCATION}/keyHandles/{KEY_HANDLE_ID}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. Name of the [KeyHandle][google.cloud.kms.v1.KeyHandle] + * resource, e.g. + * `projects/{PROJECT_ID}/locations/{LOCATION}/keyHandles/{KEY_HANDLE_ID}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. Name of a [CryptoKey][google.cloud.kms.v1.CryptoKey] that has + * been provisioned for Customer Managed Encryption Key (CMEK) use in the + * [KeyHandle][google.cloud.kms.v1.KeyHandle] project and location for the + * requested resource type. The [CryptoKey][google.cloud.kms.v1.CryptoKey] + * project will reflect the value configured in the + * [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig] on the resource + * project's ancestor folder at the time of the + * [KeyHandle][google.cloud.kms.v1.KeyHandle] creation. If more than one + * ancestor folder has a configured + * [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig], the nearest of these + * configurations is used. + * + * Generated from protobuf field string kms_key = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getKmsKey() + { + return $this->kms_key; + } + + /** + * Output only. Name of a [CryptoKey][google.cloud.kms.v1.CryptoKey] that has + * been provisioned for Customer Managed Encryption Key (CMEK) use in the + * [KeyHandle][google.cloud.kms.v1.KeyHandle] project and location for the + * requested resource type. The [CryptoKey][google.cloud.kms.v1.CryptoKey] + * project will reflect the value configured in the + * [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig] on the resource + * project's ancestor folder at the time of the + * [KeyHandle][google.cloud.kms.v1.KeyHandle] creation. If more than one + * ancestor folder has a configured + * [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig], the nearest of these + * configurations is used. + * + * Generated from protobuf field string kms_key = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setKmsKey($var) + { + GPBUtil::checkString($var, True); + $this->kms_key = $var; + + return $this; + } + + /** + * Required. Indicates the resource type that the resulting + * [CryptoKey][google.cloud.kms.v1.CryptoKey] is meant to protect, e.g. + * `{SERVICE}.googleapis.com/{TYPE}`. See documentation for supported resource + * types. + * + * Generated from protobuf field string resource_type_selector = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getResourceTypeSelector() + { + return $this->resource_type_selector; + } + + /** + * Required. Indicates the resource type that the resulting + * [CryptoKey][google.cloud.kms.v1.CryptoKey] is meant to protect, e.g. + * `{SERVICE}.googleapis.com/{TYPE}`. See documentation for supported resource + * types. + * + * Generated from protobuf field string resource_type_selector = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setResourceTypeSelector($var) + { + GPBUtil::checkString($var, True); + $this->resource_type_selector = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyOperationAttestation.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyOperationAttestation.php new file mode 100644 index 000000000000..faed7bffa9e1 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyOperationAttestation.php @@ -0,0 +1,151 @@ +google.cloud.kms.v1.KeyOperationAttestation + */ +class KeyOperationAttestation extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The format of the attestation data. + * + * Generated from protobuf field .google.cloud.kms.v1.KeyOperationAttestation.AttestationFormat format = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $format = 0; + /** + * Output only. The attestation data provided by the HSM when the key + * operation was performed. + * + * Generated from protobuf field bytes content = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $content = ''; + /** + * Output only. The certificate chains needed to validate the attestation + * + * Generated from protobuf field .google.cloud.kms.v1.KeyOperationAttestation.CertificateChains cert_chains = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $cert_chains = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $format + * Output only. The format of the attestation data. + * @type string $content + * Output only. The attestation data provided by the HSM when the key + * operation was performed. + * @type \Google\Cloud\Kms\V1\KeyOperationAttestation\CertificateChains $cert_chains + * Output only. The certificate chains needed to validate the attestation + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The format of the attestation data. + * + * Generated from protobuf field .google.cloud.kms.v1.KeyOperationAttestation.AttestationFormat format = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getFormat() + { + return $this->format; + } + + /** + * Output only. The format of the attestation data. + * + * Generated from protobuf field .google.cloud.kms.v1.KeyOperationAttestation.AttestationFormat format = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setFormat($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\KeyOperationAttestation\AttestationFormat::class); + $this->format = $var; + + return $this; + } + + /** + * Output only. The attestation data provided by the HSM when the key + * operation was performed. + * + * Generated from protobuf field bytes content = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getContent() + { + return $this->content; + } + + /** + * Output only. The attestation data provided by the HSM when the key + * operation was performed. + * + * Generated from protobuf field bytes content = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setContent($var) + { + GPBUtil::checkString($var, False); + $this->content = $var; + + return $this; + } + + /** + * Output only. The certificate chains needed to validate the attestation + * + * Generated from protobuf field .google.cloud.kms.v1.KeyOperationAttestation.CertificateChains cert_chains = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Kms\V1\KeyOperationAttestation\CertificateChains|null + */ + public function getCertChains() + { + return $this->cert_chains; + } + + public function hasCertChains() + { + return isset($this->cert_chains); + } + + public function clearCertChains() + { + unset($this->cert_chains); + } + + /** + * Output only. The certificate chains needed to validate the attestation + * + * Generated from protobuf field .google.cloud.kms.v1.KeyOperationAttestation.CertificateChains cert_chains = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Kms\V1\KeyOperationAttestation\CertificateChains $var + * @return $this + */ + public function setCertChains($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\KeyOperationAttestation\CertificateChains::class); + $this->cert_chains = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyOperationAttestation/AttestationFormat.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyOperationAttestation/AttestationFormat.php new file mode 100644 index 000000000000..43880fade2c1 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyOperationAttestation/AttestationFormat.php @@ -0,0 +1,68 @@ +google.cloud.kms.v1.KeyOperationAttestation.AttestationFormat + */ +class AttestationFormat +{ + /** + * Not specified. + * + * Generated from protobuf enum ATTESTATION_FORMAT_UNSPECIFIED = 0; + */ + const ATTESTATION_FORMAT_UNSPECIFIED = 0; + /** + * 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. + * + * Generated from protobuf enum CAVIUM_V1_COMPRESSED = 3; + */ + const CAVIUM_V1_COMPRESSED = 3; + /** + * Cavium HSM attestation V2 compressed with gzip. This is a new format + * introduced in Cavium's version 3.2-08. + * + * Generated from protobuf enum CAVIUM_V2_COMPRESSED = 4; + */ + const CAVIUM_V2_COMPRESSED = 4; + + private static $valueToName = [ + self::ATTESTATION_FORMAT_UNSPECIFIED => 'ATTESTATION_FORMAT_UNSPECIFIED', + self::CAVIUM_V1_COMPRESSED => 'CAVIUM_V1_COMPRESSED', + self::CAVIUM_V2_COMPRESSED => 'CAVIUM_V2_COMPRESSED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(AttestationFormat::class, \Google\Cloud\Kms\V1\KeyOperationAttestation_AttestationFormat::class); + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyOperationAttestation/CertificateChains.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyOperationAttestation/CertificateChains.php new file mode 100644 index 000000000000..b1eef375ad42 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyOperationAttestation/CertificateChains.php @@ -0,0 +1,140 @@ +google.cloud.kms.v1.KeyOperationAttestation.CertificateChains + */ +class CertificateChains extends \Google\Protobuf\Internal\Message +{ + /** + * Cavium certificate chain corresponding to the attestation. + * + * Generated from protobuf field repeated string cavium_certs = 1; + */ + private $cavium_certs; + /** + * Google card certificate chain corresponding to the attestation. + * + * Generated from protobuf field repeated string google_card_certs = 2; + */ + private $google_card_certs; + /** + * Google partition certificate chain corresponding to the attestation. + * + * Generated from protobuf field repeated string google_partition_certs = 3; + */ + private $google_partition_certs; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $cavium_certs + * Cavium certificate chain corresponding to the attestation. + * @type array|\Google\Protobuf\Internal\RepeatedField $google_card_certs + * Google card certificate chain corresponding to the attestation. + * @type array|\Google\Protobuf\Internal\RepeatedField $google_partition_certs + * Google partition certificate chain corresponding to the attestation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Cavium certificate chain corresponding to the attestation. + * + * Generated from protobuf field repeated string cavium_certs = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCaviumCerts() + { + return $this->cavium_certs; + } + + /** + * Cavium certificate chain corresponding to the attestation. + * + * Generated from protobuf field repeated string cavium_certs = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCaviumCerts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->cavium_certs = $arr; + + return $this; + } + + /** + * Google card certificate chain corresponding to the attestation. + * + * Generated from protobuf field repeated string google_card_certs = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getGoogleCardCerts() + { + return $this->google_card_certs; + } + + /** + * Google card certificate chain corresponding to the attestation. + * + * Generated from protobuf field repeated string google_card_certs = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setGoogleCardCerts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->google_card_certs = $arr; + + return $this; + } + + /** + * Google partition certificate chain corresponding to the attestation. + * + * Generated from protobuf field repeated string google_partition_certs = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getGooglePartitionCerts() + { + return $this->google_partition_certs; + } + + /** + * Google partition certificate chain corresponding to the attestation. + * + * Generated from protobuf field repeated string google_partition_certs = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setGooglePartitionCerts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->google_partition_certs = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CertificateChains::class, \Google\Cloud\Kms\V1\KeyOperationAttestation_CertificateChains::class); + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyRing.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyRing.php new file mode 100644 index 000000000000..797fe8942e0b --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyRing.php @@ -0,0 +1,124 @@ +google.cloud.kms.v1.KeyRing + */ +class KeyRing extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The resource name for the + * [KeyRing][google.cloud.kms.v1.KeyRing] in the format + * `projects/*/locations/*/keyRings/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. The time at which this [KeyRing][google.cloud.kms.v1.KeyRing] + * was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The resource name for the + * [KeyRing][google.cloud.kms.v1.KeyRing] in the format + * `projects/*/locations/*/keyRings/*`. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time at which this [KeyRing][google.cloud.kms.v1.KeyRing] + * was created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The resource name for the + * [KeyRing][google.cloud.kms.v1.KeyRing] in the format + * `projects/*/locations/*/keyRings/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The resource name for the + * [KeyRing][google.cloud.kms.v1.KeyRing] in the format + * `projects/*/locations/*/keyRings/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The time at which this [KeyRing][google.cloud.kms.v1.KeyRing] + * was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time at which this [KeyRing][google.cloud.kms.v1.KeyRing] + * was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListCryptoKeyVersionsRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListCryptoKeyVersionsRequest.php new file mode 100644 index 000000000000..b429f3ce2435 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListCryptoKeyVersionsRequest.php @@ -0,0 +1,314 @@ +google.cloud.kms.v1.ListCryptoKeyVersionsRequest + */ +class ListCryptoKeyVersionsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] to list, in the format + * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Optional limit on the number of + * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] to include in the + * response. Further [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] + * can subsequently be obtained by including the + * [ListCryptoKeyVersionsResponse.next_page_token][google.cloud.kms.v1.ListCryptoKeyVersionsResponse.next_page_token] + * in a subsequent request. If unspecified, the server will pick an + * appropriate default. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. Optional pagination token, returned earlier via + * [ListCryptoKeyVersionsResponse.next_page_token][google.cloud.kms.v1.ListCryptoKeyVersionsResponse.next_page_token]. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * The fields to include in the response. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionView view = 4; + */ + protected $view = 0; + /** + * 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). + * + * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * 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). + * + * Generated from protobuf field string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The resource name of the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] to list, in the format + * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. Please see + * {@see KeyManagementServiceClient::cryptoKeyName()} for help formatting this field. + * + * @return \Google\Cloud\Kms\V1\ListCryptoKeyVersionsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] to list, in the format + * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. + * @type int $page_size + * Optional. Optional limit on the number of + * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] to include in the + * response. Further [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] + * can subsequently be obtained by including the + * [ListCryptoKeyVersionsResponse.next_page_token][google.cloud.kms.v1.ListCryptoKeyVersionsResponse.next_page_token] + * in a subsequent request. If unspecified, the server will pick an + * appropriate default. + * @type string $page_token + * Optional. Optional pagination token, returned earlier via + * [ListCryptoKeyVersionsResponse.next_page_token][google.cloud.kms.v1.ListCryptoKeyVersionsResponse.next_page_token]. + * @type int $view + * The fields to include in the response. + * @type 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). + * @type string $order_by + * 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). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] to list, in the format + * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The resource name of the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] to list, in the format + * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. Optional limit on the number of + * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] to include in the + * response. Further [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] + * can subsequently be obtained by including the + * [ListCryptoKeyVersionsResponse.next_page_token][google.cloud.kms.v1.ListCryptoKeyVersionsResponse.next_page_token] + * in a subsequent request. If unspecified, the server will pick an + * appropriate default. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. Optional limit on the number of + * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] to include in the + * response. Further [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] + * can subsequently be obtained by including the + * [ListCryptoKeyVersionsResponse.next_page_token][google.cloud.kms.v1.ListCryptoKeyVersionsResponse.next_page_token] + * in a subsequent request. If unspecified, the server will pick an + * appropriate default. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. Optional pagination token, returned earlier via + * [ListCryptoKeyVersionsResponse.next_page_token][google.cloud.kms.v1.ListCryptoKeyVersionsResponse.next_page_token]. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. Optional pagination token, returned earlier via + * [ListCryptoKeyVersionsResponse.next_page_token][google.cloud.kms.v1.ListCryptoKeyVersionsResponse.next_page_token]. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * The fields to include in the response. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionView view = 4; + * @return int + */ + public function getView() + { + return $this->view; + } + + /** + * The fields to include in the response. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionView view = 4; + * @param int $var + * @return $this + */ + public function setView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\CryptoKeyVersion\CryptoKeyVersionView::class); + $this->view = $var; + + return $this; + } + + /** + * 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). + * + * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->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). + * + * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * 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). + * + * Generated from protobuf field string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * 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). + * + * Generated from protobuf field string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListCryptoKeyVersionsResponse.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListCryptoKeyVersionsResponse.php new file mode 100644 index 000000000000..5c7781143e8a --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListCryptoKeyVersionsResponse.php @@ -0,0 +1,164 @@ +google.cloud.kms.v1.ListCryptoKeyVersionsResponse + */ +class ListCryptoKeyVersionsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. + * + * Generated from protobuf field repeated .google.cloud.kms.v1.CryptoKeyVersion crypto_key_versions = 1; + */ + private $crypto_key_versions; + /** + * A token to retrieve next page of results. Pass this value in + * [ListCryptoKeyVersionsRequest.page_token][google.cloud.kms.v1.ListCryptoKeyVersionsRequest.page_token] + * to retrieve the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * The total number of + * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] that matched the + * query. + * This field is not populated if + * [ListCryptoKeyVersionsRequest.filter][google.cloud.kms.v1.ListCryptoKeyVersionsRequest.filter] + * is applied. + * + * Generated from protobuf field int32 total_size = 3; + */ + protected $total_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Kms\V1\CryptoKeyVersion>|\Google\Protobuf\Internal\RepeatedField $crypto_key_versions + * The list of [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. + * @type string $next_page_token + * A token to retrieve next page of results. Pass this value in + * [ListCryptoKeyVersionsRequest.page_token][google.cloud.kms.v1.ListCryptoKeyVersionsRequest.page_token] + * to retrieve the next page of results. + * @type int $total_size + * The total number of + * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] that matched the + * query. + * This field is not populated if + * [ListCryptoKeyVersionsRequest.filter][google.cloud.kms.v1.ListCryptoKeyVersionsRequest.filter] + * is applied. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * The list of [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. + * + * Generated from protobuf field repeated .google.cloud.kms.v1.CryptoKeyVersion crypto_key_versions = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCryptoKeyVersions() + { + return $this->crypto_key_versions; + } + + /** + * The list of [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. + * + * Generated from protobuf field repeated .google.cloud.kms.v1.CryptoKeyVersion crypto_key_versions = 1; + * @param array<\Google\Cloud\Kms\V1\CryptoKeyVersion>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCryptoKeyVersions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Kms\V1\CryptoKeyVersion::class); + $this->crypto_key_versions = $arr; + + return $this; + } + + /** + * A token to retrieve next page of results. Pass this value in + * [ListCryptoKeyVersionsRequest.page_token][google.cloud.kms.v1.ListCryptoKeyVersionsRequest.page_token] + * to retrieve the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token to retrieve next page of results. Pass this value in + * [ListCryptoKeyVersionsRequest.page_token][google.cloud.kms.v1.ListCryptoKeyVersionsRequest.page_token] + * to retrieve the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * The total number of + * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] that matched the + * query. + * This field is not populated if + * [ListCryptoKeyVersionsRequest.filter][google.cloud.kms.v1.ListCryptoKeyVersionsRequest.filter] + * is applied. + * + * Generated from protobuf field int32 total_size = 3; + * @return int + */ + public function getTotalSize() + { + return $this->total_size; + } + + /** + * The total number of + * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] that matched the + * query. + * This field is not populated if + * [ListCryptoKeyVersionsRequest.filter][google.cloud.kms.v1.ListCryptoKeyVersionsRequest.filter] + * is applied. + * + * Generated from protobuf field int32 total_size = 3; + * @param int $var + * @return $this + */ + public function setTotalSize($var) + { + GPBUtil::checkInt32($var); + $this->total_size = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListCryptoKeysRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListCryptoKeysRequest.php new file mode 100644 index 000000000000..dc800232d1eb --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListCryptoKeysRequest.php @@ -0,0 +1,309 @@ +google.cloud.kms.v1.ListCryptoKeysRequest + */ +class ListCryptoKeysRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the [KeyRing][google.cloud.kms.v1.KeyRing] + * to list, in the format `projects/*/locations/*/keyRings/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Optional limit on the number of + * [CryptoKeys][google.cloud.kms.v1.CryptoKey] to include in the response. + * Further [CryptoKeys][google.cloud.kms.v1.CryptoKey] can subsequently be + * obtained by including the + * [ListCryptoKeysResponse.next_page_token][google.cloud.kms.v1.ListCryptoKeysResponse.next_page_token] + * in a subsequent request. If unspecified, the server will pick an + * appropriate default. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. Optional pagination token, returned earlier via + * [ListCryptoKeysResponse.next_page_token][google.cloud.kms.v1.ListCryptoKeysResponse.next_page_token]. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * The fields of the primary version to include in the response. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionView version_view = 4; + */ + protected $version_view = 0; + /** + * 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). + * + * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * 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). + * + * Generated from protobuf field string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The resource name of the [KeyRing][google.cloud.kms.v1.KeyRing] + * to list, in the format `projects/*/locations/*/keyRings/*`. Please see + * {@see KeyManagementServiceClient::keyRingName()} for help formatting this field. + * + * @return \Google\Cloud\Kms\V1\ListCryptoKeysRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the [KeyRing][google.cloud.kms.v1.KeyRing] + * to list, in the format `projects/*/locations/*/keyRings/*`. + * @type int $page_size + * Optional. Optional limit on the number of + * [CryptoKeys][google.cloud.kms.v1.CryptoKey] to include in the response. + * Further [CryptoKeys][google.cloud.kms.v1.CryptoKey] can subsequently be + * obtained by including the + * [ListCryptoKeysResponse.next_page_token][google.cloud.kms.v1.ListCryptoKeysResponse.next_page_token] + * in a subsequent request. If unspecified, the server will pick an + * appropriate default. + * @type string $page_token + * Optional. Optional pagination token, returned earlier via + * [ListCryptoKeysResponse.next_page_token][google.cloud.kms.v1.ListCryptoKeysResponse.next_page_token]. + * @type int $version_view + * The fields of the primary version to include in the response. + * @type 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). + * @type string $order_by + * 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). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the [KeyRing][google.cloud.kms.v1.KeyRing] + * to list, in the format `projects/*/locations/*/keyRings/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The resource name of the [KeyRing][google.cloud.kms.v1.KeyRing] + * to list, in the format `projects/*/locations/*/keyRings/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. Optional limit on the number of + * [CryptoKeys][google.cloud.kms.v1.CryptoKey] to include in the response. + * Further [CryptoKeys][google.cloud.kms.v1.CryptoKey] can subsequently be + * obtained by including the + * [ListCryptoKeysResponse.next_page_token][google.cloud.kms.v1.ListCryptoKeysResponse.next_page_token] + * in a subsequent request. If unspecified, the server will pick an + * appropriate default. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. Optional limit on the number of + * [CryptoKeys][google.cloud.kms.v1.CryptoKey] to include in the response. + * Further [CryptoKeys][google.cloud.kms.v1.CryptoKey] can subsequently be + * obtained by including the + * [ListCryptoKeysResponse.next_page_token][google.cloud.kms.v1.ListCryptoKeysResponse.next_page_token] + * in a subsequent request. If unspecified, the server will pick an + * appropriate default. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. Optional pagination token, returned earlier via + * [ListCryptoKeysResponse.next_page_token][google.cloud.kms.v1.ListCryptoKeysResponse.next_page_token]. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. Optional pagination token, returned earlier via + * [ListCryptoKeysResponse.next_page_token][google.cloud.kms.v1.ListCryptoKeysResponse.next_page_token]. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * The fields of the primary version to include in the response. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionView version_view = 4; + * @return int + */ + public function getVersionView() + { + return $this->version_view; + } + + /** + * The fields of the primary version to include in the response. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionView version_view = 4; + * @param int $var + * @return $this + */ + public function setVersionView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\CryptoKeyVersion\CryptoKeyVersionView::class); + $this->version_view = $var; + + return $this; + } + + /** + * 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). + * + * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->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). + * + * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * 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). + * + * Generated from protobuf field string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * 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). + * + * Generated from protobuf field string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListCryptoKeysResponse.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListCryptoKeysResponse.php new file mode 100644 index 000000000000..6ea2d282ad42 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListCryptoKeysResponse.php @@ -0,0 +1,160 @@ +google.cloud.kms.v1.ListCryptoKeysResponse + */ +class ListCryptoKeysResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of [CryptoKeys][google.cloud.kms.v1.CryptoKey]. + * + * Generated from protobuf field repeated .google.cloud.kms.v1.CryptoKey crypto_keys = 1; + */ + private $crypto_keys; + /** + * A token to retrieve next page of results. Pass this value in + * [ListCryptoKeysRequest.page_token][google.cloud.kms.v1.ListCryptoKeysRequest.page_token] + * to retrieve the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * The total number of [CryptoKeys][google.cloud.kms.v1.CryptoKey] that + * matched the query. + * This field is not populated if + * [ListCryptoKeysRequest.filter][google.cloud.kms.v1.ListCryptoKeysRequest.filter] + * is applied. + * + * Generated from protobuf field int32 total_size = 3; + */ + protected $total_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Kms\V1\CryptoKey>|\Google\Protobuf\Internal\RepeatedField $crypto_keys + * The list of [CryptoKeys][google.cloud.kms.v1.CryptoKey]. + * @type string $next_page_token + * A token to retrieve next page of results. Pass this value in + * [ListCryptoKeysRequest.page_token][google.cloud.kms.v1.ListCryptoKeysRequest.page_token] + * to retrieve the next page of results. + * @type int $total_size + * The total number of [CryptoKeys][google.cloud.kms.v1.CryptoKey] that + * matched the query. + * This field is not populated if + * [ListCryptoKeysRequest.filter][google.cloud.kms.v1.ListCryptoKeysRequest.filter] + * is applied. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * The list of [CryptoKeys][google.cloud.kms.v1.CryptoKey]. + * + * Generated from protobuf field repeated .google.cloud.kms.v1.CryptoKey crypto_keys = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCryptoKeys() + { + return $this->crypto_keys; + } + + /** + * The list of [CryptoKeys][google.cloud.kms.v1.CryptoKey]. + * + * Generated from protobuf field repeated .google.cloud.kms.v1.CryptoKey crypto_keys = 1; + * @param array<\Google\Cloud\Kms\V1\CryptoKey>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCryptoKeys($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Kms\V1\CryptoKey::class); + $this->crypto_keys = $arr; + + return $this; + } + + /** + * A token to retrieve next page of results. Pass this value in + * [ListCryptoKeysRequest.page_token][google.cloud.kms.v1.ListCryptoKeysRequest.page_token] + * to retrieve the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token to retrieve next page of results. Pass this value in + * [ListCryptoKeysRequest.page_token][google.cloud.kms.v1.ListCryptoKeysRequest.page_token] + * to retrieve the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * The total number of [CryptoKeys][google.cloud.kms.v1.CryptoKey] that + * matched the query. + * This field is not populated if + * [ListCryptoKeysRequest.filter][google.cloud.kms.v1.ListCryptoKeysRequest.filter] + * is applied. + * + * Generated from protobuf field int32 total_size = 3; + * @return int + */ + public function getTotalSize() + { + return $this->total_size; + } + + /** + * The total number of [CryptoKeys][google.cloud.kms.v1.CryptoKey] that + * matched the query. + * This field is not populated if + * [ListCryptoKeysRequest.filter][google.cloud.kms.v1.ListCryptoKeysRequest.filter] + * is applied. + * + * Generated from protobuf field int32 total_size = 3; + * @param int $var + * @return $this + */ + public function setTotalSize($var) + { + GPBUtil::checkInt32($var); + $this->total_size = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListEkmConnectionsRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListEkmConnectionsRequest.php new file mode 100644 index 000000000000..00bdce40d8da --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListEkmConnectionsRequest.php @@ -0,0 +1,280 @@ +google.cloud.kms.v1.ListEkmConnectionsRequest + */ +class ListEkmConnectionsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the location associated with the + * [EkmConnections][google.cloud.kms.v1.EkmConnection] to list, in the format + * `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Optional limit on the number of + * [EkmConnections][google.cloud.kms.v1.EkmConnection] to include in the + * response. Further [EkmConnections][google.cloud.kms.v1.EkmConnection] can + * subsequently be obtained by including the + * [ListEkmConnectionsResponse.next_page_token][google.cloud.kms.v1.ListEkmConnectionsResponse.next_page_token] + * in a subsequent request. If unspecified, the server will pick an + * appropriate default. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. Optional pagination token, returned earlier via + * [ListEkmConnectionsResponse.next_page_token][google.cloud.kms.v1.ListEkmConnectionsResponse.next_page_token]. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * 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). + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * 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). + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The resource name of the location associated with the + * [EkmConnections][google.cloud.kms.v1.EkmConnection] to list, in the format + * `projects/*/locations/*`. Please see + * {@see EkmServiceClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\Kms\V1\ListEkmConnectionsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the location associated with the + * [EkmConnections][google.cloud.kms.v1.EkmConnection] to list, in the format + * `projects/*/locations/*`. + * @type int $page_size + * Optional. Optional limit on the number of + * [EkmConnections][google.cloud.kms.v1.EkmConnection] to include in the + * response. Further [EkmConnections][google.cloud.kms.v1.EkmConnection] can + * subsequently be obtained by including the + * [ListEkmConnectionsResponse.next_page_token][google.cloud.kms.v1.ListEkmConnectionsResponse.next_page_token] + * in a subsequent request. If unspecified, the server will pick an + * appropriate default. + * @type string $page_token + * Optional. Optional pagination token, returned earlier via + * [ListEkmConnectionsResponse.next_page_token][google.cloud.kms.v1.ListEkmConnectionsResponse.next_page_token]. + * @type 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). + * @type string $order_by + * 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). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\EkmService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the location associated with the + * [EkmConnections][google.cloud.kms.v1.EkmConnection] to list, in the format + * `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The resource name of the location associated with the + * [EkmConnections][google.cloud.kms.v1.EkmConnection] to list, in the format + * `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. Optional limit on the number of + * [EkmConnections][google.cloud.kms.v1.EkmConnection] to include in the + * response. Further [EkmConnections][google.cloud.kms.v1.EkmConnection] can + * subsequently be obtained by including the + * [ListEkmConnectionsResponse.next_page_token][google.cloud.kms.v1.ListEkmConnectionsResponse.next_page_token] + * in a subsequent request. If unspecified, the server will pick an + * appropriate default. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. Optional limit on the number of + * [EkmConnections][google.cloud.kms.v1.EkmConnection] to include in the + * response. Further [EkmConnections][google.cloud.kms.v1.EkmConnection] can + * subsequently be obtained by including the + * [ListEkmConnectionsResponse.next_page_token][google.cloud.kms.v1.ListEkmConnectionsResponse.next_page_token] + * in a subsequent request. If unspecified, the server will pick an + * appropriate default. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. Optional pagination token, returned earlier via + * [ListEkmConnectionsResponse.next_page_token][google.cloud.kms.v1.ListEkmConnectionsResponse.next_page_token]. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. Optional pagination token, returned earlier via + * [ListEkmConnectionsResponse.next_page_token][google.cloud.kms.v1.ListEkmConnectionsResponse.next_page_token]. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * 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). + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->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). + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * 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). + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * 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). + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListEkmConnectionsResponse.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListEkmConnectionsResponse.php new file mode 100644 index 000000000000..2273176dd077 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListEkmConnectionsResponse.php @@ -0,0 +1,160 @@ +google.cloud.kms.v1.ListEkmConnectionsResponse + */ +class ListEkmConnectionsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of [EkmConnections][google.cloud.kms.v1.EkmConnection]. + * + * Generated from protobuf field repeated .google.cloud.kms.v1.EkmConnection ekm_connections = 1; + */ + private $ekm_connections; + /** + * A token to retrieve next page of results. Pass this value in + * [ListEkmConnectionsRequest.page_token][google.cloud.kms.v1.ListEkmConnectionsRequest.page_token] + * to retrieve the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * The total number of [EkmConnections][google.cloud.kms.v1.EkmConnection] + * that matched the query. + * This field is not populated if + * [ListEkmConnectionsRequest.filter][google.cloud.kms.v1.ListEkmConnectionsRequest.filter] + * is applied. + * + * Generated from protobuf field int32 total_size = 3; + */ + protected $total_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Kms\V1\EkmConnection>|\Google\Protobuf\Internal\RepeatedField $ekm_connections + * The list of [EkmConnections][google.cloud.kms.v1.EkmConnection]. + * @type string $next_page_token + * A token to retrieve next page of results. Pass this value in + * [ListEkmConnectionsRequest.page_token][google.cloud.kms.v1.ListEkmConnectionsRequest.page_token] + * to retrieve the next page of results. + * @type int $total_size + * The total number of [EkmConnections][google.cloud.kms.v1.EkmConnection] + * that matched the query. + * This field is not populated if + * [ListEkmConnectionsRequest.filter][google.cloud.kms.v1.ListEkmConnectionsRequest.filter] + * is applied. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\EkmService::initOnce(); + parent::__construct($data); + } + + /** + * The list of [EkmConnections][google.cloud.kms.v1.EkmConnection]. + * + * Generated from protobuf field repeated .google.cloud.kms.v1.EkmConnection ekm_connections = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEkmConnections() + { + return $this->ekm_connections; + } + + /** + * The list of [EkmConnections][google.cloud.kms.v1.EkmConnection]. + * + * Generated from protobuf field repeated .google.cloud.kms.v1.EkmConnection ekm_connections = 1; + * @param array<\Google\Cloud\Kms\V1\EkmConnection>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEkmConnections($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Kms\V1\EkmConnection::class); + $this->ekm_connections = $arr; + + return $this; + } + + /** + * A token to retrieve next page of results. Pass this value in + * [ListEkmConnectionsRequest.page_token][google.cloud.kms.v1.ListEkmConnectionsRequest.page_token] + * to retrieve the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token to retrieve next page of results. Pass this value in + * [ListEkmConnectionsRequest.page_token][google.cloud.kms.v1.ListEkmConnectionsRequest.page_token] + * to retrieve the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * The total number of [EkmConnections][google.cloud.kms.v1.EkmConnection] + * that matched the query. + * This field is not populated if + * [ListEkmConnectionsRequest.filter][google.cloud.kms.v1.ListEkmConnectionsRequest.filter] + * is applied. + * + * Generated from protobuf field int32 total_size = 3; + * @return int + */ + public function getTotalSize() + { + return $this->total_size; + } + + /** + * The total number of [EkmConnections][google.cloud.kms.v1.EkmConnection] + * that matched the query. + * This field is not populated if + * [ListEkmConnectionsRequest.filter][google.cloud.kms.v1.ListEkmConnectionsRequest.filter] + * is applied. + * + * Generated from protobuf field int32 total_size = 3; + * @param int $var + * @return $this + */ + public function setTotalSize($var) + { + GPBUtil::checkInt32($var); + $this->total_size = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListImportJobsRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListImportJobsRequest.php new file mode 100644 index 000000000000..463eb5440cc1 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListImportJobsRequest.php @@ -0,0 +1,275 @@ +google.cloud.kms.v1.ListImportJobsRequest + */ +class ListImportJobsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the [KeyRing][google.cloud.kms.v1.KeyRing] + * to list, in the format `projects/*/locations/*/keyRings/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Optional limit on the number of + * [ImportJobs][google.cloud.kms.v1.ImportJob] to include in the response. + * Further [ImportJobs][google.cloud.kms.v1.ImportJob] can subsequently be + * obtained by including the + * [ListImportJobsResponse.next_page_token][google.cloud.kms.v1.ListImportJobsResponse.next_page_token] + * in a subsequent request. If unspecified, the server will pick an + * appropriate default. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. Optional pagination token, returned earlier via + * [ListImportJobsResponse.next_page_token][google.cloud.kms.v1.ListImportJobsResponse.next_page_token]. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * 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). + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * 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). + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The resource name of the [KeyRing][google.cloud.kms.v1.KeyRing] + * to list, in the format `projects/*/locations/*/keyRings/*`. Please see + * {@see KeyManagementServiceClient::keyRingName()} for help formatting this field. + * + * @return \Google\Cloud\Kms\V1\ListImportJobsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the [KeyRing][google.cloud.kms.v1.KeyRing] + * to list, in the format `projects/*/locations/*/keyRings/*`. + * @type int $page_size + * Optional. Optional limit on the number of + * [ImportJobs][google.cloud.kms.v1.ImportJob] to include in the response. + * Further [ImportJobs][google.cloud.kms.v1.ImportJob] can subsequently be + * obtained by including the + * [ListImportJobsResponse.next_page_token][google.cloud.kms.v1.ListImportJobsResponse.next_page_token] + * in a subsequent request. If unspecified, the server will pick an + * appropriate default. + * @type string $page_token + * Optional. Optional pagination token, returned earlier via + * [ListImportJobsResponse.next_page_token][google.cloud.kms.v1.ListImportJobsResponse.next_page_token]. + * @type 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). + * @type string $order_by + * 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). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the [KeyRing][google.cloud.kms.v1.KeyRing] + * to list, in the format `projects/*/locations/*/keyRings/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The resource name of the [KeyRing][google.cloud.kms.v1.KeyRing] + * to list, in the format `projects/*/locations/*/keyRings/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. Optional limit on the number of + * [ImportJobs][google.cloud.kms.v1.ImportJob] to include in the response. + * Further [ImportJobs][google.cloud.kms.v1.ImportJob] can subsequently be + * obtained by including the + * [ListImportJobsResponse.next_page_token][google.cloud.kms.v1.ListImportJobsResponse.next_page_token] + * in a subsequent request. If unspecified, the server will pick an + * appropriate default. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. Optional limit on the number of + * [ImportJobs][google.cloud.kms.v1.ImportJob] to include in the response. + * Further [ImportJobs][google.cloud.kms.v1.ImportJob] can subsequently be + * obtained by including the + * [ListImportJobsResponse.next_page_token][google.cloud.kms.v1.ListImportJobsResponse.next_page_token] + * in a subsequent request. If unspecified, the server will pick an + * appropriate default. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. Optional pagination token, returned earlier via + * [ListImportJobsResponse.next_page_token][google.cloud.kms.v1.ListImportJobsResponse.next_page_token]. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. Optional pagination token, returned earlier via + * [ListImportJobsResponse.next_page_token][google.cloud.kms.v1.ListImportJobsResponse.next_page_token]. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * 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). + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->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). + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * 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). + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * 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). + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListImportJobsResponse.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListImportJobsResponse.php new file mode 100644 index 000000000000..aa2597e9f7ed --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListImportJobsResponse.php @@ -0,0 +1,160 @@ +google.cloud.kms.v1.ListImportJobsResponse + */ +class ListImportJobsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of [ImportJobs][google.cloud.kms.v1.ImportJob]. + * + * Generated from protobuf field repeated .google.cloud.kms.v1.ImportJob import_jobs = 1; + */ + private $import_jobs; + /** + * A token to retrieve next page of results. Pass this value in + * [ListImportJobsRequest.page_token][google.cloud.kms.v1.ListImportJobsRequest.page_token] + * to retrieve the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * The total number of [ImportJobs][google.cloud.kms.v1.ImportJob] that + * matched the query. + * This field is not populated if + * [ListImportJobsRequest.filter][google.cloud.kms.v1.ListImportJobsRequest.filter] + * is applied. + * + * Generated from protobuf field int32 total_size = 3; + */ + protected $total_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Kms\V1\ImportJob>|\Google\Protobuf\Internal\RepeatedField $import_jobs + * The list of [ImportJobs][google.cloud.kms.v1.ImportJob]. + * @type string $next_page_token + * A token to retrieve next page of results. Pass this value in + * [ListImportJobsRequest.page_token][google.cloud.kms.v1.ListImportJobsRequest.page_token] + * to retrieve the next page of results. + * @type int $total_size + * The total number of [ImportJobs][google.cloud.kms.v1.ImportJob] that + * matched the query. + * This field is not populated if + * [ListImportJobsRequest.filter][google.cloud.kms.v1.ListImportJobsRequest.filter] + * is applied. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * The list of [ImportJobs][google.cloud.kms.v1.ImportJob]. + * + * Generated from protobuf field repeated .google.cloud.kms.v1.ImportJob import_jobs = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getImportJobs() + { + return $this->import_jobs; + } + + /** + * The list of [ImportJobs][google.cloud.kms.v1.ImportJob]. + * + * Generated from protobuf field repeated .google.cloud.kms.v1.ImportJob import_jobs = 1; + * @param array<\Google\Cloud\Kms\V1\ImportJob>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setImportJobs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Kms\V1\ImportJob::class); + $this->import_jobs = $arr; + + return $this; + } + + /** + * A token to retrieve next page of results. Pass this value in + * [ListImportJobsRequest.page_token][google.cloud.kms.v1.ListImportJobsRequest.page_token] + * to retrieve the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token to retrieve next page of results. Pass this value in + * [ListImportJobsRequest.page_token][google.cloud.kms.v1.ListImportJobsRequest.page_token] + * to retrieve the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * The total number of [ImportJobs][google.cloud.kms.v1.ImportJob] that + * matched the query. + * This field is not populated if + * [ListImportJobsRequest.filter][google.cloud.kms.v1.ListImportJobsRequest.filter] + * is applied. + * + * Generated from protobuf field int32 total_size = 3; + * @return int + */ + public function getTotalSize() + { + return $this->total_size; + } + + /** + * The total number of [ImportJobs][google.cloud.kms.v1.ImportJob] that + * matched the query. + * This field is not populated if + * [ListImportJobsRequest.filter][google.cloud.kms.v1.ListImportJobsRequest.filter] + * is applied. + * + * Generated from protobuf field int32 total_size = 3; + * @param int $var + * @return $this + */ + public function setTotalSize($var) + { + GPBUtil::checkInt32($var); + $this->total_size = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListKeyHandlesRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListKeyHandlesRequest.php new file mode 100644 index 000000000000..c294c8dedd23 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListKeyHandlesRequest.php @@ -0,0 +1,234 @@ +google.cloud.kms.v1.ListKeyHandlesRequest + */ +class ListKeyHandlesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the resource project and location from which to list + * [KeyHandles][google.cloud.kms.v1.KeyHandle], e.g. + * `projects/{PROJECT_ID}/locations/{LOCATION}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Optional limit on the number of + * [KeyHandles][google.cloud.kms.v1.KeyHandle] to include in the response. The + * service may return fewer than this value. Further + * [KeyHandles][google.cloud.kms.v1.KeyHandle] can subsequently be obtained by + * including the + * [ListKeyHandlesResponse.next_page_token][google.cloud.kms.v1.ListKeyHandlesResponse.next_page_token] + * in a subsequent request. If unspecified, at most 100 + * [KeyHandles][google.cloud.kms.v1.KeyHandle] will be returned. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. Optional pagination token, returned earlier via + * [ListKeyHandlesResponse.next_page_token][google.cloud.kms.v1.ListKeyHandlesResponse.next_page_token]. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. Filter to apply when listing + * [KeyHandles][google.cloud.kms.v1.KeyHandle], e.g. + * `resource_type_selector="{SERVICE}.googleapis.com/{TYPE}"`. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + + /** + * @param string $parent Required. Name of the resource project and location from which to list + * [KeyHandles][google.cloud.kms.v1.KeyHandle], e.g. + * `projects/{PROJECT_ID}/locations/{LOCATION}`. Please see + * {@see AutokeyClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\Kms\V1\ListKeyHandlesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Name of the resource project and location from which to list + * [KeyHandles][google.cloud.kms.v1.KeyHandle], e.g. + * `projects/{PROJECT_ID}/locations/{LOCATION}`. + * @type int $page_size + * Optional. Optional limit on the number of + * [KeyHandles][google.cloud.kms.v1.KeyHandle] to include in the response. The + * service may return fewer than this value. Further + * [KeyHandles][google.cloud.kms.v1.KeyHandle] can subsequently be obtained by + * including the + * [ListKeyHandlesResponse.next_page_token][google.cloud.kms.v1.ListKeyHandlesResponse.next_page_token] + * in a subsequent request. If unspecified, at most 100 + * [KeyHandles][google.cloud.kms.v1.KeyHandle] will be returned. + * @type string $page_token + * Optional. Optional pagination token, returned earlier via + * [ListKeyHandlesResponse.next_page_token][google.cloud.kms.v1.ListKeyHandlesResponse.next_page_token]. + * @type string $filter + * Optional. Filter to apply when listing + * [KeyHandles][google.cloud.kms.v1.KeyHandle], e.g. + * `resource_type_selector="{SERVICE}.googleapis.com/{TYPE}"`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Autokey::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the resource project and location from which to list + * [KeyHandles][google.cloud.kms.v1.KeyHandle], e.g. + * `projects/{PROJECT_ID}/locations/{LOCATION}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Name of the resource project and location from which to list + * [KeyHandles][google.cloud.kms.v1.KeyHandle], e.g. + * `projects/{PROJECT_ID}/locations/{LOCATION}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. Optional limit on the number of + * [KeyHandles][google.cloud.kms.v1.KeyHandle] to include in the response. The + * service may return fewer than this value. Further + * [KeyHandles][google.cloud.kms.v1.KeyHandle] can subsequently be obtained by + * including the + * [ListKeyHandlesResponse.next_page_token][google.cloud.kms.v1.ListKeyHandlesResponse.next_page_token] + * in a subsequent request. If unspecified, at most 100 + * [KeyHandles][google.cloud.kms.v1.KeyHandle] will be returned. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. Optional limit on the number of + * [KeyHandles][google.cloud.kms.v1.KeyHandle] to include in the response. The + * service may return fewer than this value. Further + * [KeyHandles][google.cloud.kms.v1.KeyHandle] can subsequently be obtained by + * including the + * [ListKeyHandlesResponse.next_page_token][google.cloud.kms.v1.ListKeyHandlesResponse.next_page_token] + * in a subsequent request. If unspecified, at most 100 + * [KeyHandles][google.cloud.kms.v1.KeyHandle] will be returned. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. Optional pagination token, returned earlier via + * [ListKeyHandlesResponse.next_page_token][google.cloud.kms.v1.ListKeyHandlesResponse.next_page_token]. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. Optional pagination token, returned earlier via + * [ListKeyHandlesResponse.next_page_token][google.cloud.kms.v1.ListKeyHandlesResponse.next_page_token]. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. Filter to apply when listing + * [KeyHandles][google.cloud.kms.v1.KeyHandle], e.g. + * `resource_type_selector="{SERVICE}.googleapis.com/{TYPE}"`. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Filter to apply when listing + * [KeyHandles][google.cloud.kms.v1.KeyHandle], e.g. + * `resource_type_selector="{SERVICE}.googleapis.com/{TYPE}"`. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListKeyHandlesResponse.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListKeyHandlesResponse.php new file mode 100644 index 000000000000..eed5fc43ccb1 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListKeyHandlesResponse.php @@ -0,0 +1,110 @@ +google.cloud.kms.v1.ListKeyHandlesResponse + */ +class ListKeyHandlesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Resulting [KeyHandles][google.cloud.kms.v1.KeyHandle]. + * + * Generated from protobuf field repeated .google.cloud.kms.v1.KeyHandle key_handles = 1; + */ + private $key_handles; + /** + * A token to retrieve next page of results. Pass this value in + * [ListKeyHandlesRequest.page_token][google.cloud.kms.v1.ListKeyHandlesRequest.page_token] + * to retrieve the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Kms\V1\KeyHandle>|\Google\Protobuf\Internal\RepeatedField $key_handles + * Resulting [KeyHandles][google.cloud.kms.v1.KeyHandle]. + * @type string $next_page_token + * A token to retrieve next page of results. Pass this value in + * [ListKeyHandlesRequest.page_token][google.cloud.kms.v1.ListKeyHandlesRequest.page_token] + * to retrieve the next page of results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Autokey::initOnce(); + parent::__construct($data); + } + + /** + * Resulting [KeyHandles][google.cloud.kms.v1.KeyHandle]. + * + * Generated from protobuf field repeated .google.cloud.kms.v1.KeyHandle key_handles = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getKeyHandles() + { + return $this->key_handles; + } + + /** + * Resulting [KeyHandles][google.cloud.kms.v1.KeyHandle]. + * + * Generated from protobuf field repeated .google.cloud.kms.v1.KeyHandle key_handles = 1; + * @param array<\Google\Cloud\Kms\V1\KeyHandle>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setKeyHandles($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Kms\V1\KeyHandle::class); + $this->key_handles = $arr; + + return $this; + } + + /** + * A token to retrieve next page of results. Pass this value in + * [ListKeyHandlesRequest.page_token][google.cloud.kms.v1.ListKeyHandlesRequest.page_token] + * to retrieve the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token to retrieve next page of results. Pass this value in + * [ListKeyHandlesRequest.page_token][google.cloud.kms.v1.ListKeyHandlesRequest.page_token] + * to retrieve the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListKeyRingsRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListKeyRingsRequest.php new file mode 100644 index 000000000000..5f2032f8741e --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListKeyRingsRequest.php @@ -0,0 +1,280 @@ +google.cloud.kms.v1.ListKeyRingsRequest + */ +class ListKeyRingsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the location associated with the + * [KeyRings][google.cloud.kms.v1.KeyRing], in the format + * `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Optional limit on the number of + * [KeyRings][google.cloud.kms.v1.KeyRing] to include in the response. Further + * [KeyRings][google.cloud.kms.v1.KeyRing] can subsequently be obtained by + * including the + * [ListKeyRingsResponse.next_page_token][google.cloud.kms.v1.ListKeyRingsResponse.next_page_token] + * in a subsequent request. If unspecified, the server will pick an + * appropriate default. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. Optional pagination token, returned earlier via + * [ListKeyRingsResponse.next_page_token][google.cloud.kms.v1.ListKeyRingsResponse.next_page_token]. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * 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). + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * 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). + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The resource name of the location associated with the + * [KeyRings][google.cloud.kms.v1.KeyRing], in the format + * `projects/*/locations/*`. Please see + * {@see KeyManagementServiceClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\Kms\V1\ListKeyRingsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the location associated with the + * [KeyRings][google.cloud.kms.v1.KeyRing], in the format + * `projects/*/locations/*`. + * @type int $page_size + * Optional. Optional limit on the number of + * [KeyRings][google.cloud.kms.v1.KeyRing] to include in the response. Further + * [KeyRings][google.cloud.kms.v1.KeyRing] can subsequently be obtained by + * including the + * [ListKeyRingsResponse.next_page_token][google.cloud.kms.v1.ListKeyRingsResponse.next_page_token] + * in a subsequent request. If unspecified, the server will pick an + * appropriate default. + * @type string $page_token + * Optional. Optional pagination token, returned earlier via + * [ListKeyRingsResponse.next_page_token][google.cloud.kms.v1.ListKeyRingsResponse.next_page_token]. + * @type 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). + * @type string $order_by + * 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). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the location associated with the + * [KeyRings][google.cloud.kms.v1.KeyRing], in the format + * `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The resource name of the location associated with the + * [KeyRings][google.cloud.kms.v1.KeyRing], in the format + * `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. Optional limit on the number of + * [KeyRings][google.cloud.kms.v1.KeyRing] to include in the response. Further + * [KeyRings][google.cloud.kms.v1.KeyRing] can subsequently be obtained by + * including the + * [ListKeyRingsResponse.next_page_token][google.cloud.kms.v1.ListKeyRingsResponse.next_page_token] + * in a subsequent request. If unspecified, the server will pick an + * appropriate default. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. Optional limit on the number of + * [KeyRings][google.cloud.kms.v1.KeyRing] to include in the response. Further + * [KeyRings][google.cloud.kms.v1.KeyRing] can subsequently be obtained by + * including the + * [ListKeyRingsResponse.next_page_token][google.cloud.kms.v1.ListKeyRingsResponse.next_page_token] + * in a subsequent request. If unspecified, the server will pick an + * appropriate default. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. Optional pagination token, returned earlier via + * [ListKeyRingsResponse.next_page_token][google.cloud.kms.v1.ListKeyRingsResponse.next_page_token]. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. Optional pagination token, returned earlier via + * [ListKeyRingsResponse.next_page_token][google.cloud.kms.v1.ListKeyRingsResponse.next_page_token]. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * 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). + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->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). + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * 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). + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * 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). + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListKeyRingsResponse.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListKeyRingsResponse.php new file mode 100644 index 000000000000..409bf1a82c50 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListKeyRingsResponse.php @@ -0,0 +1,160 @@ +google.cloud.kms.v1.ListKeyRingsResponse + */ +class ListKeyRingsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of [KeyRings][google.cloud.kms.v1.KeyRing]. + * + * Generated from protobuf field repeated .google.cloud.kms.v1.KeyRing key_rings = 1; + */ + private $key_rings; + /** + * A token to retrieve next page of results. Pass this value in + * [ListKeyRingsRequest.page_token][google.cloud.kms.v1.ListKeyRingsRequest.page_token] + * to retrieve the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * The total number of [KeyRings][google.cloud.kms.v1.KeyRing] that matched + * the query. + * This field is not populated if + * [ListKeyRingsRequest.filter][google.cloud.kms.v1.ListKeyRingsRequest.filter] + * is applied. + * + * Generated from protobuf field int32 total_size = 3; + */ + protected $total_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Kms\V1\KeyRing>|\Google\Protobuf\Internal\RepeatedField $key_rings + * The list of [KeyRings][google.cloud.kms.v1.KeyRing]. + * @type string $next_page_token + * A token to retrieve next page of results. Pass this value in + * [ListKeyRingsRequest.page_token][google.cloud.kms.v1.ListKeyRingsRequest.page_token] + * to retrieve the next page of results. + * @type int $total_size + * The total number of [KeyRings][google.cloud.kms.v1.KeyRing] that matched + * the query. + * This field is not populated if + * [ListKeyRingsRequest.filter][google.cloud.kms.v1.ListKeyRingsRequest.filter] + * is applied. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * The list of [KeyRings][google.cloud.kms.v1.KeyRing]. + * + * Generated from protobuf field repeated .google.cloud.kms.v1.KeyRing key_rings = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getKeyRings() + { + return $this->key_rings; + } + + /** + * The list of [KeyRings][google.cloud.kms.v1.KeyRing]. + * + * Generated from protobuf field repeated .google.cloud.kms.v1.KeyRing key_rings = 1; + * @param array<\Google\Cloud\Kms\V1\KeyRing>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setKeyRings($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Kms\V1\KeyRing::class); + $this->key_rings = $arr; + + return $this; + } + + /** + * A token to retrieve next page of results. Pass this value in + * [ListKeyRingsRequest.page_token][google.cloud.kms.v1.ListKeyRingsRequest.page_token] + * to retrieve the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token to retrieve next page of results. Pass this value in + * [ListKeyRingsRequest.page_token][google.cloud.kms.v1.ListKeyRingsRequest.page_token] + * to retrieve the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * The total number of [KeyRings][google.cloud.kms.v1.KeyRing] that matched + * the query. + * This field is not populated if + * [ListKeyRingsRequest.filter][google.cloud.kms.v1.ListKeyRingsRequest.filter] + * is applied. + * + * Generated from protobuf field int32 total_size = 3; + * @return int + */ + public function getTotalSize() + { + return $this->total_size; + } + + /** + * The total number of [KeyRings][google.cloud.kms.v1.KeyRing] that matched + * the query. + * This field is not populated if + * [ListKeyRingsRequest.filter][google.cloud.kms.v1.ListKeyRingsRequest.filter] + * is applied. + * + * Generated from protobuf field int32 total_size = 3; + * @param int $var + * @return $this + */ + public function setTotalSize($var) + { + GPBUtil::checkInt32($var); + $this->total_size = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListRetiredResourcesRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListRetiredResourcesRequest.php new file mode 100644 index 000000000000..f681a968b70c --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListRetiredResourcesRequest.php @@ -0,0 +1,192 @@ +google.cloud.kms.v1.ListRetiredResourcesRequest + */ +class ListRetiredResourcesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project-specific location holding the + * [RetiredResources][google.cloud.kms.v1.RetiredResource], in the format + * `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Optional limit on the number of + * [RetiredResources][google.cloud.kms.v1.RetiredResource] to be included in + * the response. Further + * [RetiredResources][google.cloud.kms.v1.RetiredResource] can subsequently be + * obtained by including the + * [ListRetiredResourcesResponse.next_page_token][google.cloud.kms.v1.ListRetiredResourcesResponse.next_page_token] + * in a subsequent request. If unspecified, the server will pick an + * appropriate default. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. Optional pagination token, returned earlier via + * [ListRetiredResourcesResponse.next_page_token][google.cloud.kms.v1.ListRetiredResourcesResponse.next_page_token]. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The project-specific location holding the + * [RetiredResources][google.cloud.kms.v1.RetiredResource], in the format + * `projects/*/locations/*`. Please see + * {@see KeyManagementServiceClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\Kms\V1\ListRetiredResourcesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project-specific location holding the + * [RetiredResources][google.cloud.kms.v1.RetiredResource], in the format + * `projects/*/locations/*`. + * @type int $page_size + * Optional. Optional limit on the number of + * [RetiredResources][google.cloud.kms.v1.RetiredResource] to be included in + * the response. Further + * [RetiredResources][google.cloud.kms.v1.RetiredResource] can subsequently be + * obtained by including the + * [ListRetiredResourcesResponse.next_page_token][google.cloud.kms.v1.ListRetiredResourcesResponse.next_page_token] + * in a subsequent request. If unspecified, the server will pick an + * appropriate default. + * @type string $page_token + * Optional. Optional pagination token, returned earlier via + * [ListRetiredResourcesResponse.next_page_token][google.cloud.kms.v1.ListRetiredResourcesResponse.next_page_token]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project-specific location holding the + * [RetiredResources][google.cloud.kms.v1.RetiredResource], in the format + * `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The project-specific location holding the + * [RetiredResources][google.cloud.kms.v1.RetiredResource], in the format + * `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. Optional limit on the number of + * [RetiredResources][google.cloud.kms.v1.RetiredResource] to be included in + * the response. Further + * [RetiredResources][google.cloud.kms.v1.RetiredResource] can subsequently be + * obtained by including the + * [ListRetiredResourcesResponse.next_page_token][google.cloud.kms.v1.ListRetiredResourcesResponse.next_page_token] + * in a subsequent request. If unspecified, the server will pick an + * appropriate default. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. Optional limit on the number of + * [RetiredResources][google.cloud.kms.v1.RetiredResource] to be included in + * the response. Further + * [RetiredResources][google.cloud.kms.v1.RetiredResource] can subsequently be + * obtained by including the + * [ListRetiredResourcesResponse.next_page_token][google.cloud.kms.v1.ListRetiredResourcesResponse.next_page_token] + * in a subsequent request. If unspecified, the server will pick an + * appropriate default. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. Optional pagination token, returned earlier via + * [ListRetiredResourcesResponse.next_page_token][google.cloud.kms.v1.ListRetiredResourcesResponse.next_page_token]. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. Optional pagination token, returned earlier via + * [ListRetiredResourcesResponse.next_page_token][google.cloud.kms.v1.ListRetiredResourcesResponse.next_page_token]. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListRetiredResourcesResponse.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListRetiredResourcesResponse.php new file mode 100644 index 000000000000..6e8ef34aaec6 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListRetiredResourcesResponse.php @@ -0,0 +1,148 @@ +google.cloud.kms.v1.ListRetiredResourcesResponse + */ +class ListRetiredResourcesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of [RetiredResources][google.cloud.kms.v1.RetiredResource]. + * + * Generated from protobuf field repeated .google.cloud.kms.v1.RetiredResource retired_resources = 1; + */ + private $retired_resources; + /** + * A token to retrieve the next page of results. Pass this value in + * [ListRetiredResourcesRequest.page_token][google.cloud.kms.v1.ListRetiredResourcesRequest.page_token] + * to retrieve the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * The total number of [RetiredResources][google.cloud.kms.v1.RetiredResource] + * that matched the query. + * + * Generated from protobuf field int64 total_size = 3; + */ + protected $total_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Kms\V1\RetiredResource>|\Google\Protobuf\Internal\RepeatedField $retired_resources + * The list of [RetiredResources][google.cloud.kms.v1.RetiredResource]. + * @type string $next_page_token + * A token to retrieve the next page of results. Pass this value in + * [ListRetiredResourcesRequest.page_token][google.cloud.kms.v1.ListRetiredResourcesRequest.page_token] + * to retrieve the next page of results. + * @type int|string $total_size + * The total number of [RetiredResources][google.cloud.kms.v1.RetiredResource] + * that matched the query. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * The list of [RetiredResources][google.cloud.kms.v1.RetiredResource]. + * + * Generated from protobuf field repeated .google.cloud.kms.v1.RetiredResource retired_resources = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRetiredResources() + { + return $this->retired_resources; + } + + /** + * The list of [RetiredResources][google.cloud.kms.v1.RetiredResource]. + * + * Generated from protobuf field repeated .google.cloud.kms.v1.RetiredResource retired_resources = 1; + * @param array<\Google\Cloud\Kms\V1\RetiredResource>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRetiredResources($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Kms\V1\RetiredResource::class); + $this->retired_resources = $arr; + + return $this; + } + + /** + * A token to retrieve the next page of results. Pass this value in + * [ListRetiredResourcesRequest.page_token][google.cloud.kms.v1.ListRetiredResourcesRequest.page_token] + * to retrieve the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token to retrieve the next page of results. Pass this value in + * [ListRetiredResourcesRequest.page_token][google.cloud.kms.v1.ListRetiredResourcesRequest.page_token] + * to retrieve the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * The total number of [RetiredResources][google.cloud.kms.v1.RetiredResource] + * that matched the query. + * + * Generated from protobuf field int64 total_size = 3; + * @return int|string + */ + public function getTotalSize() + { + return $this->total_size; + } + + /** + * The total number of [RetiredResources][google.cloud.kms.v1.RetiredResource] + * that matched the query. + * + * Generated from protobuf field int64 total_size = 3; + * @param int|string $var + * @return $this + */ + public function setTotalSize($var) + { + GPBUtil::checkInt64($var); + $this->total_size = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListSingleTenantHsmInstanceProposalsRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListSingleTenantHsmInstanceProposalsRequest.php new file mode 100644 index 000000000000..b7fc1795d1cf --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListSingleTenantHsmInstanceProposalsRequest.php @@ -0,0 +1,339 @@ +google.cloud.kms.v1.ListSingleTenantHsmInstanceProposalsRequest + */ +class ListSingleTenantHsmInstanceProposalsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the single tenant HSM instance associated + * with the + * [SingleTenantHsmInstanceProposals][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * to list, in the format `projects/*/locations/*/singleTenantHsmInstances/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Optional limit on the number of + * [SingleTenantHsmInstanceProposals][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * to include in the response. Further + * [SingleTenantHsmInstanceProposals][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * can subsequently be obtained by including the + * [ListSingleTenantHsmInstanceProposalsResponse.next_page_token][google.cloud.kms.v1.ListSingleTenantHsmInstanceProposalsResponse.next_page_token] + * in a subsequent request. If unspecified, the server will pick an + * appropriate default. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. Optional pagination token, returned earlier via + * [ListSingleTenantHsmInstanceProposalsResponse.next_page_token][google.cloud.kms.v1.ListSingleTenantHsmInstanceProposalsResponse.next_page_token]. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * 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). + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * 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). + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + /** + * Optional. If set to true, + * [HsmManagement.ListSingleTenantHsmInstanceProposals][google.cloud.kms.v1.HsmManagement.ListSingleTenantHsmInstanceProposals] + * will also return + * [SingleTenantHsmInstanceProposals][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * in DELETED state. + * + * Generated from protobuf field bool show_deleted = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $show_deleted = false; + + /** + * @param string $parent Required. The resource name of the single tenant HSM instance associated + * with the + * [SingleTenantHsmInstanceProposals][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * to list, in the format `projects/*/locations/*/singleTenantHsmInstances/*`. Please see + * {@see HsmManagementClient::singleTenantHsmInstanceName()} for help formatting this field. + * + * @return \Google\Cloud\Kms\V1\ListSingleTenantHsmInstanceProposalsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the single tenant HSM instance associated + * with the + * [SingleTenantHsmInstanceProposals][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * to list, in the format `projects/*/locations/*/singleTenantHsmInstances/*`. + * @type int $page_size + * Optional. Optional limit on the number of + * [SingleTenantHsmInstanceProposals][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * to include in the response. Further + * [SingleTenantHsmInstanceProposals][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * can subsequently be obtained by including the + * [ListSingleTenantHsmInstanceProposalsResponse.next_page_token][google.cloud.kms.v1.ListSingleTenantHsmInstanceProposalsResponse.next_page_token] + * in a subsequent request. If unspecified, the server will pick an + * appropriate default. + * @type string $page_token + * Optional. Optional pagination token, returned earlier via + * [ListSingleTenantHsmInstanceProposalsResponse.next_page_token][google.cloud.kms.v1.ListSingleTenantHsmInstanceProposalsResponse.next_page_token]. + * @type 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). + * @type string $order_by + * 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). + * @type bool $show_deleted + * Optional. If set to true, + * [HsmManagement.ListSingleTenantHsmInstanceProposals][google.cloud.kms.v1.HsmManagement.ListSingleTenantHsmInstanceProposals] + * will also return + * [SingleTenantHsmInstanceProposals][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * in DELETED state. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\HsmManagement::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the single tenant HSM instance associated + * with the + * [SingleTenantHsmInstanceProposals][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * to list, in the format `projects/*/locations/*/singleTenantHsmInstances/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The resource name of the single tenant HSM instance associated + * with the + * [SingleTenantHsmInstanceProposals][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * to list, in the format `projects/*/locations/*/singleTenantHsmInstances/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. Optional limit on the number of + * [SingleTenantHsmInstanceProposals][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * to include in the response. Further + * [SingleTenantHsmInstanceProposals][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * can subsequently be obtained by including the + * [ListSingleTenantHsmInstanceProposalsResponse.next_page_token][google.cloud.kms.v1.ListSingleTenantHsmInstanceProposalsResponse.next_page_token] + * in a subsequent request. If unspecified, the server will pick an + * appropriate default. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. Optional limit on the number of + * [SingleTenantHsmInstanceProposals][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * to include in the response. Further + * [SingleTenantHsmInstanceProposals][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * can subsequently be obtained by including the + * [ListSingleTenantHsmInstanceProposalsResponse.next_page_token][google.cloud.kms.v1.ListSingleTenantHsmInstanceProposalsResponse.next_page_token] + * in a subsequent request. If unspecified, the server will pick an + * appropriate default. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. Optional pagination token, returned earlier via + * [ListSingleTenantHsmInstanceProposalsResponse.next_page_token][google.cloud.kms.v1.ListSingleTenantHsmInstanceProposalsResponse.next_page_token]. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. Optional pagination token, returned earlier via + * [ListSingleTenantHsmInstanceProposalsResponse.next_page_token][google.cloud.kms.v1.ListSingleTenantHsmInstanceProposalsResponse.next_page_token]. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * 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). + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->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). + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * 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). + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * 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). + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * Optional. If set to true, + * [HsmManagement.ListSingleTenantHsmInstanceProposals][google.cloud.kms.v1.HsmManagement.ListSingleTenantHsmInstanceProposals] + * will also return + * [SingleTenantHsmInstanceProposals][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * in DELETED state. + * + * Generated from protobuf field bool show_deleted = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getShowDeleted() + { + return $this->show_deleted; + } + + /** + * Optional. If set to true, + * [HsmManagement.ListSingleTenantHsmInstanceProposals][google.cloud.kms.v1.HsmManagement.ListSingleTenantHsmInstanceProposals] + * will also return + * [SingleTenantHsmInstanceProposals][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * in DELETED state. + * + * Generated from protobuf field bool show_deleted = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setShowDeleted($var) + { + GPBUtil::checkBool($var); + $this->show_deleted = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListSingleTenantHsmInstanceProposalsResponse.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListSingleTenantHsmInstanceProposalsResponse.php new file mode 100644 index 000000000000..35f4dd405206 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListSingleTenantHsmInstanceProposalsResponse.php @@ -0,0 +1,168 @@ +google.cloud.kms.v1.ListSingleTenantHsmInstanceProposalsResponse + */ +class ListSingleTenantHsmInstanceProposalsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of + * [SingleTenantHsmInstanceProposals][google.cloud.kms.v1.SingleTenantHsmInstanceProposal]. + * + * Generated from protobuf field repeated .google.cloud.kms.v1.SingleTenantHsmInstanceProposal single_tenant_hsm_instance_proposals = 1; + */ + private $single_tenant_hsm_instance_proposals; + /** + * A token to retrieve next page of results. Pass this value in + * [ListSingleTenantHsmInstanceProposalsRequest.page_token][google.cloud.kms.v1.ListSingleTenantHsmInstanceProposalsRequest.page_token] + * to retrieve the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * The total number of + * [SingleTenantHsmInstanceProposals][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * that matched the query. + * This field is not populated if + * [ListSingleTenantHsmInstanceProposalsRequest.filter][google.cloud.kms.v1.ListSingleTenantHsmInstanceProposalsRequest.filter] + * is applied. + * + * Generated from protobuf field int32 total_size = 3; + */ + protected $total_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal>|\Google\Protobuf\Internal\RepeatedField $single_tenant_hsm_instance_proposals + * The list of + * [SingleTenantHsmInstanceProposals][google.cloud.kms.v1.SingleTenantHsmInstanceProposal]. + * @type string $next_page_token + * A token to retrieve next page of results. Pass this value in + * [ListSingleTenantHsmInstanceProposalsRequest.page_token][google.cloud.kms.v1.ListSingleTenantHsmInstanceProposalsRequest.page_token] + * to retrieve the next page of results. + * @type int $total_size + * The total number of + * [SingleTenantHsmInstanceProposals][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * that matched the query. + * This field is not populated if + * [ListSingleTenantHsmInstanceProposalsRequest.filter][google.cloud.kms.v1.ListSingleTenantHsmInstanceProposalsRequest.filter] + * is applied. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\HsmManagement::initOnce(); + parent::__construct($data); + } + + /** + * The list of + * [SingleTenantHsmInstanceProposals][google.cloud.kms.v1.SingleTenantHsmInstanceProposal]. + * + * Generated from protobuf field repeated .google.cloud.kms.v1.SingleTenantHsmInstanceProposal single_tenant_hsm_instance_proposals = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSingleTenantHsmInstanceProposals() + { + return $this->single_tenant_hsm_instance_proposals; + } + + /** + * The list of + * [SingleTenantHsmInstanceProposals][google.cloud.kms.v1.SingleTenantHsmInstanceProposal]. + * + * Generated from protobuf field repeated .google.cloud.kms.v1.SingleTenantHsmInstanceProposal single_tenant_hsm_instance_proposals = 1; + * @param array<\Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSingleTenantHsmInstanceProposals($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal::class); + $this->single_tenant_hsm_instance_proposals = $arr; + + return $this; + } + + /** + * A token to retrieve next page of results. Pass this value in + * [ListSingleTenantHsmInstanceProposalsRequest.page_token][google.cloud.kms.v1.ListSingleTenantHsmInstanceProposalsRequest.page_token] + * to retrieve the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token to retrieve next page of results. Pass this value in + * [ListSingleTenantHsmInstanceProposalsRequest.page_token][google.cloud.kms.v1.ListSingleTenantHsmInstanceProposalsRequest.page_token] + * to retrieve the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * The total number of + * [SingleTenantHsmInstanceProposals][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * that matched the query. + * This field is not populated if + * [ListSingleTenantHsmInstanceProposalsRequest.filter][google.cloud.kms.v1.ListSingleTenantHsmInstanceProposalsRequest.filter] + * is applied. + * + * Generated from protobuf field int32 total_size = 3; + * @return int + */ + public function getTotalSize() + { + return $this->total_size; + } + + /** + * The total number of + * [SingleTenantHsmInstanceProposals][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * that matched the query. + * This field is not populated if + * [ListSingleTenantHsmInstanceProposalsRequest.filter][google.cloud.kms.v1.ListSingleTenantHsmInstanceProposalsRequest.filter] + * is applied. + * + * Generated from protobuf field int32 total_size = 3; + * @param int $var + * @return $this + */ + public function setTotalSize($var) + { + GPBUtil::checkInt32($var); + $this->total_size = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListSingleTenantHsmInstancesRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListSingleTenantHsmInstancesRequest.php new file mode 100644 index 000000000000..15cbcd4c0456 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListSingleTenantHsmInstancesRequest.php @@ -0,0 +1,338 @@ +google.cloud.kms.v1.ListSingleTenantHsmInstancesRequest + */ +class ListSingleTenantHsmInstancesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the location associated with the + * [SingleTenantHsmInstances][google.cloud.kms.v1.SingleTenantHsmInstance] to + * list, in the format `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Optional limit on the number of + * [SingleTenantHsmInstances][google.cloud.kms.v1.SingleTenantHsmInstance] to + * include in the response. Further + * [SingleTenantHsmInstances][google.cloud.kms.v1.SingleTenantHsmInstance] can + * subsequently be + * obtained by including the + * [ListSingleTenantHsmInstancesResponse.next_page_token][google.cloud.kms.v1.ListSingleTenantHsmInstancesResponse.next_page_token] + * in a subsequent request. If unspecified, the server will pick an + * appropriate default. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. Optional pagination token, returned earlier via + * [ListSingleTenantHsmInstancesResponse.next_page_token][google.cloud.kms.v1.ListSingleTenantHsmInstancesResponse.next_page_token]. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * 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). + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * 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). + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + /** + * Optional. If set to true, + * [HsmManagement.ListSingleTenantHsmInstances][google.cloud.kms.v1.HsmManagement.ListSingleTenantHsmInstances] + * will also return + * [SingleTenantHsmInstances][google.cloud.kms.v1.SingleTenantHsmInstance] in + * DELETED state. + * + * Generated from protobuf field bool show_deleted = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $show_deleted = false; + + /** + * @param string $parent Required. The resource name of the location associated with the + * [SingleTenantHsmInstances][google.cloud.kms.v1.SingleTenantHsmInstance] to + * list, in the format `projects/*/locations/*`. Please see + * {@see HsmManagementClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\Kms\V1\ListSingleTenantHsmInstancesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the location associated with the + * [SingleTenantHsmInstances][google.cloud.kms.v1.SingleTenantHsmInstance] to + * list, in the format `projects/*/locations/*`. + * @type int $page_size + * Optional. Optional limit on the number of + * [SingleTenantHsmInstances][google.cloud.kms.v1.SingleTenantHsmInstance] to + * include in the response. Further + * [SingleTenantHsmInstances][google.cloud.kms.v1.SingleTenantHsmInstance] can + * subsequently be + * obtained by including the + * [ListSingleTenantHsmInstancesResponse.next_page_token][google.cloud.kms.v1.ListSingleTenantHsmInstancesResponse.next_page_token] + * in a subsequent request. If unspecified, the server will pick an + * appropriate default. + * @type string $page_token + * Optional. Optional pagination token, returned earlier via + * [ListSingleTenantHsmInstancesResponse.next_page_token][google.cloud.kms.v1.ListSingleTenantHsmInstancesResponse.next_page_token]. + * @type 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). + * @type string $order_by + * 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). + * @type bool $show_deleted + * Optional. If set to true, + * [HsmManagement.ListSingleTenantHsmInstances][google.cloud.kms.v1.HsmManagement.ListSingleTenantHsmInstances] + * will also return + * [SingleTenantHsmInstances][google.cloud.kms.v1.SingleTenantHsmInstance] in + * DELETED state. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\HsmManagement::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the location associated with the + * [SingleTenantHsmInstances][google.cloud.kms.v1.SingleTenantHsmInstance] to + * list, in the format `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The resource name of the location associated with the + * [SingleTenantHsmInstances][google.cloud.kms.v1.SingleTenantHsmInstance] to + * list, in the format `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. Optional limit on the number of + * [SingleTenantHsmInstances][google.cloud.kms.v1.SingleTenantHsmInstance] to + * include in the response. Further + * [SingleTenantHsmInstances][google.cloud.kms.v1.SingleTenantHsmInstance] can + * subsequently be + * obtained by including the + * [ListSingleTenantHsmInstancesResponse.next_page_token][google.cloud.kms.v1.ListSingleTenantHsmInstancesResponse.next_page_token] + * in a subsequent request. If unspecified, the server will pick an + * appropriate default. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. Optional limit on the number of + * [SingleTenantHsmInstances][google.cloud.kms.v1.SingleTenantHsmInstance] to + * include in the response. Further + * [SingleTenantHsmInstances][google.cloud.kms.v1.SingleTenantHsmInstance] can + * subsequently be + * obtained by including the + * [ListSingleTenantHsmInstancesResponse.next_page_token][google.cloud.kms.v1.ListSingleTenantHsmInstancesResponse.next_page_token] + * in a subsequent request. If unspecified, the server will pick an + * appropriate default. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. Optional pagination token, returned earlier via + * [ListSingleTenantHsmInstancesResponse.next_page_token][google.cloud.kms.v1.ListSingleTenantHsmInstancesResponse.next_page_token]. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. Optional pagination token, returned earlier via + * [ListSingleTenantHsmInstancesResponse.next_page_token][google.cloud.kms.v1.ListSingleTenantHsmInstancesResponse.next_page_token]. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * 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). + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->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). + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * 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). + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * 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). + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * Optional. If set to true, + * [HsmManagement.ListSingleTenantHsmInstances][google.cloud.kms.v1.HsmManagement.ListSingleTenantHsmInstances] + * will also return + * [SingleTenantHsmInstances][google.cloud.kms.v1.SingleTenantHsmInstance] in + * DELETED state. + * + * Generated from protobuf field bool show_deleted = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getShowDeleted() + { + return $this->show_deleted; + } + + /** + * Optional. If set to true, + * [HsmManagement.ListSingleTenantHsmInstances][google.cloud.kms.v1.HsmManagement.ListSingleTenantHsmInstances] + * will also return + * [SingleTenantHsmInstances][google.cloud.kms.v1.SingleTenantHsmInstance] in + * DELETED state. + * + * Generated from protobuf field bool show_deleted = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setShowDeleted($var) + { + GPBUtil::checkBool($var); + $this->show_deleted = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListSingleTenantHsmInstancesResponse.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListSingleTenantHsmInstancesResponse.php new file mode 100644 index 000000000000..9723ddcce6f7 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListSingleTenantHsmInstancesResponse.php @@ -0,0 +1,168 @@ +google.cloud.kms.v1.ListSingleTenantHsmInstancesResponse + */ +class ListSingleTenantHsmInstancesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of + * [SingleTenantHsmInstances][google.cloud.kms.v1.SingleTenantHsmInstance]. + * + * Generated from protobuf field repeated .google.cloud.kms.v1.SingleTenantHsmInstance single_tenant_hsm_instances = 1; + */ + private $single_tenant_hsm_instances; + /** + * A token to retrieve next page of results. Pass this value in + * [ListSingleTenantHsmInstancesRequest.page_token][google.cloud.kms.v1.ListSingleTenantHsmInstancesRequest.page_token] + * to retrieve the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * The total number of + * [SingleTenantHsmInstances][google.cloud.kms.v1.SingleTenantHsmInstance] + * that matched the query. + * This field is not populated if + * [ListSingleTenantHsmInstancesRequest.filter][google.cloud.kms.v1.ListSingleTenantHsmInstancesRequest.filter] + * is applied. + * + * Generated from protobuf field int32 total_size = 3; + */ + protected $total_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Kms\V1\SingleTenantHsmInstance>|\Google\Protobuf\Internal\RepeatedField $single_tenant_hsm_instances + * The list of + * [SingleTenantHsmInstances][google.cloud.kms.v1.SingleTenantHsmInstance]. + * @type string $next_page_token + * A token to retrieve next page of results. Pass this value in + * [ListSingleTenantHsmInstancesRequest.page_token][google.cloud.kms.v1.ListSingleTenantHsmInstancesRequest.page_token] + * to retrieve the next page of results. + * @type int $total_size + * The total number of + * [SingleTenantHsmInstances][google.cloud.kms.v1.SingleTenantHsmInstance] + * that matched the query. + * This field is not populated if + * [ListSingleTenantHsmInstancesRequest.filter][google.cloud.kms.v1.ListSingleTenantHsmInstancesRequest.filter] + * is applied. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\HsmManagement::initOnce(); + parent::__construct($data); + } + + /** + * The list of + * [SingleTenantHsmInstances][google.cloud.kms.v1.SingleTenantHsmInstance]. + * + * Generated from protobuf field repeated .google.cloud.kms.v1.SingleTenantHsmInstance single_tenant_hsm_instances = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSingleTenantHsmInstances() + { + return $this->single_tenant_hsm_instances; + } + + /** + * The list of + * [SingleTenantHsmInstances][google.cloud.kms.v1.SingleTenantHsmInstance]. + * + * Generated from protobuf field repeated .google.cloud.kms.v1.SingleTenantHsmInstance single_tenant_hsm_instances = 1; + * @param array<\Google\Cloud\Kms\V1\SingleTenantHsmInstance>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSingleTenantHsmInstances($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Kms\V1\SingleTenantHsmInstance::class); + $this->single_tenant_hsm_instances = $arr; + + return $this; + } + + /** + * A token to retrieve next page of results. Pass this value in + * [ListSingleTenantHsmInstancesRequest.page_token][google.cloud.kms.v1.ListSingleTenantHsmInstancesRequest.page_token] + * to retrieve the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token to retrieve next page of results. Pass this value in + * [ListSingleTenantHsmInstancesRequest.page_token][google.cloud.kms.v1.ListSingleTenantHsmInstancesRequest.page_token] + * to retrieve the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * The total number of + * [SingleTenantHsmInstances][google.cloud.kms.v1.SingleTenantHsmInstance] + * that matched the query. + * This field is not populated if + * [ListSingleTenantHsmInstancesRequest.filter][google.cloud.kms.v1.ListSingleTenantHsmInstancesRequest.filter] + * is applied. + * + * Generated from protobuf field int32 total_size = 3; + * @return int + */ + public function getTotalSize() + { + return $this->total_size; + } + + /** + * The total number of + * [SingleTenantHsmInstances][google.cloud.kms.v1.SingleTenantHsmInstance] + * that matched the query. + * This field is not populated if + * [ListSingleTenantHsmInstancesRequest.filter][google.cloud.kms.v1.ListSingleTenantHsmInstancesRequest.filter] + * is applied. + * + * Generated from protobuf field int32 total_size = 3; + * @param int $var + * @return $this + */ + public function setTotalSize($var) + { + GPBUtil::checkInt32($var); + $this->total_size = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/LocationMetadata.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/LocationMetadata.php new file mode 100644 index 000000000000..76435c001fab --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/LocationMetadata.php @@ -0,0 +1,172 @@ +google.cloud.kms.v1.LocationMetadata + */ +class LocationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Indicates whether [CryptoKeys][google.cloud.kms.v1.CryptoKey] with + * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level] + * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] can be created in this + * location. + * + * Generated from protobuf field bool hsm_available = 1; + */ + protected $hsm_available = false; + /** + * Indicates whether [CryptoKeys][google.cloud.kms.v1.CryptoKey] with + * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level] + * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] can be created in + * this location. + * + * Generated from protobuf field bool ekm_available = 2; + */ + protected $ekm_available = false; + /** + * Indicates whether [CryptoKeys][google.cloud.kms.v1.CryptoKey] with + * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level] + * [HSM_SINGLE_TENANT][google.cloud.kms.v1.ProtectionLevel.HSM_SINGLE_TENANT] + * can be created in this location. + * + * Generated from protobuf field bool hsm_single_tenant_available = 3; + */ + protected $hsm_single_tenant_available = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $hsm_available + * Indicates whether [CryptoKeys][google.cloud.kms.v1.CryptoKey] with + * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level] + * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] can be created in this + * location. + * @type bool $ekm_available + * Indicates whether [CryptoKeys][google.cloud.kms.v1.CryptoKey] with + * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level] + * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] can be created in + * this location. + * @type bool $hsm_single_tenant_available + * Indicates whether [CryptoKeys][google.cloud.kms.v1.CryptoKey] with + * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level] + * [HSM_SINGLE_TENANT][google.cloud.kms.v1.ProtectionLevel.HSM_SINGLE_TENANT] + * can be created in this location. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Indicates whether [CryptoKeys][google.cloud.kms.v1.CryptoKey] with + * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level] + * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] can be created in this + * location. + * + * Generated from protobuf field bool hsm_available = 1; + * @return bool + */ + public function getHsmAvailable() + { + return $this->hsm_available; + } + + /** + * Indicates whether [CryptoKeys][google.cloud.kms.v1.CryptoKey] with + * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level] + * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] can be created in this + * location. + * + * Generated from protobuf field bool hsm_available = 1; + * @param bool $var + * @return $this + */ + public function setHsmAvailable($var) + { + GPBUtil::checkBool($var); + $this->hsm_available = $var; + + return $this; + } + + /** + * Indicates whether [CryptoKeys][google.cloud.kms.v1.CryptoKey] with + * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level] + * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] can be created in + * this location. + * + * Generated from protobuf field bool ekm_available = 2; + * @return bool + */ + public function getEkmAvailable() + { + return $this->ekm_available; + } + + /** + * Indicates whether [CryptoKeys][google.cloud.kms.v1.CryptoKey] with + * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level] + * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] can be created in + * this location. + * + * Generated from protobuf field bool ekm_available = 2; + * @param bool $var + * @return $this + */ + public function setEkmAvailable($var) + { + GPBUtil::checkBool($var); + $this->ekm_available = $var; + + return $this; + } + + /** + * Indicates whether [CryptoKeys][google.cloud.kms.v1.CryptoKey] with + * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level] + * [HSM_SINGLE_TENANT][google.cloud.kms.v1.ProtectionLevel.HSM_SINGLE_TENANT] + * can be created in this location. + * + * Generated from protobuf field bool hsm_single_tenant_available = 3; + * @return bool + */ + public function getHsmSingleTenantAvailable() + { + return $this->hsm_single_tenant_available; + } + + /** + * Indicates whether [CryptoKeys][google.cloud.kms.v1.CryptoKey] with + * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level] + * [HSM_SINGLE_TENANT][google.cloud.kms.v1.ProtectionLevel.HSM_SINGLE_TENANT] + * can be created in this location. + * + * Generated from protobuf field bool hsm_single_tenant_available = 3; + * @param bool $var + * @return $this + */ + public function setHsmSingleTenantAvailable($var) + { + GPBUtil::checkBool($var); + $this->hsm_single_tenant_available = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/MacSignRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/MacSignRequest.php new file mode 100644 index 000000000000..efc81a1661d3 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/MacSignRequest.php @@ -0,0 +1,300 @@ +google.cloud.kms.v1.MacSignRequest + */ +class MacSignRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for + * signing. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. The data to sign. The MAC tag is computed over this data field + * based on the specific algorithm. + * + * Generated from protobuf field bytes data = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $data = ''; + /** + * Optional. An optional CRC32C checksum of the + * [MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data]. If + * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] + * will verify the integrity of the received + * [MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data] using this + * checksum. [KeyManagementService][google.cloud.kms.v1.KeyManagementService] + * will report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data]) is + * equal to + * [MacSignRequest.data_crc32c][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $data_crc32c = null; + + /** + * @param string $name Required. The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for + * signing. Please see + * {@see KeyManagementServiceClient::cryptoKeyVersionName()} for help formatting this field. + * @param string $data Required. The data to sign. The MAC tag is computed over this data field + * based on the specific algorithm. + * + * @return \Google\Cloud\Kms\V1\MacSignRequest + * + * @experimental + */ + public static function build(string $name, string $data): self + { + return (new self()) + ->setName($name) + ->setData($data); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for + * signing. + * @type string $data + * Required. The data to sign. The MAC tag is computed over this data field + * based on the specific algorithm. + * @type \Google\Protobuf\Int64Value $data_crc32c + * Optional. An optional CRC32C checksum of the + * [MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data]. If + * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] + * will verify the integrity of the received + * [MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data] using this + * checksum. [KeyManagementService][google.cloud.kms.v1.KeyManagementService] + * will report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data]) is + * equal to + * [MacSignRequest.data_crc32c][google.cloud.kms.v1.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. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for + * signing. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for + * signing. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The data to sign. The MAC tag is computed over this data field + * based on the specific algorithm. + * + * Generated from protobuf field bytes data = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getData() + { + return $this->data; + } + + /** + * Required. The data to sign. The MAC tag is computed over this data field + * based on the specific algorithm. + * + * Generated from protobuf field bytes data = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setData($var) + { + GPBUtil::checkString($var, False); + $this->data = $var; + + return $this; + } + + /** + * Optional. An optional CRC32C checksum of the + * [MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data]. If + * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] + * will verify the integrity of the received + * [MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data] using this + * checksum. [KeyManagementService][google.cloud.kms.v1.KeyManagementService] + * will report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data]) is + * equal to + * [MacSignRequest.data_crc32c][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Int64Value|null + */ + public function getDataCrc32C() + { + return $this->data_crc32c; + } + + public function hasDataCrc32C() + { + return isset($this->data_crc32c); + } + + public function clearDataCrc32C() + { + unset($this->data_crc32c); + } + + /** + * Returns the unboxed value from getDataCrc32C() + + * Optional. An optional CRC32C checksum of the + * [MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data]. If + * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] + * will verify the integrity of the received + * [MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data] using this + * checksum. [KeyManagementService][google.cloud.kms.v1.KeyManagementService] + * will report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data]) is + * equal to + * [MacSignRequest.data_crc32c][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string|null + */ + public function getDataCrc32CUnwrapped() + { + return $this->readWrapperValue("data_crc32c"); + } + + /** + * Optional. An optional CRC32C checksum of the + * [MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data]. If + * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] + * will verify the integrity of the received + * [MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data] using this + * checksum. [KeyManagementService][google.cloud.kms.v1.KeyManagementService] + * will report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data]) is + * equal to + * [MacSignRequest.data_crc32c][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setDataCrc32C($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->data_crc32c = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. + + * Optional. An optional CRC32C checksum of the + * [MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data]. If + * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] + * will verify the integrity of the received + * [MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data] using this + * checksum. [KeyManagementService][google.cloud.kms.v1.KeyManagementService] + * will report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data]) is + * equal to + * [MacSignRequest.data_crc32c][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string|null $var + * @return $this + */ + public function setDataCrc32CUnwrapped($var) + { + $this->writeWrapperValue("data_crc32c", $var); + return $this;} + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/MacSignResponse.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/MacSignResponse.php new file mode 100644 index 000000000000..632a972782b3 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/MacSignResponse.php @@ -0,0 +1,377 @@ +google.cloud.kms.v1.MacSignResponse + */ +class MacSignResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. + * Check this field to verify that the intended resource was used for signing. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The created signature. + * + * Generated from protobuf field bytes mac = 2; + */ + protected $mac = ''; + /** + * Integrity verification field. A CRC32C checksum of the returned + * [MacSignResponse.mac][google.cloud.kms.v1.MacSignResponse.mac]. An + * integrity check of + * [MacSignResponse.mac][google.cloud.kms.v1.MacSignResponse.mac] can be + * performed by computing the CRC32C checksum of + * [MacSignResponse.mac][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value mac_crc32c = 3; + */ + protected $mac_crc32c = null; + /** + * Integrity verification field. A flag indicating whether + * [MacSignRequest.data_crc32c][google.cloud.kms.v1.MacSignRequest.data_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of the + * [data][google.cloud.kms.v1.MacSignRequest.data]. A false value of this + * field indicates either that + * [MacSignRequest.data_crc32c][google.cloud.kms.v1.MacSignRequest.data_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [MacSignRequest.data_crc32c][google.cloud.kms.v1.MacSignRequest.data_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * + * Generated from protobuf field bool verified_data_crc32c = 4; + */ + protected $verified_data_crc32c = false; + /** + * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. + * + * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 5; + */ + protected $protection_level = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. + * Check this field to verify that the intended resource was used for signing. + * @type string $mac + * The created signature. + * @type \Google\Protobuf\Int64Value $mac_crc32c + * Integrity verification field. A CRC32C checksum of the returned + * [MacSignResponse.mac][google.cloud.kms.v1.MacSignResponse.mac]. An + * integrity check of + * [MacSignResponse.mac][google.cloud.kms.v1.MacSignResponse.mac] can be + * performed by computing the CRC32C checksum of + * [MacSignResponse.mac][google.cloud.kms.v1.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. + * @type bool $verified_data_crc32c + * Integrity verification field. A flag indicating whether + * [MacSignRequest.data_crc32c][google.cloud.kms.v1.MacSignRequest.data_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of the + * [data][google.cloud.kms.v1.MacSignRequest.data]. A false value of this + * field indicates either that + * [MacSignRequest.data_crc32c][google.cloud.kms.v1.MacSignRequest.data_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [MacSignRequest.data_crc32c][google.cloud.kms.v1.MacSignRequest.data_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * @type int $protection_level + * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. + * Check this field to verify that the intended resource was used for signing. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. + * Check this field to verify that the intended resource was used for signing. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The created signature. + * + * Generated from protobuf field bytes mac = 2; + * @return string + */ + public function getMac() + { + return $this->mac; + } + + /** + * The created signature. + * + * Generated from protobuf field bytes mac = 2; + * @param string $var + * @return $this + */ + public function setMac($var) + { + GPBUtil::checkString($var, False); + $this->mac = $var; + + return $this; + } + + /** + * Integrity verification field. A CRC32C checksum of the returned + * [MacSignResponse.mac][google.cloud.kms.v1.MacSignResponse.mac]. An + * integrity check of + * [MacSignResponse.mac][google.cloud.kms.v1.MacSignResponse.mac] can be + * performed by computing the CRC32C checksum of + * [MacSignResponse.mac][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value mac_crc32c = 3; + * @return \Google\Protobuf\Int64Value|null + */ + public function getMacCrc32C() + { + return $this->mac_crc32c; + } + + public function hasMacCrc32C() + { + return isset($this->mac_crc32c); + } + + public function clearMacCrc32C() + { + unset($this->mac_crc32c); + } + + /** + * Returns the unboxed value from getMacCrc32C() + + * Integrity verification field. A CRC32C checksum of the returned + * [MacSignResponse.mac][google.cloud.kms.v1.MacSignResponse.mac]. An + * integrity check of + * [MacSignResponse.mac][google.cloud.kms.v1.MacSignResponse.mac] can be + * performed by computing the CRC32C checksum of + * [MacSignResponse.mac][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value mac_crc32c = 3; + * @return int|string|null + */ + public function getMacCrc32CUnwrapped() + { + return $this->readWrapperValue("mac_crc32c"); + } + + /** + * Integrity verification field. A CRC32C checksum of the returned + * [MacSignResponse.mac][google.cloud.kms.v1.MacSignResponse.mac]. An + * integrity check of + * [MacSignResponse.mac][google.cloud.kms.v1.MacSignResponse.mac] can be + * performed by computing the CRC32C checksum of + * [MacSignResponse.mac][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value mac_crc32c = 3; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setMacCrc32C($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->mac_crc32c = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. + + * Integrity verification field. A CRC32C checksum of the returned + * [MacSignResponse.mac][google.cloud.kms.v1.MacSignResponse.mac]. An + * integrity check of + * [MacSignResponse.mac][google.cloud.kms.v1.MacSignResponse.mac] can be + * performed by computing the CRC32C checksum of + * [MacSignResponse.mac][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value mac_crc32c = 3; + * @param int|string|null $var + * @return $this + */ + public function setMacCrc32CUnwrapped($var) + { + $this->writeWrapperValue("mac_crc32c", $var); + return $this;} + + /** + * Integrity verification field. A flag indicating whether + * [MacSignRequest.data_crc32c][google.cloud.kms.v1.MacSignRequest.data_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of the + * [data][google.cloud.kms.v1.MacSignRequest.data]. A false value of this + * field indicates either that + * [MacSignRequest.data_crc32c][google.cloud.kms.v1.MacSignRequest.data_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [MacSignRequest.data_crc32c][google.cloud.kms.v1.MacSignRequest.data_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * + * Generated from protobuf field bool verified_data_crc32c = 4; + * @return bool + */ + public function getVerifiedDataCrc32C() + { + return $this->verified_data_crc32c; + } + + /** + * Integrity verification field. A flag indicating whether + * [MacSignRequest.data_crc32c][google.cloud.kms.v1.MacSignRequest.data_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of the + * [data][google.cloud.kms.v1.MacSignRequest.data]. A false value of this + * field indicates either that + * [MacSignRequest.data_crc32c][google.cloud.kms.v1.MacSignRequest.data_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [MacSignRequest.data_crc32c][google.cloud.kms.v1.MacSignRequest.data_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * + * Generated from protobuf field bool verified_data_crc32c = 4; + * @param bool $var + * @return $this + */ + public function setVerifiedDataCrc32C($var) + { + GPBUtil::checkBool($var); + $this->verified_data_crc32c = $var; + + return $this; + } + + /** + * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. + * + * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 5; + * @return int + */ + public function getProtectionLevel() + { + return $this->protection_level; + } + + /** + * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. + * + * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 5; + * @param int $var + * @return $this + */ + public function setProtectionLevel($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\ProtectionLevel::class); + $this->protection_level = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/MacVerifyRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/MacVerifyRequest.php new file mode 100644 index 000000000000..97046b5453b8 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/MacVerifyRequest.php @@ -0,0 +1,514 @@ +google.cloud.kms.v1.MacVerifyRequest + */ +class MacVerifyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for + * verification. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. The data used previously as a + * [MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data] to generate + * the MAC tag. + * + * Generated from protobuf field bytes data = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $data = ''; + /** + * Optional. An optional CRC32C checksum of the + * [MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data]. If + * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] + * will verify the integrity of the received + * [MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data] using + * this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data]) + * is equal to + * [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $data_crc32c = null; + /** + * Required. The signature to verify. + * + * Generated from protobuf field bytes mac = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $mac = ''; + /** + * Optional. An optional CRC32C checksum of the + * [MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac]. If + * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] + * will verify the integrity of the received + * [MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac] using this + * checksum. [KeyManagementService][google.cloud.kms.v1.KeyManagementService] + * will report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac]) is + * equal to + * [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value mac_crc32c = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $mac_crc32c = null; + + /** + * @param string $name Required. The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for + * verification. Please see + * {@see KeyManagementServiceClient::cryptoKeyVersionName()} for help formatting this field. + * @param string $data Required. The data used previously as a + * [MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data] to generate + * the MAC tag. + * @param string $mac Required. The signature to verify. + * + * @return \Google\Cloud\Kms\V1\MacVerifyRequest + * + * @experimental + */ + public static function build(string $name, string $data, string $mac): self + { + return (new self()) + ->setName($name) + ->setData($data) + ->setMac($mac); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for + * verification. + * @type string $data + * Required. The data used previously as a + * [MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data] to generate + * the MAC tag. + * @type \Google\Protobuf\Int64Value $data_crc32c + * Optional. An optional CRC32C checksum of the + * [MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data]. If + * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] + * will verify the integrity of the received + * [MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data] using + * this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data]) + * is equal to + * [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.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. + * @type string $mac + * Required. The signature to verify. + * @type \Google\Protobuf\Int64Value $mac_crc32c + * Optional. An optional CRC32C checksum of the + * [MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac]. If + * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] + * will verify the integrity of the received + * [MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac] using this + * checksum. [KeyManagementService][google.cloud.kms.v1.KeyManagementService] + * will report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac]) is + * equal to + * [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.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. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for + * verification. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for + * verification. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The data used previously as a + * [MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data] to generate + * the MAC tag. + * + * Generated from protobuf field bytes data = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getData() + { + return $this->data; + } + + /** + * Required. The data used previously as a + * [MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data] to generate + * the MAC tag. + * + * Generated from protobuf field bytes data = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setData($var) + { + GPBUtil::checkString($var, False); + $this->data = $var; + + return $this; + } + + /** + * Optional. An optional CRC32C checksum of the + * [MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data]. If + * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] + * will verify the integrity of the received + * [MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data] using + * this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data]) + * is equal to + * [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Int64Value|null + */ + public function getDataCrc32C() + { + return $this->data_crc32c; + } + + public function hasDataCrc32C() + { + return isset($this->data_crc32c); + } + + public function clearDataCrc32C() + { + unset($this->data_crc32c); + } + + /** + * Returns the unboxed value from getDataCrc32C() + + * Optional. An optional CRC32C checksum of the + * [MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data]. If + * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] + * will verify the integrity of the received + * [MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data] using + * this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data]) + * is equal to + * [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string|null + */ + public function getDataCrc32CUnwrapped() + { + return $this->readWrapperValue("data_crc32c"); + } + + /** + * Optional. An optional CRC32C checksum of the + * [MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data]. If + * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] + * will verify the integrity of the received + * [MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data] using + * this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data]) + * is equal to + * [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setDataCrc32C($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->data_crc32c = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. + + * Optional. An optional CRC32C checksum of the + * [MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data]. If + * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] + * will verify the integrity of the received + * [MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data] using + * this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data]) + * is equal to + * [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string|null $var + * @return $this + */ + public function setDataCrc32CUnwrapped($var) + { + $this->writeWrapperValue("data_crc32c", $var); + return $this;} + + /** + * Required. The signature to verify. + * + * Generated from protobuf field bytes mac = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getMac() + { + return $this->mac; + } + + /** + * Required. The signature to verify. + * + * Generated from protobuf field bytes mac = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setMac($var) + { + GPBUtil::checkString($var, False); + $this->mac = $var; + + return $this; + } + + /** + * Optional. An optional CRC32C checksum of the + * [MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac]. If + * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] + * will verify the integrity of the received + * [MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac] using this + * checksum. [KeyManagementService][google.cloud.kms.v1.KeyManagementService] + * will report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac]) is + * equal to + * [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value mac_crc32c = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Int64Value|null + */ + public function getMacCrc32C() + { + return $this->mac_crc32c; + } + + public function hasMacCrc32C() + { + return isset($this->mac_crc32c); + } + + public function clearMacCrc32C() + { + unset($this->mac_crc32c); + } + + /** + * Returns the unboxed value from getMacCrc32C() + + * Optional. An optional CRC32C checksum of the + * [MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac]. If + * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] + * will verify the integrity of the received + * [MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac] using this + * checksum. [KeyManagementService][google.cloud.kms.v1.KeyManagementService] + * will report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac]) is + * equal to + * [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value mac_crc32c = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string|null + */ + public function getMacCrc32CUnwrapped() + { + return $this->readWrapperValue("mac_crc32c"); + } + + /** + * Optional. An optional CRC32C checksum of the + * [MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac]. If + * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] + * will verify the integrity of the received + * [MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac] using this + * checksum. [KeyManagementService][google.cloud.kms.v1.KeyManagementService] + * will report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac]) is + * equal to + * [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value mac_crc32c = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setMacCrc32C($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->mac_crc32c = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. + + * Optional. An optional CRC32C checksum of the + * [MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac]. If + * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] + * will verify the integrity of the received + * [MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac] using this + * checksum. [KeyManagementService][google.cloud.kms.v1.KeyManagementService] + * will report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac]) is + * equal to + * [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value mac_crc32c = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string|null $var + * @return $this + */ + public function setMacCrc32CUnwrapped($var) + { + $this->writeWrapperValue("mac_crc32c", $var); + return $this;} + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/MacVerifyResponse.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/MacVerifyResponse.php new file mode 100644 index 000000000000..457f9f454810 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/MacVerifyResponse.php @@ -0,0 +1,386 @@ +google.cloud.kms.v1.MacVerifyResponse + */ +class MacVerifyResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for + * verification. Check this field to verify that the intended resource was + * used for verification. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * This field indicates whether or not the verification operation for + * [MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac] over + * [MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data] was + * successful. + * + * Generated from protobuf field bool success = 2; + */ + protected $success = false; + /** + * Integrity verification field. A flag indicating whether + * [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.MacVerifyRequest.data_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of the + * [data][google.cloud.kms.v1.MacVerifyRequest.data]. A false value of this + * field indicates either that + * [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.MacVerifyRequest.data_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.MacVerifyRequest.data_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * + * Generated from protobuf field bool verified_data_crc32c = 3; + */ + protected $verified_data_crc32c = false; + /** + * Integrity verification field. A flag indicating whether + * [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.MacVerifyRequest.mac_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of the + * [data][google.cloud.kms.v1.MacVerifyRequest.mac]. A false value of this + * field indicates either that + * [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.MacVerifyRequest.mac_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.MacVerifyRequest.mac_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * + * Generated from protobuf field bool verified_mac_crc32c = 4; + */ + protected $verified_mac_crc32c = false; + /** + * 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. + * + * Generated from protobuf field bool verified_success_integrity = 5; + */ + protected $verified_success_integrity = false; + /** + * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for + * verification. + * + * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 6; + */ + protected $protection_level = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for + * verification. Check this field to verify that the intended resource was + * used for verification. + * @type bool $success + * This field indicates whether or not the verification operation for + * [MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac] over + * [MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data] was + * successful. + * @type bool $verified_data_crc32c + * Integrity verification field. A flag indicating whether + * [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.MacVerifyRequest.data_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of the + * [data][google.cloud.kms.v1.MacVerifyRequest.data]. A false value of this + * field indicates either that + * [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.MacVerifyRequest.data_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.MacVerifyRequest.data_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * @type bool $verified_mac_crc32c + * Integrity verification field. A flag indicating whether + * [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.MacVerifyRequest.mac_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of the + * [data][google.cloud.kms.v1.MacVerifyRequest.mac]. A false value of this + * field indicates either that + * [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.MacVerifyRequest.mac_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.MacVerifyRequest.mac_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * @type bool $verified_success_integrity + * 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. + * @type int $protection_level + * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for + * verification. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for + * verification. Check this field to verify that the intended resource was + * used for verification. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for + * verification. Check this field to verify that the intended resource was + * used for verification. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * This field indicates whether or not the verification operation for + * [MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac] over + * [MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data] was + * successful. + * + * Generated from protobuf field bool success = 2; + * @return bool + */ + public function getSuccess() + { + return $this->success; + } + + /** + * This field indicates whether or not the verification operation for + * [MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac] over + * [MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data] was + * successful. + * + * Generated from protobuf field bool success = 2; + * @param bool $var + * @return $this + */ + public function setSuccess($var) + { + GPBUtil::checkBool($var); + $this->success = $var; + + return $this; + } + + /** + * Integrity verification field. A flag indicating whether + * [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.MacVerifyRequest.data_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of the + * [data][google.cloud.kms.v1.MacVerifyRequest.data]. A false value of this + * field indicates either that + * [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.MacVerifyRequest.data_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.MacVerifyRequest.data_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * + * Generated from protobuf field bool verified_data_crc32c = 3; + * @return bool + */ + public function getVerifiedDataCrc32C() + { + return $this->verified_data_crc32c; + } + + /** + * Integrity verification field. A flag indicating whether + * [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.MacVerifyRequest.data_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of the + * [data][google.cloud.kms.v1.MacVerifyRequest.data]. A false value of this + * field indicates either that + * [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.MacVerifyRequest.data_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.MacVerifyRequest.data_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * + * Generated from protobuf field bool verified_data_crc32c = 3; + * @param bool $var + * @return $this + */ + public function setVerifiedDataCrc32C($var) + { + GPBUtil::checkBool($var); + $this->verified_data_crc32c = $var; + + return $this; + } + + /** + * Integrity verification field. A flag indicating whether + * [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.MacVerifyRequest.mac_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of the + * [data][google.cloud.kms.v1.MacVerifyRequest.mac]. A false value of this + * field indicates either that + * [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.MacVerifyRequest.mac_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.MacVerifyRequest.mac_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * + * Generated from protobuf field bool verified_mac_crc32c = 4; + * @return bool + */ + public function getVerifiedMacCrc32C() + { + return $this->verified_mac_crc32c; + } + + /** + * Integrity verification field. A flag indicating whether + * [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.MacVerifyRequest.mac_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of the + * [data][google.cloud.kms.v1.MacVerifyRequest.mac]. A false value of this + * field indicates either that + * [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.MacVerifyRequest.mac_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.MacVerifyRequest.mac_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * + * Generated from protobuf field bool verified_mac_crc32c = 4; + * @param bool $var + * @return $this + */ + public function setVerifiedMacCrc32C($var) + { + GPBUtil::checkBool($var); + $this->verified_mac_crc32c = $var; + + return $this; + } + + /** + * 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. + * + * Generated from protobuf field bool verified_success_integrity = 5; + * @return bool + */ + public function getVerifiedSuccessIntegrity() + { + return $this->verified_success_integrity; + } + + /** + * 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. + * + * Generated from protobuf field bool verified_success_integrity = 5; + * @param bool $var + * @return $this + */ + public function setVerifiedSuccessIntegrity($var) + { + GPBUtil::checkBool($var); + $this->verified_success_integrity = $var; + + return $this; + } + + /** + * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for + * verification. + * + * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 6; + * @return int + */ + public function getProtectionLevel() + { + return $this->protection_level; + } + + /** + * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for + * verification. + * + * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 6; + * @param int $var + * @return $this + */ + public function setProtectionLevel($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\ProtectionLevel::class); + $this->protection_level = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ProtectionLevel.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ProtectionLevel.php new file mode 100644 index 000000000000..89c97cb38289 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ProtectionLevel.php @@ -0,0 +1,84 @@ +google.cloud.kms.v1.ProtectionLevel + */ +class ProtectionLevel +{ + /** + * Not specified. + * + * Generated from protobuf enum PROTECTION_LEVEL_UNSPECIFIED = 0; + */ + const PROTECTION_LEVEL_UNSPECIFIED = 0; + /** + * Crypto operations are performed in software. + * + * Generated from protobuf enum SOFTWARE = 1; + */ + const SOFTWARE = 1; + /** + * Crypto operations are performed in a Hardware Security Module. + * + * Generated from protobuf enum HSM = 2; + */ + const HSM = 2; + /** + * Crypto operations are performed by an external key manager. + * + * Generated from protobuf enum EXTERNAL = 3; + */ + const EXTERNAL = 3; + /** + * Crypto operations are performed in an EKM-over-VPC backend. + * + * Generated from protobuf enum EXTERNAL_VPC = 4; + */ + const EXTERNAL_VPC = 4; + /** + * Crypto operations are performed in a single-tenant HSM. + * + * Generated from protobuf enum HSM_SINGLE_TENANT = 5; + */ + const HSM_SINGLE_TENANT = 5; + + private static $valueToName = [ + self::PROTECTION_LEVEL_UNSPECIFIED => 'PROTECTION_LEVEL_UNSPECIFIED', + self::SOFTWARE => 'SOFTWARE', + self::HSM => 'HSM', + self::EXTERNAL => 'EXTERNAL', + self::EXTERNAL_VPC => 'EXTERNAL_VPC', + self::HSM_SINGLE_TENANT => 'HSM_SINGLE_TENANT', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/PublicKey.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/PublicKey.php new file mode 100644 index 000000000000..6e5ae047ab43 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/PublicKey.php @@ -0,0 +1,452 @@ +google.cloud.kms.v1.PublicKey + */ +class PublicKey extends \Google\Protobuf\Internal\Message +{ + /** + * 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). + * + * Generated from protobuf field string pem = 1; + */ + protected $pem = ''; + /** + * The + * [Algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] + * associated with this key. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 2; + */ + protected $algorithm = 0; + /** + * Integrity verification field. A CRC32C checksum of the returned + * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem]. An integrity check of + * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] can be performed by + * computing the CRC32C checksum of + * [PublicKey.pem][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value pem_crc32c = 3; + */ + protected $pem_crc32c = null; + /** + * The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key. + * Provided here for verification. + * NOTE: This field is in Beta. + * + * Generated from protobuf field string name = 4; + */ + protected $name = ''; + /** + * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key. + * + * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 5; + */ + protected $protection_level = 0; + /** + * The [PublicKey][google.cloud.kms.v1.PublicKey] format specified by the + * customer through the + * [public_key_format][google.cloud.kms.v1.GetPublicKeyRequest.public_key_format] + * field. + * + * Generated from protobuf field .google.cloud.kms.v1.PublicKey.PublicKeyFormat public_key_format = 7; + */ + protected $public_key_format = 0; + /** + * This field contains the public key (with integrity verification), formatted + * according to the + * [public_key_format][google.cloud.kms.v1.PublicKey.public_key_format] field. + * + * Generated from protobuf field .google.cloud.kms.v1.ChecksummedData public_key = 8; + */ + protected $public_key = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $pem + * 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). + * @type int $algorithm + * The + * [Algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] + * associated with this key. + * @type \Google\Protobuf\Int64Value $pem_crc32c + * Integrity verification field. A CRC32C checksum of the returned + * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem]. An integrity check of + * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] can be performed by + * computing the CRC32C checksum of + * [PublicKey.pem][google.cloud.kms.v1.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. + * @type string $name + * The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key. + * Provided here for verification. + * NOTE: This field is in Beta. + * @type int $protection_level + * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key. + * @type int $public_key_format + * The [PublicKey][google.cloud.kms.v1.PublicKey] format specified by the + * customer through the + * [public_key_format][google.cloud.kms.v1.GetPublicKeyRequest.public_key_format] + * field. + * @type \Google\Cloud\Kms\V1\ChecksummedData $public_key + * This field contains the public key (with integrity verification), formatted + * according to the + * [public_key_format][google.cloud.kms.v1.PublicKey.public_key_format] field. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * 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). + * + * Generated from protobuf field string pem = 1; + * @return string + */ + public function getPem() + { + return $this->pem; + } + + /** + * 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). + * + * Generated from protobuf field string pem = 1; + * @param string $var + * @return $this + */ + public function setPem($var) + { + GPBUtil::checkString($var, True); + $this->pem = $var; + + return $this; + } + + /** + * The + * [Algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] + * associated with this key. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 2; + * @return int + */ + public function getAlgorithm() + { + return $this->algorithm; + } + + /** + * The + * [Algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] + * associated with this key. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 2; + * @param int $var + * @return $this + */ + public function setAlgorithm($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\CryptoKeyVersion\CryptoKeyVersionAlgorithm::class); + $this->algorithm = $var; + + return $this; + } + + /** + * Integrity verification field. A CRC32C checksum of the returned + * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem]. An integrity check of + * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] can be performed by + * computing the CRC32C checksum of + * [PublicKey.pem][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value pem_crc32c = 3; + * @return \Google\Protobuf\Int64Value|null + */ + public function getPemCrc32C() + { + return $this->pem_crc32c; + } + + public function hasPemCrc32C() + { + return isset($this->pem_crc32c); + } + + public function clearPemCrc32C() + { + unset($this->pem_crc32c); + } + + /** + * Returns the unboxed value from getPemCrc32C() + + * Integrity verification field. A CRC32C checksum of the returned + * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem]. An integrity check of + * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] can be performed by + * computing the CRC32C checksum of + * [PublicKey.pem][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value pem_crc32c = 3; + * @return int|string|null + */ + public function getPemCrc32CUnwrapped() + { + return $this->readWrapperValue("pem_crc32c"); + } + + /** + * Integrity verification field. A CRC32C checksum of the returned + * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem]. An integrity check of + * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] can be performed by + * computing the CRC32C checksum of + * [PublicKey.pem][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value pem_crc32c = 3; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setPemCrc32C($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->pem_crc32c = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. + + * Integrity verification field. A CRC32C checksum of the returned + * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem]. An integrity check of + * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] can be performed by + * computing the CRC32C checksum of + * [PublicKey.pem][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value pem_crc32c = 3; + * @param int|string|null $var + * @return $this + */ + public function setPemCrc32CUnwrapped($var) + { + $this->writeWrapperValue("pem_crc32c", $var); + return $this;} + + /** + * The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key. + * Provided here for verification. + * NOTE: This field is in Beta. + * + * Generated from protobuf field string name = 4; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key. + * Provided here for verification. + * NOTE: This field is in Beta. + * + * Generated from protobuf field string name = 4; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key. + * + * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 5; + * @return int + */ + public function getProtectionLevel() + { + return $this->protection_level; + } + + /** + * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key. + * + * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 5; + * @param int $var + * @return $this + */ + public function setProtectionLevel($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\ProtectionLevel::class); + $this->protection_level = $var; + + return $this; + } + + /** + * The [PublicKey][google.cloud.kms.v1.PublicKey] format specified by the + * customer through the + * [public_key_format][google.cloud.kms.v1.GetPublicKeyRequest.public_key_format] + * field. + * + * Generated from protobuf field .google.cloud.kms.v1.PublicKey.PublicKeyFormat public_key_format = 7; + * @return int + */ + public function getPublicKeyFormat() + { + return $this->public_key_format; + } + + /** + * The [PublicKey][google.cloud.kms.v1.PublicKey] format specified by the + * customer through the + * [public_key_format][google.cloud.kms.v1.GetPublicKeyRequest.public_key_format] + * field. + * + * Generated from protobuf field .google.cloud.kms.v1.PublicKey.PublicKeyFormat public_key_format = 7; + * @param int $var + * @return $this + */ + public function setPublicKeyFormat($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\PublicKey\PublicKeyFormat::class); + $this->public_key_format = $var; + + return $this; + } + + /** + * This field contains the public key (with integrity verification), formatted + * according to the + * [public_key_format][google.cloud.kms.v1.PublicKey.public_key_format] field. + * + * Generated from protobuf field .google.cloud.kms.v1.ChecksummedData public_key = 8; + * @return \Google\Cloud\Kms\V1\ChecksummedData|null + */ + public function getPublicKey() + { + return $this->public_key; + } + + public function hasPublicKey() + { + return isset($this->public_key); + } + + public function clearPublicKey() + { + unset($this->public_key); + } + + /** + * This field contains the public key (with integrity verification), formatted + * according to the + * [public_key_format][google.cloud.kms.v1.PublicKey.public_key_format] field. + * + * Generated from protobuf field .google.cloud.kms.v1.ChecksummedData public_key = 8; + * @param \Google\Cloud\Kms\V1\ChecksummedData $var + * @return $this + */ + public function setPublicKey($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\ChecksummedData::class); + $this->public_key = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/PublicKey/PublicKeyFormat.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/PublicKey/PublicKeyFormat.php new file mode 100644 index 000000000000..2dbf402cefe9 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/PublicKey/PublicKeyFormat.php @@ -0,0 +1,94 @@ +google.cloud.kms.v1.PublicKey.PublicKeyFormat + */ +class PublicKeyFormat +{ + /** + * If the + * [public_key_format][google.cloud.kms.v1.GetPublicKeyRequest.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][google.cloud.kms.v1.PublicKey.pem] will be populated. + * Otherwise, the public key will be exported through the + * [public_key][google.cloud.kms.v1.PublicKey.public_key] field in the + * requested format. + * + * Generated from protobuf enum PUBLIC_KEY_FORMAT_UNSPECIFIED = 0; + */ + const PUBLIC_KEY_FORMAT_UNSPECIFIED = 0; + /** + * 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. + * + * Generated from protobuf enum PEM = 1; + */ + const PEM = 1; + /** + * The returned public key will be encoded in DER format (the + * PrivateKeyInfo structure from RFC 5208). + * + * Generated from protobuf enum DER = 2; + */ + const DER = 2; + /** + * 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). + * + * Generated from protobuf enum NIST_PQC = 3; + */ + const NIST_PQC = 3; + /** + * The returned public key is in raw bytes format defined in its standard + * https://datatracker.ietf.org/doc/draft-connolly-cfrg-xwing-kem. + * + * Generated from protobuf enum XWING_RAW_BYTES = 4; + */ + const XWING_RAW_BYTES = 4; + + private static $valueToName = [ + self::PUBLIC_KEY_FORMAT_UNSPECIFIED => 'PUBLIC_KEY_FORMAT_UNSPECIFIED', + self::PEM => 'PEM', + self::DER => 'DER', + self::NIST_PQC => 'NIST_PQC', + self::XWING_RAW_BYTES => 'XWING_RAW_BYTES', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(PublicKeyFormat::class, \Google\Cloud\Kms\V1\PublicKey_PublicKeyFormat::class); + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/RawDecryptRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/RawDecryptRequest.php new file mode 100644 index 000000000000..3d6cd5c1a96f --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/RawDecryptRequest.php @@ -0,0 +1,707 @@ +google.cloud.kms.v1.RawDecryptRequest + */ +class RawDecryptRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for + * decryption. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Required. The encrypted data originally returned in + * [RawEncryptResponse.ciphertext][google.cloud.kms.v1.RawEncryptResponse.ciphertext]. + * + * Generated from protobuf field bytes ciphertext = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $ciphertext = ''; + /** + * Optional. Optional data that must match the data originally supplied in + * [RawEncryptRequest.additional_authenticated_data][google.cloud.kms.v1.RawEncryptRequest.additional_authenticated_data]. + * + * Generated from protobuf field bytes additional_authenticated_data = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $additional_authenticated_data = ''; + /** + * Required. The initialization vector (IV) used during encryption, which must + * match the data originally provided in + * [RawEncryptResponse.initialization_vector][google.cloud.kms.v1.RawEncryptResponse.initialization_vector]. + * + * Generated from protobuf field bytes initialization_vector = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $initialization_vector = ''; + /** + * 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). + * + * Generated from protobuf field int32 tag_length = 5; + */ + protected $tag_length = 0; + /** + * Optional. An optional CRC32C checksum of the + * [RawDecryptRequest.ciphertext][google.cloud.kms.v1.RawDecryptRequest.ciphertext]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received ciphertext using this checksum. + * [KeyManagementService][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $ciphertext_crc32c = null; + /** + * Optional. An optional CRC32C checksum of the + * [RawDecryptRequest.additional_authenticated_data][google.cloud.kms.v1.RawDecryptRequest.additional_authenticated_data]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received additional_authenticated_data using + * this checksum. + * [KeyManagementService][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value additional_authenticated_data_crc32c = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $additional_authenticated_data_crc32c = null; + /** + * Optional. An optional CRC32C checksum of the + * [RawDecryptRequest.initialization_vector][google.cloud.kms.v1.RawDecryptRequest.initialization_vector]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received initialization_vector using this + * checksum. [KeyManagementService][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value initialization_vector_crc32c = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $initialization_vector_crc32c = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for + * decryption. + * @type string $ciphertext + * Required. The encrypted data originally returned in + * [RawEncryptResponse.ciphertext][google.cloud.kms.v1.RawEncryptResponse.ciphertext]. + * @type string $additional_authenticated_data + * Optional. Optional data that must match the data originally supplied in + * [RawEncryptRequest.additional_authenticated_data][google.cloud.kms.v1.RawEncryptRequest.additional_authenticated_data]. + * @type string $initialization_vector + * Required. The initialization vector (IV) used during encryption, which must + * match the data originally provided in + * [RawEncryptResponse.initialization_vector][google.cloud.kms.v1.RawEncryptResponse.initialization_vector]. + * @type int $tag_length + * 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). + * @type \Google\Protobuf\Int64Value $ciphertext_crc32c + * Optional. An optional CRC32C checksum of the + * [RawDecryptRequest.ciphertext][google.cloud.kms.v1.RawDecryptRequest.ciphertext]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received ciphertext using this checksum. + * [KeyManagementService][google.cloud.kms.v1.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. + * @type \Google\Protobuf\Int64Value $additional_authenticated_data_crc32c + * Optional. An optional CRC32C checksum of the + * [RawDecryptRequest.additional_authenticated_data][google.cloud.kms.v1.RawDecryptRequest.additional_authenticated_data]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received additional_authenticated_data using + * this checksum. + * [KeyManagementService][google.cloud.kms.v1.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. + * @type \Google\Protobuf\Int64Value $initialization_vector_crc32c + * Optional. An optional CRC32C checksum of the + * [RawDecryptRequest.initialization_vector][google.cloud.kms.v1.RawDecryptRequest.initialization_vector]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received initialization_vector using this + * checksum. [KeyManagementService][google.cloud.kms.v1.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. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for + * decryption. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for + * decryption. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The encrypted data originally returned in + * [RawEncryptResponse.ciphertext][google.cloud.kms.v1.RawEncryptResponse.ciphertext]. + * + * Generated from protobuf field bytes ciphertext = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getCiphertext() + { + return $this->ciphertext; + } + + /** + * Required. The encrypted data originally returned in + * [RawEncryptResponse.ciphertext][google.cloud.kms.v1.RawEncryptResponse.ciphertext]. + * + * Generated from protobuf field bytes ciphertext = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setCiphertext($var) + { + GPBUtil::checkString($var, False); + $this->ciphertext = $var; + + return $this; + } + + /** + * Optional. Optional data that must match the data originally supplied in + * [RawEncryptRequest.additional_authenticated_data][google.cloud.kms.v1.RawEncryptRequest.additional_authenticated_data]. + * + * Generated from protobuf field bytes additional_authenticated_data = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getAdditionalAuthenticatedData() + { + return $this->additional_authenticated_data; + } + + /** + * Optional. Optional data that must match the data originally supplied in + * [RawEncryptRequest.additional_authenticated_data][google.cloud.kms.v1.RawEncryptRequest.additional_authenticated_data]. + * + * Generated from protobuf field bytes additional_authenticated_data = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setAdditionalAuthenticatedData($var) + { + GPBUtil::checkString($var, False); + $this->additional_authenticated_data = $var; + + return $this; + } + + /** + * Required. The initialization vector (IV) used during encryption, which must + * match the data originally provided in + * [RawEncryptResponse.initialization_vector][google.cloud.kms.v1.RawEncryptResponse.initialization_vector]. + * + * Generated from protobuf field bytes initialization_vector = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getInitializationVector() + { + return $this->initialization_vector; + } + + /** + * Required. The initialization vector (IV) used during encryption, which must + * match the data originally provided in + * [RawEncryptResponse.initialization_vector][google.cloud.kms.v1.RawEncryptResponse.initialization_vector]. + * + * Generated from protobuf field bytes initialization_vector = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setInitializationVector($var) + { + GPBUtil::checkString($var, False); + $this->initialization_vector = $var; + + return $this; + } + + /** + * 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). + * + * Generated from protobuf field int32 tag_length = 5; + * @return int + */ + public function getTagLength() + { + return $this->tag_length; + } + + /** + * 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). + * + * Generated from protobuf field int32 tag_length = 5; + * @param int $var + * @return $this + */ + public function setTagLength($var) + { + GPBUtil::checkInt32($var); + $this->tag_length = $var; + + return $this; + } + + /** + * Optional. An optional CRC32C checksum of the + * [RawDecryptRequest.ciphertext][google.cloud.kms.v1.RawDecryptRequest.ciphertext]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received ciphertext using this checksum. + * [KeyManagementService][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Int64Value|null + */ + public function getCiphertextCrc32C() + { + return $this->ciphertext_crc32c; + } + + public function hasCiphertextCrc32C() + { + return isset($this->ciphertext_crc32c); + } + + public function clearCiphertextCrc32C() + { + unset($this->ciphertext_crc32c); + } + + /** + * Returns the unboxed value from getCiphertextCrc32C() + + * Optional. An optional CRC32C checksum of the + * [RawDecryptRequest.ciphertext][google.cloud.kms.v1.RawDecryptRequest.ciphertext]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received ciphertext using this checksum. + * [KeyManagementService][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string|null + */ + public function getCiphertextCrc32CUnwrapped() + { + return $this->readWrapperValue("ciphertext_crc32c"); + } + + /** + * Optional. An optional CRC32C checksum of the + * [RawDecryptRequest.ciphertext][google.cloud.kms.v1.RawDecryptRequest.ciphertext]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received ciphertext using this checksum. + * [KeyManagementService][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setCiphertextCrc32C($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->ciphertext_crc32c = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. + + * Optional. An optional CRC32C checksum of the + * [RawDecryptRequest.ciphertext][google.cloud.kms.v1.RawDecryptRequest.ciphertext]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received ciphertext using this checksum. + * [KeyManagementService][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string|null $var + * @return $this + */ + public function setCiphertextCrc32CUnwrapped($var) + { + $this->writeWrapperValue("ciphertext_crc32c", $var); + return $this;} + + /** + * Optional. An optional CRC32C checksum of the + * [RawDecryptRequest.additional_authenticated_data][google.cloud.kms.v1.RawDecryptRequest.additional_authenticated_data]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received additional_authenticated_data using + * this checksum. + * [KeyManagementService][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value additional_authenticated_data_crc32c = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Int64Value|null + */ + public function getAdditionalAuthenticatedDataCrc32C() + { + return $this->additional_authenticated_data_crc32c; + } + + public function hasAdditionalAuthenticatedDataCrc32C() + { + return isset($this->additional_authenticated_data_crc32c); + } + + public function clearAdditionalAuthenticatedDataCrc32C() + { + unset($this->additional_authenticated_data_crc32c); + } + + /** + * Returns the unboxed value from getAdditionalAuthenticatedDataCrc32C() + + * Optional. An optional CRC32C checksum of the + * [RawDecryptRequest.additional_authenticated_data][google.cloud.kms.v1.RawDecryptRequest.additional_authenticated_data]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received additional_authenticated_data using + * this checksum. + * [KeyManagementService][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value additional_authenticated_data_crc32c = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string|null + */ + public function getAdditionalAuthenticatedDataCrc32CUnwrapped() + { + return $this->readWrapperValue("additional_authenticated_data_crc32c"); + } + + /** + * Optional. An optional CRC32C checksum of the + * [RawDecryptRequest.additional_authenticated_data][google.cloud.kms.v1.RawDecryptRequest.additional_authenticated_data]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received additional_authenticated_data using + * this checksum. + * [KeyManagementService][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value additional_authenticated_data_crc32c = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setAdditionalAuthenticatedDataCrc32C($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->additional_authenticated_data_crc32c = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. + + * Optional. An optional CRC32C checksum of the + * [RawDecryptRequest.additional_authenticated_data][google.cloud.kms.v1.RawDecryptRequest.additional_authenticated_data]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received additional_authenticated_data using + * this checksum. + * [KeyManagementService][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value additional_authenticated_data_crc32c = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string|null $var + * @return $this + */ + public function setAdditionalAuthenticatedDataCrc32CUnwrapped($var) + { + $this->writeWrapperValue("additional_authenticated_data_crc32c", $var); + return $this;} + + /** + * Optional. An optional CRC32C checksum of the + * [RawDecryptRequest.initialization_vector][google.cloud.kms.v1.RawDecryptRequest.initialization_vector]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received initialization_vector using this + * checksum. [KeyManagementService][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value initialization_vector_crc32c = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Int64Value|null + */ + public function getInitializationVectorCrc32C() + { + return $this->initialization_vector_crc32c; + } + + public function hasInitializationVectorCrc32C() + { + return isset($this->initialization_vector_crc32c); + } + + public function clearInitializationVectorCrc32C() + { + unset($this->initialization_vector_crc32c); + } + + /** + * Returns the unboxed value from getInitializationVectorCrc32C() + + * Optional. An optional CRC32C checksum of the + * [RawDecryptRequest.initialization_vector][google.cloud.kms.v1.RawDecryptRequest.initialization_vector]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received initialization_vector using this + * checksum. [KeyManagementService][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value initialization_vector_crc32c = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string|null + */ + public function getInitializationVectorCrc32CUnwrapped() + { + return $this->readWrapperValue("initialization_vector_crc32c"); + } + + /** + * Optional. An optional CRC32C checksum of the + * [RawDecryptRequest.initialization_vector][google.cloud.kms.v1.RawDecryptRequest.initialization_vector]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received initialization_vector using this + * checksum. [KeyManagementService][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value initialization_vector_crc32c = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setInitializationVectorCrc32C($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->initialization_vector_crc32c = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. + + * Optional. An optional CRC32C checksum of the + * [RawDecryptRequest.initialization_vector][google.cloud.kms.v1.RawDecryptRequest.initialization_vector]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received initialization_vector using this + * checksum. [KeyManagementService][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value initialization_vector_crc32c = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string|null $var + * @return $this + */ + public function setInitializationVectorCrc32CUnwrapped($var) + { + $this->writeWrapperValue("initialization_vector_crc32c", $var); + return $this;} + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/RawDecryptResponse.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/RawDecryptResponse.php new file mode 100644 index 000000000000..6ce9ba157ce9 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/RawDecryptResponse.php @@ -0,0 +1,511 @@ +google.cloud.kms.v1.RawDecryptResponse + */ +class RawDecryptResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The decrypted data. + * + * Generated from protobuf field bytes plaintext = 1; + */ + protected $plaintext = ''; + /** + * Integrity verification field. A CRC32C checksum of the returned + * [RawDecryptResponse.plaintext][google.cloud.kms.v1.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][google.cloud.kms.v1.KeyManagementService] is able to + * successfully decrypt the + * [ciphertext][google.cloud.kms.v1.RawDecryptRequest.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. + * + * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 2; + */ + protected $plaintext_crc32c = null; + /** + * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in + * decryption. + * + * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 3; + */ + protected $protection_level = 0; + /** + * Integrity verification field. A flag indicating whether + * [RawDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.RawDecryptRequest.ciphertext_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of the ciphertext. A false value of this + * field indicates either that + * [RawDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.RawDecryptRequest.ciphertext_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [RawDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.RawDecryptRequest.ciphertext_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * + * Generated from protobuf field bool verified_ciphertext_crc32c = 4; + */ + protected $verified_ciphertext_crc32c = false; + /** + * Integrity verification field. A flag indicating whether + * [RawDecryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.RawDecryptRequest.additional_authenticated_data_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.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][google.cloud.kms.v1.RawDecryptRequest.additional_authenticated_data_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [RawDecryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.RawDecryptRequest.additional_authenticated_data_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * + * Generated from protobuf field bool verified_additional_authenticated_data_crc32c = 5; + */ + protected $verified_additional_authenticated_data_crc32c = false; + /** + * Integrity verification field. A flag indicating whether + * [RawDecryptRequest.initialization_vector_crc32c][google.cloud.kms.v1.RawDecryptRequest.initialization_vector_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of initialization_vector. A false value of + * this field indicates either that + * [RawDecryptRequest.initialization_vector_crc32c][google.cloud.kms.v1.RawDecryptRequest.initialization_vector_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [RawDecryptRequest.initialization_vector_crc32c][google.cloud.kms.v1.RawDecryptRequest.initialization_vector_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * + * Generated from protobuf field bool verified_initialization_vector_crc32c = 6; + */ + protected $verified_initialization_vector_crc32c = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $plaintext + * The decrypted data. + * @type \Google\Protobuf\Int64Value $plaintext_crc32c + * Integrity verification field. A CRC32C checksum of the returned + * [RawDecryptResponse.plaintext][google.cloud.kms.v1.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][google.cloud.kms.v1.KeyManagementService] is able to + * successfully decrypt the + * [ciphertext][google.cloud.kms.v1.RawDecryptRequest.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. + * @type int $protection_level + * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in + * decryption. + * @type bool $verified_ciphertext_crc32c + * Integrity verification field. A flag indicating whether + * [RawDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.RawDecryptRequest.ciphertext_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of the ciphertext. A false value of this + * field indicates either that + * [RawDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.RawDecryptRequest.ciphertext_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [RawDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.RawDecryptRequest.ciphertext_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * @type bool $verified_additional_authenticated_data_crc32c + * Integrity verification field. A flag indicating whether + * [RawDecryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.RawDecryptRequest.additional_authenticated_data_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.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][google.cloud.kms.v1.RawDecryptRequest.additional_authenticated_data_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [RawDecryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.RawDecryptRequest.additional_authenticated_data_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * @type bool $verified_initialization_vector_crc32c + * Integrity verification field. A flag indicating whether + * [RawDecryptRequest.initialization_vector_crc32c][google.cloud.kms.v1.RawDecryptRequest.initialization_vector_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of initialization_vector. A false value of + * this field indicates either that + * [RawDecryptRequest.initialization_vector_crc32c][google.cloud.kms.v1.RawDecryptRequest.initialization_vector_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [RawDecryptRequest.initialization_vector_crc32c][google.cloud.kms.v1.RawDecryptRequest.initialization_vector_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * The decrypted data. + * + * Generated from protobuf field bytes plaintext = 1; + * @return string + */ + public function getPlaintext() + { + return $this->plaintext; + } + + /** + * The decrypted data. + * + * Generated from protobuf field bytes plaintext = 1; + * @param string $var + * @return $this + */ + public function setPlaintext($var) + { + GPBUtil::checkString($var, False); + $this->plaintext = $var; + + return $this; + } + + /** + * Integrity verification field. A CRC32C checksum of the returned + * [RawDecryptResponse.plaintext][google.cloud.kms.v1.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][google.cloud.kms.v1.KeyManagementService] is able to + * successfully decrypt the + * [ciphertext][google.cloud.kms.v1.RawDecryptRequest.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. + * + * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 2; + * @return \Google\Protobuf\Int64Value|null + */ + public function getPlaintextCrc32C() + { + return $this->plaintext_crc32c; + } + + public function hasPlaintextCrc32C() + { + return isset($this->plaintext_crc32c); + } + + public function clearPlaintextCrc32C() + { + unset($this->plaintext_crc32c); + } + + /** + * Returns the unboxed value from getPlaintextCrc32C() + + * Integrity verification field. A CRC32C checksum of the returned + * [RawDecryptResponse.plaintext][google.cloud.kms.v1.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][google.cloud.kms.v1.KeyManagementService] is able to + * successfully decrypt the + * [ciphertext][google.cloud.kms.v1.RawDecryptRequest.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. + * + * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 2; + * @return int|string|null + */ + public function getPlaintextCrc32CUnwrapped() + { + return $this->readWrapperValue("plaintext_crc32c"); + } + + /** + * Integrity verification field. A CRC32C checksum of the returned + * [RawDecryptResponse.plaintext][google.cloud.kms.v1.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][google.cloud.kms.v1.KeyManagementService] is able to + * successfully decrypt the + * [ciphertext][google.cloud.kms.v1.RawDecryptRequest.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. + * + * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 2; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setPlaintextCrc32C($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->plaintext_crc32c = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. + + * Integrity verification field. A CRC32C checksum of the returned + * [RawDecryptResponse.plaintext][google.cloud.kms.v1.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][google.cloud.kms.v1.KeyManagementService] is able to + * successfully decrypt the + * [ciphertext][google.cloud.kms.v1.RawDecryptRequest.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. + * + * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 2; + * @param int|string|null $var + * @return $this + */ + public function setPlaintextCrc32CUnwrapped($var) + { + $this->writeWrapperValue("plaintext_crc32c", $var); + return $this;} + + /** + * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in + * decryption. + * + * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 3; + * @return int + */ + public function getProtectionLevel() + { + return $this->protection_level; + } + + /** + * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in + * decryption. + * + * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 3; + * @param int $var + * @return $this + */ + public function setProtectionLevel($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\ProtectionLevel::class); + $this->protection_level = $var; + + return $this; + } + + /** + * Integrity verification field. A flag indicating whether + * [RawDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.RawDecryptRequest.ciphertext_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of the ciphertext. A false value of this + * field indicates either that + * [RawDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.RawDecryptRequest.ciphertext_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [RawDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.RawDecryptRequest.ciphertext_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * + * Generated from protobuf field bool verified_ciphertext_crc32c = 4; + * @return bool + */ + public function getVerifiedCiphertextCrc32C() + { + return $this->verified_ciphertext_crc32c; + } + + /** + * Integrity verification field. A flag indicating whether + * [RawDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.RawDecryptRequest.ciphertext_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of the ciphertext. A false value of this + * field indicates either that + * [RawDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.RawDecryptRequest.ciphertext_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [RawDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.RawDecryptRequest.ciphertext_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * + * Generated from protobuf field bool verified_ciphertext_crc32c = 4; + * @param bool $var + * @return $this + */ + public function setVerifiedCiphertextCrc32C($var) + { + GPBUtil::checkBool($var); + $this->verified_ciphertext_crc32c = $var; + + return $this; + } + + /** + * Integrity verification field. A flag indicating whether + * [RawDecryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.RawDecryptRequest.additional_authenticated_data_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.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][google.cloud.kms.v1.RawDecryptRequest.additional_authenticated_data_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [RawDecryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.RawDecryptRequest.additional_authenticated_data_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * + * Generated from protobuf field bool verified_additional_authenticated_data_crc32c = 5; + * @return bool + */ + public function getVerifiedAdditionalAuthenticatedDataCrc32C() + { + return $this->verified_additional_authenticated_data_crc32c; + } + + /** + * Integrity verification field. A flag indicating whether + * [RawDecryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.RawDecryptRequest.additional_authenticated_data_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.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][google.cloud.kms.v1.RawDecryptRequest.additional_authenticated_data_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [RawDecryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.RawDecryptRequest.additional_authenticated_data_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * + * Generated from protobuf field bool verified_additional_authenticated_data_crc32c = 5; + * @param bool $var + * @return $this + */ + public function setVerifiedAdditionalAuthenticatedDataCrc32C($var) + { + GPBUtil::checkBool($var); + $this->verified_additional_authenticated_data_crc32c = $var; + + return $this; + } + + /** + * Integrity verification field. A flag indicating whether + * [RawDecryptRequest.initialization_vector_crc32c][google.cloud.kms.v1.RawDecryptRequest.initialization_vector_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of initialization_vector. A false value of + * this field indicates either that + * [RawDecryptRequest.initialization_vector_crc32c][google.cloud.kms.v1.RawDecryptRequest.initialization_vector_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [RawDecryptRequest.initialization_vector_crc32c][google.cloud.kms.v1.RawDecryptRequest.initialization_vector_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * + * Generated from protobuf field bool verified_initialization_vector_crc32c = 6; + * @return bool + */ + public function getVerifiedInitializationVectorCrc32C() + { + return $this->verified_initialization_vector_crc32c; + } + + /** + * Integrity verification field. A flag indicating whether + * [RawDecryptRequest.initialization_vector_crc32c][google.cloud.kms.v1.RawDecryptRequest.initialization_vector_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of initialization_vector. A false value of + * this field indicates either that + * [RawDecryptRequest.initialization_vector_crc32c][google.cloud.kms.v1.RawDecryptRequest.initialization_vector_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [RawDecryptRequest.initialization_vector_crc32c][google.cloud.kms.v1.RawDecryptRequest.initialization_vector_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * + * Generated from protobuf field bool verified_initialization_vector_crc32c = 6; + * @param bool $var + * @return $this + */ + public function setVerifiedInitializationVectorCrc32C($var) + { + GPBUtil::checkBool($var); + $this->verified_initialization_vector_crc32c = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/RawEncryptRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/RawEncryptRequest.php new file mode 100644 index 000000000000..1f1d581d1d0d --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/RawEncryptRequest.php @@ -0,0 +1,743 @@ +google.cloud.kms.v1.RawEncryptRequest + */ +class RawEncryptRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for + * encryption. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Required. The data to encrypt. Must be no larger than 64KiB. + * The maximum size depends on the key version's + * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]. + * For [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE] keys, the + * plaintext must be no larger than 64KiB. For + * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] keys, the combined length of + * the plaintext and additional_authenticated_data fields must be no larger + * than 8KiB. + * + * Generated from protobuf field bytes plaintext = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $plaintext = ''; + /** + * Optional. Optional data that, if specified, must also be provided during + * decryption through + * [RawDecryptRequest.additional_authenticated_data][google.cloud.kms.v1.RawDecryptRequest.additional_authenticated_data]. + * This field may only be used in conjunction with an + * [algorithm][google.cloud.kms.v1.CryptoKeyVersion.algorithm] that accepts + * additional authenticated data (for example, AES-GCM). + * The maximum size depends on the key version's + * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]. + * For [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE] keys, the + * plaintext must be no larger than 64KiB. For + * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] keys, the combined length of + * the plaintext and additional_authenticated_data fields must be no larger + * than 8KiB. + * + * Generated from protobuf field bytes additional_authenticated_data = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $additional_authenticated_data = ''; + /** + * Optional. An optional CRC32C checksum of the + * [RawEncryptRequest.plaintext][google.cloud.kms.v1.RawEncryptRequest.plaintext]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received plaintext using this checksum. + * [KeyManagementService][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $plaintext_crc32c = null; + /** + * Optional. An optional CRC32C checksum of the + * [RawEncryptRequest.additional_authenticated_data][google.cloud.kms.v1.RawEncryptRequest.additional_authenticated_data]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received additional_authenticated_data using + * this checksum. + * [KeyManagementService][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value additional_authenticated_data_crc32c = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $additional_authenticated_data_crc32c = null; + /** + * 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][google.cloud.kms.v1.RawEncryptResponse.initialization_vector]. + * + * Generated from protobuf field bytes initialization_vector = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $initialization_vector = ''; + /** + * Optional. An optional CRC32C checksum of the + * [RawEncryptRequest.initialization_vector][google.cloud.kms.v1.RawEncryptRequest.initialization_vector]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received initialization_vector using this + * checksum. [KeyManagementService][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value initialization_vector_crc32c = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $initialization_vector_crc32c = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for + * encryption. + * @type string $plaintext + * Required. The data to encrypt. Must be no larger than 64KiB. + * The maximum size depends on the key version's + * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]. + * For [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE] keys, the + * plaintext must be no larger than 64KiB. For + * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] keys, the combined length of + * the plaintext and additional_authenticated_data fields must be no larger + * than 8KiB. + * @type string $additional_authenticated_data + * Optional. Optional data that, if specified, must also be provided during + * decryption through + * [RawDecryptRequest.additional_authenticated_data][google.cloud.kms.v1.RawDecryptRequest.additional_authenticated_data]. + * This field may only be used in conjunction with an + * [algorithm][google.cloud.kms.v1.CryptoKeyVersion.algorithm] that accepts + * additional authenticated data (for example, AES-GCM). + * The maximum size depends on the key version's + * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]. + * For [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE] keys, the + * plaintext must be no larger than 64KiB. For + * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] keys, the combined length of + * the plaintext and additional_authenticated_data fields must be no larger + * than 8KiB. + * @type \Google\Protobuf\Int64Value $plaintext_crc32c + * Optional. An optional CRC32C checksum of the + * [RawEncryptRequest.plaintext][google.cloud.kms.v1.RawEncryptRequest.plaintext]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received plaintext using this checksum. + * [KeyManagementService][google.cloud.kms.v1.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. + * @type \Google\Protobuf\Int64Value $additional_authenticated_data_crc32c + * Optional. An optional CRC32C checksum of the + * [RawEncryptRequest.additional_authenticated_data][google.cloud.kms.v1.RawEncryptRequest.additional_authenticated_data]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received additional_authenticated_data using + * this checksum. + * [KeyManagementService][google.cloud.kms.v1.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. + * @type string $initialization_vector + * 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][google.cloud.kms.v1.RawEncryptResponse.initialization_vector]. + * @type \Google\Protobuf\Int64Value $initialization_vector_crc32c + * Optional. An optional CRC32C checksum of the + * [RawEncryptRequest.initialization_vector][google.cloud.kms.v1.RawEncryptRequest.initialization_vector]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received initialization_vector using this + * checksum. [KeyManagementService][google.cloud.kms.v1.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. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for + * encryption. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for + * encryption. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The data to encrypt. Must be no larger than 64KiB. + * The maximum size depends on the key version's + * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]. + * For [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE] keys, the + * plaintext must be no larger than 64KiB. For + * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] keys, the combined length of + * the plaintext and additional_authenticated_data fields must be no larger + * than 8KiB. + * + * Generated from protobuf field bytes plaintext = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPlaintext() + { + return $this->plaintext; + } + + /** + * Required. The data to encrypt. Must be no larger than 64KiB. + * The maximum size depends on the key version's + * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]. + * For [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE] keys, the + * plaintext must be no larger than 64KiB. For + * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] keys, the combined length of + * the plaintext and additional_authenticated_data fields must be no larger + * than 8KiB. + * + * Generated from protobuf field bytes plaintext = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPlaintext($var) + { + GPBUtil::checkString($var, False); + $this->plaintext = $var; + + return $this; + } + + /** + * Optional. Optional data that, if specified, must also be provided during + * decryption through + * [RawDecryptRequest.additional_authenticated_data][google.cloud.kms.v1.RawDecryptRequest.additional_authenticated_data]. + * This field may only be used in conjunction with an + * [algorithm][google.cloud.kms.v1.CryptoKeyVersion.algorithm] that accepts + * additional authenticated data (for example, AES-GCM). + * The maximum size depends on the key version's + * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]. + * For [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE] keys, the + * plaintext must be no larger than 64KiB. For + * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] keys, the combined length of + * the plaintext and additional_authenticated_data fields must be no larger + * than 8KiB. + * + * Generated from protobuf field bytes additional_authenticated_data = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getAdditionalAuthenticatedData() + { + return $this->additional_authenticated_data; + } + + /** + * Optional. Optional data that, if specified, must also be provided during + * decryption through + * [RawDecryptRequest.additional_authenticated_data][google.cloud.kms.v1.RawDecryptRequest.additional_authenticated_data]. + * This field may only be used in conjunction with an + * [algorithm][google.cloud.kms.v1.CryptoKeyVersion.algorithm] that accepts + * additional authenticated data (for example, AES-GCM). + * The maximum size depends on the key version's + * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]. + * For [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE] keys, the + * plaintext must be no larger than 64KiB. For + * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] keys, the combined length of + * the plaintext and additional_authenticated_data fields must be no larger + * than 8KiB. + * + * Generated from protobuf field bytes additional_authenticated_data = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setAdditionalAuthenticatedData($var) + { + GPBUtil::checkString($var, False); + $this->additional_authenticated_data = $var; + + return $this; + } + + /** + * Optional. An optional CRC32C checksum of the + * [RawEncryptRequest.plaintext][google.cloud.kms.v1.RawEncryptRequest.plaintext]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received plaintext using this checksum. + * [KeyManagementService][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Int64Value|null + */ + public function getPlaintextCrc32C() + { + return $this->plaintext_crc32c; + } + + public function hasPlaintextCrc32C() + { + return isset($this->plaintext_crc32c); + } + + public function clearPlaintextCrc32C() + { + unset($this->plaintext_crc32c); + } + + /** + * Returns the unboxed value from getPlaintextCrc32C() + + * Optional. An optional CRC32C checksum of the + * [RawEncryptRequest.plaintext][google.cloud.kms.v1.RawEncryptRequest.plaintext]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received plaintext using this checksum. + * [KeyManagementService][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string|null + */ + public function getPlaintextCrc32CUnwrapped() + { + return $this->readWrapperValue("plaintext_crc32c"); + } + + /** + * Optional. An optional CRC32C checksum of the + * [RawEncryptRequest.plaintext][google.cloud.kms.v1.RawEncryptRequest.plaintext]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received plaintext using this checksum. + * [KeyManagementService][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setPlaintextCrc32C($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->plaintext_crc32c = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. + + * Optional. An optional CRC32C checksum of the + * [RawEncryptRequest.plaintext][google.cloud.kms.v1.RawEncryptRequest.plaintext]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received plaintext using this checksum. + * [KeyManagementService][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string|null $var + * @return $this + */ + public function setPlaintextCrc32CUnwrapped($var) + { + $this->writeWrapperValue("plaintext_crc32c", $var); + return $this;} + + /** + * Optional. An optional CRC32C checksum of the + * [RawEncryptRequest.additional_authenticated_data][google.cloud.kms.v1.RawEncryptRequest.additional_authenticated_data]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received additional_authenticated_data using + * this checksum. + * [KeyManagementService][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value additional_authenticated_data_crc32c = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Int64Value|null + */ + public function getAdditionalAuthenticatedDataCrc32C() + { + return $this->additional_authenticated_data_crc32c; + } + + public function hasAdditionalAuthenticatedDataCrc32C() + { + return isset($this->additional_authenticated_data_crc32c); + } + + public function clearAdditionalAuthenticatedDataCrc32C() + { + unset($this->additional_authenticated_data_crc32c); + } + + /** + * Returns the unboxed value from getAdditionalAuthenticatedDataCrc32C() + + * Optional. An optional CRC32C checksum of the + * [RawEncryptRequest.additional_authenticated_data][google.cloud.kms.v1.RawEncryptRequest.additional_authenticated_data]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received additional_authenticated_data using + * this checksum. + * [KeyManagementService][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value additional_authenticated_data_crc32c = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string|null + */ + public function getAdditionalAuthenticatedDataCrc32CUnwrapped() + { + return $this->readWrapperValue("additional_authenticated_data_crc32c"); + } + + /** + * Optional. An optional CRC32C checksum of the + * [RawEncryptRequest.additional_authenticated_data][google.cloud.kms.v1.RawEncryptRequest.additional_authenticated_data]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received additional_authenticated_data using + * this checksum. + * [KeyManagementService][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value additional_authenticated_data_crc32c = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setAdditionalAuthenticatedDataCrc32C($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->additional_authenticated_data_crc32c = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. + + * Optional. An optional CRC32C checksum of the + * [RawEncryptRequest.additional_authenticated_data][google.cloud.kms.v1.RawEncryptRequest.additional_authenticated_data]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received additional_authenticated_data using + * this checksum. + * [KeyManagementService][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value additional_authenticated_data_crc32c = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string|null $var + * @return $this + */ + public function setAdditionalAuthenticatedDataCrc32CUnwrapped($var) + { + $this->writeWrapperValue("additional_authenticated_data_crc32c", $var); + return $this;} + + /** + * 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][google.cloud.kms.v1.RawEncryptResponse.initialization_vector]. + * + * Generated from protobuf field bytes initialization_vector = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getInitializationVector() + { + return $this->initialization_vector; + } + + /** + * 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][google.cloud.kms.v1.RawEncryptResponse.initialization_vector]. + * + * Generated from protobuf field bytes initialization_vector = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setInitializationVector($var) + { + GPBUtil::checkString($var, False); + $this->initialization_vector = $var; + + return $this; + } + + /** + * Optional. An optional CRC32C checksum of the + * [RawEncryptRequest.initialization_vector][google.cloud.kms.v1.RawEncryptRequest.initialization_vector]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received initialization_vector using this + * checksum. [KeyManagementService][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value initialization_vector_crc32c = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Int64Value|null + */ + public function getInitializationVectorCrc32C() + { + return $this->initialization_vector_crc32c; + } + + public function hasInitializationVectorCrc32C() + { + return isset($this->initialization_vector_crc32c); + } + + public function clearInitializationVectorCrc32C() + { + unset($this->initialization_vector_crc32c); + } + + /** + * Returns the unboxed value from getInitializationVectorCrc32C() + + * Optional. An optional CRC32C checksum of the + * [RawEncryptRequest.initialization_vector][google.cloud.kms.v1.RawEncryptRequest.initialization_vector]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received initialization_vector using this + * checksum. [KeyManagementService][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value initialization_vector_crc32c = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string|null + */ + public function getInitializationVectorCrc32CUnwrapped() + { + return $this->readWrapperValue("initialization_vector_crc32c"); + } + + /** + * Optional. An optional CRC32C checksum of the + * [RawEncryptRequest.initialization_vector][google.cloud.kms.v1.RawEncryptRequest.initialization_vector]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received initialization_vector using this + * checksum. [KeyManagementService][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value initialization_vector_crc32c = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setInitializationVectorCrc32C($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->initialization_vector_crc32c = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. + + * Optional. An optional CRC32C checksum of the + * [RawEncryptRequest.initialization_vector][google.cloud.kms.v1.RawEncryptRequest.initialization_vector]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received initialization_vector using this + * checksum. [KeyManagementService][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value initialization_vector_crc32c = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string|null $var + * @return $this + */ + public function setInitializationVectorCrc32CUnwrapped($var) + { + $this->writeWrapperValue("initialization_vector_crc32c", $var); + return $this;} + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/RawEncryptResponse.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/RawEncryptResponse.php new file mode 100644 index 000000000000..b779e66f66c8 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/RawEncryptResponse.php @@ -0,0 +1,744 @@ +google.cloud.kms.v1.RawEncryptResponse + */ +class RawEncryptResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The encrypted data. In the case of AES-GCM, the authentication tag + * is the [tag_length][google.cloud.kms.v1.RawEncryptResponse.tag_length] + * bytes at the end of this field. + * + * Generated from protobuf field bytes ciphertext = 1; + */ + protected $ciphertext = ''; + /** + * The initialization vector (IV) generated by the service during + * encryption. This value must be stored and provided in + * [RawDecryptRequest.initialization_vector][google.cloud.kms.v1.RawDecryptRequest.initialization_vector] + * at decryption time. + * + * Generated from protobuf field bytes initialization_vector = 2; + */ + protected $initialization_vector = ''; + /** + * The length of the authentication tag that is appended to + * the end of the ciphertext. + * + * Generated from protobuf field int32 tag_length = 3; + */ + protected $tag_length = 0; + /** + * Integrity verification field. A CRC32C checksum of the returned + * [RawEncryptResponse.ciphertext][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 4; + */ + protected $ciphertext_crc32c = null; + /** + * Integrity verification field. A CRC32C checksum of the returned + * [RawEncryptResponse.initialization_vector][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value initialization_vector_crc32c = 5; + */ + protected $initialization_vector_crc32c = null; + /** + * Integrity verification field. A flag indicating whether + * [RawEncryptRequest.plaintext_crc32c][google.cloud.kms.v1.RawEncryptRequest.plaintext_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of the plaintext. A false value of this + * field indicates either that + * [RawEncryptRequest.plaintext_crc32c][google.cloud.kms.v1.RawEncryptRequest.plaintext_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [RawEncryptRequest.plaintext_crc32c][google.cloud.kms.v1.RawEncryptRequest.plaintext_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * + * Generated from protobuf field bool verified_plaintext_crc32c = 6; + */ + protected $verified_plaintext_crc32c = false; + /** + * Integrity verification field. A flag indicating whether + * [RawEncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.RawEncryptRequest.additional_authenticated_data_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.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][google.cloud.kms.v1.RawEncryptRequest.additional_authenticated_data_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [RawEncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.RawEncryptRequest.additional_authenticated_data_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * + * Generated from protobuf field bool verified_additional_authenticated_data_crc32c = 7; + */ + protected $verified_additional_authenticated_data_crc32c = false; + /** + * Integrity verification field. A flag indicating whether + * [RawEncryptRequest.initialization_vector_crc32c][google.cloud.kms.v1.RawEncryptRequest.initialization_vector_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of initialization_vector. A false value of + * this field indicates either that + * [RawEncryptRequest.initialization_vector_crc32c][google.cloud.kms.v1.RawEncryptRequest.initialization_vector_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [RawEncryptRequest.initialization_vector_crc32c][google.cloud.kms.v1.RawEncryptRequest.initialization_vector_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * + * Generated from protobuf field bool verified_initialization_vector_crc32c = 10; + */ + protected $verified_initialization_vector_crc32c = false; + /** + * The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in + * encryption. Check this field to verify that the intended resource was used + * for encryption. + * + * Generated from protobuf field string name = 8; + */ + protected $name = ''; + /** + * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in + * encryption. + * + * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 9; + */ + protected $protection_level = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $ciphertext + * The encrypted data. In the case of AES-GCM, the authentication tag + * is the [tag_length][google.cloud.kms.v1.RawEncryptResponse.tag_length] + * bytes at the end of this field. + * @type string $initialization_vector + * The initialization vector (IV) generated by the service during + * encryption. This value must be stored and provided in + * [RawDecryptRequest.initialization_vector][google.cloud.kms.v1.RawDecryptRequest.initialization_vector] + * at decryption time. + * @type int $tag_length + * The length of the authentication tag that is appended to + * the end of the ciphertext. + * @type \Google\Protobuf\Int64Value $ciphertext_crc32c + * Integrity verification field. A CRC32C checksum of the returned + * [RawEncryptResponse.ciphertext][google.cloud.kms.v1.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. + * @type \Google\Protobuf\Int64Value $initialization_vector_crc32c + * Integrity verification field. A CRC32C checksum of the returned + * [RawEncryptResponse.initialization_vector][google.cloud.kms.v1.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. + * @type bool $verified_plaintext_crc32c + * Integrity verification field. A flag indicating whether + * [RawEncryptRequest.plaintext_crc32c][google.cloud.kms.v1.RawEncryptRequest.plaintext_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of the plaintext. A false value of this + * field indicates either that + * [RawEncryptRequest.plaintext_crc32c][google.cloud.kms.v1.RawEncryptRequest.plaintext_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [RawEncryptRequest.plaintext_crc32c][google.cloud.kms.v1.RawEncryptRequest.plaintext_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * @type bool $verified_additional_authenticated_data_crc32c + * Integrity verification field. A flag indicating whether + * [RawEncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.RawEncryptRequest.additional_authenticated_data_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.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][google.cloud.kms.v1.RawEncryptRequest.additional_authenticated_data_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [RawEncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.RawEncryptRequest.additional_authenticated_data_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * @type bool $verified_initialization_vector_crc32c + * Integrity verification field. A flag indicating whether + * [RawEncryptRequest.initialization_vector_crc32c][google.cloud.kms.v1.RawEncryptRequest.initialization_vector_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of initialization_vector. A false value of + * this field indicates either that + * [RawEncryptRequest.initialization_vector_crc32c][google.cloud.kms.v1.RawEncryptRequest.initialization_vector_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [RawEncryptRequest.initialization_vector_crc32c][google.cloud.kms.v1.RawEncryptRequest.initialization_vector_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * @type string $name + * The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in + * encryption. Check this field to verify that the intended resource was used + * for encryption. + * @type int $protection_level + * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in + * encryption. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * The encrypted data. In the case of AES-GCM, the authentication tag + * is the [tag_length][google.cloud.kms.v1.RawEncryptResponse.tag_length] + * bytes at the end of this field. + * + * Generated from protobuf field bytes ciphertext = 1; + * @return string + */ + public function getCiphertext() + { + return $this->ciphertext; + } + + /** + * The encrypted data. In the case of AES-GCM, the authentication tag + * is the [tag_length][google.cloud.kms.v1.RawEncryptResponse.tag_length] + * bytes at the end of this field. + * + * Generated from protobuf field bytes ciphertext = 1; + * @param string $var + * @return $this + */ + public function setCiphertext($var) + { + GPBUtil::checkString($var, False); + $this->ciphertext = $var; + + return $this; + } + + /** + * The initialization vector (IV) generated by the service during + * encryption. This value must be stored and provided in + * [RawDecryptRequest.initialization_vector][google.cloud.kms.v1.RawDecryptRequest.initialization_vector] + * at decryption time. + * + * Generated from protobuf field bytes initialization_vector = 2; + * @return string + */ + public function getInitializationVector() + { + return $this->initialization_vector; + } + + /** + * The initialization vector (IV) generated by the service during + * encryption. This value must be stored and provided in + * [RawDecryptRequest.initialization_vector][google.cloud.kms.v1.RawDecryptRequest.initialization_vector] + * at decryption time. + * + * Generated from protobuf field bytes initialization_vector = 2; + * @param string $var + * @return $this + */ + public function setInitializationVector($var) + { + GPBUtil::checkString($var, False); + $this->initialization_vector = $var; + + return $this; + } + + /** + * The length of the authentication tag that is appended to + * the end of the ciphertext. + * + * Generated from protobuf field int32 tag_length = 3; + * @return int + */ + public function getTagLength() + { + return $this->tag_length; + } + + /** + * The length of the authentication tag that is appended to + * the end of the ciphertext. + * + * Generated from protobuf field int32 tag_length = 3; + * @param int $var + * @return $this + */ + public function setTagLength($var) + { + GPBUtil::checkInt32($var); + $this->tag_length = $var; + + return $this; + } + + /** + * Integrity verification field. A CRC32C checksum of the returned + * [RawEncryptResponse.ciphertext][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 4; + * @return \Google\Protobuf\Int64Value|null + */ + public function getCiphertextCrc32C() + { + return $this->ciphertext_crc32c; + } + + public function hasCiphertextCrc32C() + { + return isset($this->ciphertext_crc32c); + } + + public function clearCiphertextCrc32C() + { + unset($this->ciphertext_crc32c); + } + + /** + * Returns the unboxed value from getCiphertextCrc32C() + + * Integrity verification field. A CRC32C checksum of the returned + * [RawEncryptResponse.ciphertext][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 4; + * @return int|string|null + */ + public function getCiphertextCrc32CUnwrapped() + { + return $this->readWrapperValue("ciphertext_crc32c"); + } + + /** + * Integrity verification field. A CRC32C checksum of the returned + * [RawEncryptResponse.ciphertext][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 4; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setCiphertextCrc32C($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->ciphertext_crc32c = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. + + * Integrity verification field. A CRC32C checksum of the returned + * [RawEncryptResponse.ciphertext][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 4; + * @param int|string|null $var + * @return $this + */ + public function setCiphertextCrc32CUnwrapped($var) + { + $this->writeWrapperValue("ciphertext_crc32c", $var); + return $this;} + + /** + * Integrity verification field. A CRC32C checksum of the returned + * [RawEncryptResponse.initialization_vector][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value initialization_vector_crc32c = 5; + * @return \Google\Protobuf\Int64Value|null + */ + public function getInitializationVectorCrc32C() + { + return $this->initialization_vector_crc32c; + } + + public function hasInitializationVectorCrc32C() + { + return isset($this->initialization_vector_crc32c); + } + + public function clearInitializationVectorCrc32C() + { + unset($this->initialization_vector_crc32c); + } + + /** + * Returns the unboxed value from getInitializationVectorCrc32C() + + * Integrity verification field. A CRC32C checksum of the returned + * [RawEncryptResponse.initialization_vector][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value initialization_vector_crc32c = 5; + * @return int|string|null + */ + public function getInitializationVectorCrc32CUnwrapped() + { + return $this->readWrapperValue("initialization_vector_crc32c"); + } + + /** + * Integrity verification field. A CRC32C checksum of the returned + * [RawEncryptResponse.initialization_vector][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value initialization_vector_crc32c = 5; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setInitializationVectorCrc32C($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->initialization_vector_crc32c = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. + + * Integrity verification field. A CRC32C checksum of the returned + * [RawEncryptResponse.initialization_vector][google.cloud.kms.v1.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. + * + * Generated from protobuf field .google.protobuf.Int64Value initialization_vector_crc32c = 5; + * @param int|string|null $var + * @return $this + */ + public function setInitializationVectorCrc32CUnwrapped($var) + { + $this->writeWrapperValue("initialization_vector_crc32c", $var); + return $this;} + + /** + * Integrity verification field. A flag indicating whether + * [RawEncryptRequest.plaintext_crc32c][google.cloud.kms.v1.RawEncryptRequest.plaintext_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of the plaintext. A false value of this + * field indicates either that + * [RawEncryptRequest.plaintext_crc32c][google.cloud.kms.v1.RawEncryptRequest.plaintext_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [RawEncryptRequest.plaintext_crc32c][google.cloud.kms.v1.RawEncryptRequest.plaintext_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * + * Generated from protobuf field bool verified_plaintext_crc32c = 6; + * @return bool + */ + public function getVerifiedPlaintextCrc32C() + { + return $this->verified_plaintext_crc32c; + } + + /** + * Integrity verification field. A flag indicating whether + * [RawEncryptRequest.plaintext_crc32c][google.cloud.kms.v1.RawEncryptRequest.plaintext_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of the plaintext. A false value of this + * field indicates either that + * [RawEncryptRequest.plaintext_crc32c][google.cloud.kms.v1.RawEncryptRequest.plaintext_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [RawEncryptRequest.plaintext_crc32c][google.cloud.kms.v1.RawEncryptRequest.plaintext_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * + * Generated from protobuf field bool verified_plaintext_crc32c = 6; + * @param bool $var + * @return $this + */ + public function setVerifiedPlaintextCrc32C($var) + { + GPBUtil::checkBool($var); + $this->verified_plaintext_crc32c = $var; + + return $this; + } + + /** + * Integrity verification field. A flag indicating whether + * [RawEncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.RawEncryptRequest.additional_authenticated_data_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.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][google.cloud.kms.v1.RawEncryptRequest.additional_authenticated_data_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [RawEncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.RawEncryptRequest.additional_authenticated_data_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * + * Generated from protobuf field bool verified_additional_authenticated_data_crc32c = 7; + * @return bool + */ + public function getVerifiedAdditionalAuthenticatedDataCrc32C() + { + return $this->verified_additional_authenticated_data_crc32c; + } + + /** + * Integrity verification field. A flag indicating whether + * [RawEncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.RawEncryptRequest.additional_authenticated_data_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.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][google.cloud.kms.v1.RawEncryptRequest.additional_authenticated_data_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [RawEncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.RawEncryptRequest.additional_authenticated_data_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * + * Generated from protobuf field bool verified_additional_authenticated_data_crc32c = 7; + * @param bool $var + * @return $this + */ + public function setVerifiedAdditionalAuthenticatedDataCrc32C($var) + { + GPBUtil::checkBool($var); + $this->verified_additional_authenticated_data_crc32c = $var; + + return $this; + } + + /** + * Integrity verification field. A flag indicating whether + * [RawEncryptRequest.initialization_vector_crc32c][google.cloud.kms.v1.RawEncryptRequest.initialization_vector_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of initialization_vector. A false value of + * this field indicates either that + * [RawEncryptRequest.initialization_vector_crc32c][google.cloud.kms.v1.RawEncryptRequest.initialization_vector_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [RawEncryptRequest.initialization_vector_crc32c][google.cloud.kms.v1.RawEncryptRequest.initialization_vector_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * + * Generated from protobuf field bool verified_initialization_vector_crc32c = 10; + * @return bool + */ + public function getVerifiedInitializationVectorCrc32C() + { + return $this->verified_initialization_vector_crc32c; + } + + /** + * Integrity verification field. A flag indicating whether + * [RawEncryptRequest.initialization_vector_crc32c][google.cloud.kms.v1.RawEncryptRequest.initialization_vector_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of initialization_vector. A false value of + * this field indicates either that + * [RawEncryptRequest.initialization_vector_crc32c][google.cloud.kms.v1.RawEncryptRequest.initialization_vector_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [RawEncryptRequest.initialization_vector_crc32c][google.cloud.kms.v1.RawEncryptRequest.initialization_vector_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * + * Generated from protobuf field bool verified_initialization_vector_crc32c = 10; + * @param bool $var + * @return $this + */ + public function setVerifiedInitializationVectorCrc32C($var) + { + GPBUtil::checkBool($var); + $this->verified_initialization_vector_crc32c = $var; + + return $this; + } + + /** + * The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in + * encryption. Check this field to verify that the intended resource was used + * for encryption. + * + * Generated from protobuf field string name = 8; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in + * encryption. Check this field to verify that the intended resource was used + * for encryption. + * + * Generated from protobuf field string name = 8; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in + * encryption. + * + * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 9; + * @return int + */ + public function getProtectionLevel() + { + return $this->protection_level; + } + + /** + * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in + * encryption. + * + * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 9; + * @param int $var + * @return $this + */ + public function setProtectionLevel($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\ProtectionLevel::class); + $this->protection_level = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/RestoreCryptoKeyVersionRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/RestoreCryptoKeyVersionRequest.php new file mode 100644 index 000000000000..d62fe8e8863c --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/RestoreCryptoKeyVersionRequest.php @@ -0,0 +1,87 @@ +google.cloud.kms.v1.RestoreCryptoKeyVersionRequest + */ +class RestoreCryptoKeyVersionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to restore. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to restore. Please see + * {@see KeyManagementServiceClient::cryptoKeyVersionName()} for help formatting this field. + * + * @return \Google\Cloud\Kms\V1\RestoreCryptoKeyVersionRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to restore. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to restore. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to restore. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/RetiredResource.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/RetiredResource.php new file mode 100644 index 000000000000..c77dddde52b5 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/RetiredResource.php @@ -0,0 +1,202 @@ +google.cloud.kms.v1.RetiredResource + */ +class RetiredResource extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Identifier. The resource name for this + * [RetiredResource][google.cloud.kms.v1.RetiredResource] in the format + * `projects/*/locations/*/retiredResources/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. The full resource name of the original + * [CryptoKey][google.cloud.kms.v1.CryptoKey] that was deleted in the format + * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. + * + * Generated from protobuf field string original_resource = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $original_resource = ''; + /** + * Output only. The resource type of the original deleted resource. + * + * Generated from protobuf field string resource_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $resource_type = ''; + /** + * Output only. The time at which the original resource was deleted and this + * RetiredResource record was created. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $delete_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. Identifier. The resource name for this + * [RetiredResource][google.cloud.kms.v1.RetiredResource] in the format + * `projects/*/locations/*/retiredResources/*`. + * @type string $original_resource + * Output only. The full resource name of the original + * [CryptoKey][google.cloud.kms.v1.CryptoKey] that was deleted in the format + * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. + * @type string $resource_type + * Output only. The resource type of the original deleted resource. + * @type \Google\Protobuf\Timestamp $delete_time + * Output only. The time at which the original resource was deleted and this + * RetiredResource record was created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Identifier. The resource name for this + * [RetiredResource][google.cloud.kms.v1.RetiredResource] in the format + * `projects/*/locations/*/retiredResources/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. Identifier. The resource name for this + * [RetiredResource][google.cloud.kms.v1.RetiredResource] in the format + * `projects/*/locations/*/retiredResources/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The full resource name of the original + * [CryptoKey][google.cloud.kms.v1.CryptoKey] that was deleted in the format + * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. + * + * Generated from protobuf field string original_resource = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getOriginalResource() + { + return $this->original_resource; + } + + /** + * Output only. The full resource name of the original + * [CryptoKey][google.cloud.kms.v1.CryptoKey] that was deleted in the format + * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. + * + * Generated from protobuf field string original_resource = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setOriginalResource($var) + { + GPBUtil::checkString($var, True); + $this->original_resource = $var; + + return $this; + } + + /** + * Output only. The resource type of the original deleted resource. + * + * Generated from protobuf field string resource_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getResourceType() + { + return $this->resource_type; + } + + /** + * Output only. The resource type of the original deleted resource. + * + * Generated from protobuf field string resource_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setResourceType($var) + { + GPBUtil::checkString($var, True); + $this->resource_type = $var; + + return $this; + } + + /** + * Output only. The time at which the original resource was deleted and this + * RetiredResource record was created. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getDeleteTime() + { + return $this->delete_time; + } + + public function hasDeleteTime() + { + return isset($this->delete_time); + } + + public function clearDeleteTime() + { + unset($this->delete_time); + } + + /** + * Output only. The time at which the original resource was deleted and this + * RetiredResource record was created. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setDeleteTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->delete_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ShowEffectiveAutokeyConfigRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ShowEffectiveAutokeyConfigRequest.php new file mode 100644 index 000000000000..d92a39db1b36 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ShowEffectiveAutokeyConfigRequest.php @@ -0,0 +1,92 @@ +google.cloud.kms.v1.ShowEffectiveAutokeyConfigRequest + */ +class ShowEffectiveAutokeyConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * 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. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + + /** + * @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. Please see + * {@see AutokeyAdminClient::projectName()} for help formatting this field. + * + * @return \Google\Cloud\Kms\V1\ShowEffectiveAutokeyConfigRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type 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. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\AutokeyAdmin::initOnce(); + parent::__construct($data); + } + + /** + * 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. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->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. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ShowEffectiveAutokeyConfigResponse.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ShowEffectiveAutokeyConfigResponse.php new file mode 100644 index 000000000000..418d222e0779 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ShowEffectiveAutokeyConfigResponse.php @@ -0,0 +1,72 @@ +google.cloud.kms.v1.ShowEffectiveAutokeyConfigResponse + */ +class ShowEffectiveAutokeyConfigResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Name of the key project configured in the resource project's folder + * ancestry. + * + * Generated from protobuf field string key_project = 1; + */ + protected $key_project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $key_project + * Name of the key project configured in the resource project's folder + * ancestry. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\AutokeyAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Name of the key project configured in the resource project's folder + * ancestry. + * + * Generated from protobuf field string key_project = 1; + * @return string + */ + public function getKeyProject() + { + return $this->key_project; + } + + /** + * Name of the key project configured in the resource project's folder + * ancestry. + * + * Generated from protobuf field string key_project = 1; + * @param string $var + * @return $this + */ + public function setKeyProject($var) + { + GPBUtil::checkString($var, True); + $this->key_project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstance.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstance.php new file mode 100644 index 000000000000..b7749ab0b538 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstance.php @@ -0,0 +1,395 @@ +google.cloud.kms.v1.SingleTenantHsmInstance + */ +class SingleTenantHsmInstance extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name for this + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] in + * the format `projects/*/locations/*/singleTenantHsmInstances/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. The time at which the + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] was + * created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The state of the + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. + * + * Generated from protobuf field .google.cloud.kms.v1.SingleTenantHsmInstance.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Required. The quorum auth configuration for the + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. + * + * Generated from protobuf field .google.cloud.kms.v1.SingleTenantHsmInstance.QuorumAuth quorum_auth = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $quorum_auth = null; + /** + * Output only. The time at which the + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] was + * deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $delete_time = null; + /** + * Output only. The system-defined duration that an instance can remain + * unrefreshed until it is automatically disabled. This will have a value of + * 120 days. + * + * Generated from protobuf field .google.protobuf.Duration unrefreshed_duration_until_disable = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $unrefreshed_duration_until_disable = null; + /** + * 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][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * before this time otherwise the + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] will + * become disabled. + * + * Generated from protobuf field .google.protobuf.Timestamp disable_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $disable_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name for this + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] in + * the format `projects/*/locations/*/singleTenantHsmInstances/*`. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time at which the + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] was + * created. + * @type int $state + * Output only. The state of the + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. + * @type \Google\Cloud\Kms\V1\SingleTenantHsmInstance\QuorumAuth $quorum_auth + * Required. The quorum auth configuration for the + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. + * @type \Google\Protobuf\Timestamp $delete_time + * Output only. The time at which the + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] was + * deleted. + * @type \Google\Protobuf\Duration $unrefreshed_duration_until_disable + * Output only. The system-defined duration that an instance can remain + * unrefreshed until it is automatically disabled. This will have a value of + * 120 days. + * @type \Google\Protobuf\Timestamp $disable_time + * 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][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * before this time otherwise the + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] will + * become disabled. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\HsmManagement::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name for this + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] in + * the format `projects/*/locations/*/singleTenantHsmInstances/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The resource name for this + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] in + * the format `projects/*/locations/*/singleTenantHsmInstances/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The time at which the + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] was + * created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time at which the + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] was + * created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The state of the + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. + * + * Generated from protobuf field .google.cloud.kms.v1.SingleTenantHsmInstance.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The state of the + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. + * + * Generated from protobuf field .google.cloud.kms.v1.SingleTenantHsmInstance.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\SingleTenantHsmInstance\State::class); + $this->state = $var; + + return $this; + } + + /** + * Required. The quorum auth configuration for the + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. + * + * Generated from protobuf field .google.cloud.kms.v1.SingleTenantHsmInstance.QuorumAuth quorum_auth = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Kms\V1\SingleTenantHsmInstance\QuorumAuth|null + */ + public function getQuorumAuth() + { + return $this->quorum_auth; + } + + public function hasQuorumAuth() + { + return isset($this->quorum_auth); + } + + public function clearQuorumAuth() + { + unset($this->quorum_auth); + } + + /** + * Required. The quorum auth configuration for the + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. + * + * Generated from protobuf field .google.cloud.kms.v1.SingleTenantHsmInstance.QuorumAuth quorum_auth = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Kms\V1\SingleTenantHsmInstance\QuorumAuth $var + * @return $this + */ + public function setQuorumAuth($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\SingleTenantHsmInstance\QuorumAuth::class); + $this->quorum_auth = $var; + + return $this; + } + + /** + * Output only. The time at which the + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] was + * deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getDeleteTime() + { + return $this->delete_time; + } + + public function hasDeleteTime() + { + return isset($this->delete_time); + } + + public function clearDeleteTime() + { + unset($this->delete_time); + } + + /** + * Output only. The time at which the + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] was + * deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setDeleteTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->delete_time = $var; + + return $this; + } + + /** + * Output only. The system-defined duration that an instance can remain + * unrefreshed until it is automatically disabled. This will have a value of + * 120 days. + * + * Generated from protobuf field .google.protobuf.Duration unrefreshed_duration_until_disable = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Duration|null + */ + public function getUnrefreshedDurationUntilDisable() + { + return $this->unrefreshed_duration_until_disable; + } + + public function hasUnrefreshedDurationUntilDisable() + { + return isset($this->unrefreshed_duration_until_disable); + } + + public function clearUnrefreshedDurationUntilDisable() + { + unset($this->unrefreshed_duration_until_disable); + } + + /** + * Output only. The system-defined duration that an instance can remain + * unrefreshed until it is automatically disabled. This will have a value of + * 120 days. + * + * Generated from protobuf field .google.protobuf.Duration unrefreshed_duration_until_disable = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setUnrefreshedDurationUntilDisable($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->unrefreshed_duration_until_disable = $var; + + return $this; + } + + /** + * 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][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * before this time otherwise the + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] will + * become disabled. + * + * Generated from protobuf field .google.protobuf.Timestamp disable_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getDisableTime() + { + return $this->disable_time; + } + + public function hasDisableTime() + { + return isset($this->disable_time); + } + + public function clearDisableTime() + { + unset($this->disable_time); + } + + /** + * 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][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * before this time otherwise the + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] will + * become disabled. + * + * Generated from protobuf field .google.protobuf.Timestamp disable_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setDisableTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->disable_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstance/QuorumAuth.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstance/QuorumAuth.php new file mode 100644 index 000000000000..35e2c6dc0f2f --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstance/QuorumAuth.php @@ -0,0 +1,166 @@ +google.cloud.kms.v1.SingleTenantHsmInstance.QuorumAuth + */ +class QuorumAuth extends \Google\Protobuf\Internal\Message +{ + /** + * 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. + * + * Generated from protobuf field int32 total_approver_count = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $total_approver_count = 0; + /** + * 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][google.cloud.kms.v1.SingleTenantHsmInstance.QuorumAuth.total_approver_count] + * - 1. + * + * Generated from protobuf field int32 required_approver_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $required_approver_count = 0; + /** + * Output only. The public keys associated with the 2FA keys for M of N + * quorum auth. + * + * Generated from protobuf field repeated string two_factor_public_key_pems = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $two_factor_public_key_pems; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $total_approver_count + * 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. + * @type int $required_approver_count + * 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][google.cloud.kms.v1.SingleTenantHsmInstance.QuorumAuth.total_approver_count] + * - 1. + * @type array|\Google\Protobuf\Internal\RepeatedField $two_factor_public_key_pems + * Output only. The public keys associated with the 2FA keys for M of N + * quorum auth. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\HsmManagement::initOnce(); + parent::__construct($data); + } + + /** + * 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. + * + * Generated from protobuf field int32 total_approver_count = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getTotalApproverCount() + { + return $this->total_approver_count; + } + + /** + * 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. + * + * Generated from protobuf field int32 total_approver_count = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setTotalApproverCount($var) + { + GPBUtil::checkInt32($var); + $this->total_approver_count = $var; + + return $this; + } + + /** + * 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][google.cloud.kms.v1.SingleTenantHsmInstance.QuorumAuth.total_approver_count] + * - 1. + * + * Generated from protobuf field int32 required_approver_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getRequiredApproverCount() + { + return $this->required_approver_count; + } + + /** + * 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][google.cloud.kms.v1.SingleTenantHsmInstance.QuorumAuth.total_approver_count] + * - 1. + * + * Generated from protobuf field int32 required_approver_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setRequiredApproverCount($var) + { + GPBUtil::checkInt32($var); + $this->required_approver_count = $var; + + return $this; + } + + /** + * Output only. The public keys associated with the 2FA keys for M of N + * quorum auth. + * + * Generated from protobuf field repeated string two_factor_public_key_pems = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTwoFactorPublicKeyPems() + { + return $this->two_factor_public_key_pems; + } + + /** + * Output only. The public keys associated with the 2FA keys for M of N + * quorum auth. + * + * Generated from protobuf field repeated string two_factor_public_key_pems = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTwoFactorPublicKeyPems($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->two_factor_public_key_pems = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(QuorumAuth::class, \Google\Cloud\Kms\V1\SingleTenantHsmInstance_QuorumAuth::class); + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstance/State.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstance/State.php new file mode 100644 index 000000000000..80c42d22719f --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstance/State.php @@ -0,0 +1,131 @@ +google.cloud.kms.v1.SingleTenantHsmInstance.State + */ +class State +{ + /** + * Not specified. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] is + * being created. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * The + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] is + * waiting for 2FA keys to be registered. This can be done by calling + * [CreateSingleTenantHsmInstanceProposal][google.cloud.kms.v1.HsmManagement.CreateSingleTenantHsmInstanceProposal] + * with the [RegisterTwoFactorAuthKeys][] operation. + * + * Generated from protobuf enum PENDING_TWO_FACTOR_AUTH_REGISTRATION = 2; + */ + const PENDING_TWO_FACTOR_AUTH_REGISTRATION = 2; + /** + * The + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] is + * ready to use. A + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] + * must be in the + * [ACTIVE][google.cloud.kms.v1.SingleTenantHsmInstance.State.ACTIVE] state + * for all [CryptoKeys][google.cloud.kms.v1.CryptoKey] created within the + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] to + * be usable. + * + * Generated from protobuf enum ACTIVE = 3; + */ + const ACTIVE = 3; + /** + * The + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] is + * being disabled. + * + * Generated from protobuf enum DISABLING = 4; + */ + const DISABLING = 4; + /** + * The + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] is + * disabled. + * + * Generated from protobuf enum DISABLED = 5; + */ + const DISABLED = 5; + /** + * The + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] is + * being deleted. Requests to the instance will be rejected in this state. + * + * Generated from protobuf enum DELETING = 6; + */ + const DELETING = 6; + /** + * The + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] + * has been deleted. + * + * Generated from protobuf enum DELETED = 7; + */ + const DELETED = 7; + /** + * The + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] + * has failed and can not be recovered or used. + * + * Generated from protobuf enum FAILED = 8; + */ + const FAILED = 8; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::PENDING_TWO_FACTOR_AUTH_REGISTRATION => 'PENDING_TWO_FACTOR_AUTH_REGISTRATION', + self::ACTIVE => 'ACTIVE', + self::DISABLING => 'DISABLING', + self::DISABLED => 'DISABLED', + self::DELETING => 'DELETING', + self::DELETED => 'DELETED', + self::FAILED => 'FAILED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\Kms\V1\SingleTenantHsmInstance_State::class); + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal.php new file mode 100644 index 000000000000..084042a021a7 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal.php @@ -0,0 +1,898 @@ +google.cloud.kms.v1.SingleTenantHsmInstanceProposal + */ +class SingleTenantHsmInstanceProposal extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name for this + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] in + * the format `projects/*/locations/*/singleTenantHsmInstances/*/proposals/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. The time at which the + * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The state of the + * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal]. + * + * Generated from protobuf field .google.cloud.kms.v1.SingleTenantHsmInstanceProposal.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. The root cause of the most recent failure. Only present if + * [state][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.state] is + * [FAILED][SingleTenantHsmInstanceProposal.FAILED]. + * + * Generated from protobuf field string failure_reason = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $failure_reason = ''; + /** + * Output only. The time at which the + * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * was deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $delete_time = null; + /** + * Output only. The time at which the soft-deleted + * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * will be permanently purged. This field is only populated + * when the state is DELETED and will be set a time after expiration of the + * proposal, i.e. >= expire_time or (create_time + ttl). + * + * Generated from protobuf field .google.protobuf.Timestamp purge_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $purge_time = null; + protected $approval_parameters; + protected $expiration; + protected $operation; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name for this + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] in + * the format `projects/*/locations/*/singleTenantHsmInstances/*/proposals/*`. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time at which the + * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * was created. + * @type int $state + * Output only. The state of the + * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal]. + * @type string $failure_reason + * Output only. The root cause of the most recent failure. Only present if + * [state][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.state] is + * [FAILED][SingleTenantHsmInstanceProposal.FAILED]. + * @type \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal\QuorumParameters $quorum_parameters + * Output only. The quorum approval parameters for the + * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal]. + * @type \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal\RequiredActionQuorumParameters $required_action_quorum_parameters + * Output only. Parameters for an approval of a + * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * that has both required challenges and a quorum. + * @type \Google\Protobuf\Timestamp $expire_time + * The time at which the + * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * will expire if not approved and executed. + * @type \Google\Protobuf\Duration $ttl + * Input only. The TTL for the + * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal]. + * Proposals will expire after this duration. + * @type \Google\Protobuf\Timestamp $delete_time + * Output only. The time at which the + * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * was deleted. + * @type \Google\Protobuf\Timestamp $purge_time + * Output only. The time at which the soft-deleted + * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * will be permanently purged. This field is only populated + * when the state is DELETED and will be set a time after expiration of the + * proposal, i.e. >= expire_time or (create_time + ttl). + * @type \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal\RegisterTwoFactorAuthKeys $register_two_factor_auth_keys + * Register 2FA keys for the + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. + * This operation requires all N Challenges to be signed by 2FA keys. The + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] + * must be in the + * [PENDING_TWO_FACTOR_AUTH_REGISTRATION][google.cloud.kms.v1.SingleTenantHsmInstance.State.PENDING_TWO_FACTOR_AUTH_REGISTRATION] + * state to perform this operation. + * @type \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal\DisableSingleTenantHsmInstance $disable_single_tenant_hsm_instance + * Disable the + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. + * The + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] + * must be in the + * [ACTIVE][google.cloud.kms.v1.SingleTenantHsmInstance.State.ACTIVE] state + * to perform this operation. + * @type \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal\EnableSingleTenantHsmInstance $enable_single_tenant_hsm_instance + * Enable the + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. + * The + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] + * must be in the + * [DISABLED][google.cloud.kms.v1.SingleTenantHsmInstance.State.DISABLED] + * state to perform this operation. + * @type \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal\DeleteSingleTenantHsmInstance $delete_single_tenant_hsm_instance + * Delete the + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. + * Deleting a + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] + * will make all [CryptoKeys][google.cloud.kms.v1.CryptoKey] attached to the + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] + * unusable. The + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] + * must be in the + * [DISABLED][google.cloud.kms.v1.SingleTenantHsmInstance.State.DISABLED] or + * [PENDING_TWO_FACTOR_AUTH_REGISTRATION][google.cloud.kms.v1.SingleTenantHsmInstance.State.PENDING_TWO_FACTOR_AUTH_REGISTRATION] + * state to perform this operation. + * @type \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal\AddQuorumMember $add_quorum_member + * Add a quorum member to the + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. + * This will increase the + * [total_approver_count][google.cloud.kms.v1.SingleTenantHsmInstance.QuorumAuth.total_approver_count] + * by 1. The + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] + * must be in the + * [ACTIVE][google.cloud.kms.v1.SingleTenantHsmInstance.State.ACTIVE] state + * to perform this operation. + * @type \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal\RemoveQuorumMember $remove_quorum_member + * Remove a quorum member from the + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. + * This will reduce + * [total_approver_count][google.cloud.kms.v1.SingleTenantHsmInstance.QuorumAuth.total_approver_count] + * by 1. The + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] + * must be in the + * [ACTIVE][google.cloud.kms.v1.SingleTenantHsmInstance.State.ACTIVE] state + * to perform this operation. + * @type \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal\RefreshSingleTenantHsmInstance $refresh_single_tenant_hsm_instance + * Refreshes the + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. + * This operation must be performed periodically to keep the + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] + * active. This operation must be performed before + * [unrefreshed_duration_until_disable][google.cloud.kms.v1.SingleTenantHsmInstance.unrefreshed_duration_until_disable] + * has passed. The + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] + * must be in the + * [ACTIVE][google.cloud.kms.v1.SingleTenantHsmInstance.State.ACTIVE] state + * to perform this operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\HsmManagement::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name for this + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] in + * the format `projects/*/locations/*/singleTenantHsmInstances/*/proposals/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The resource name for this + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] in + * the format `projects/*/locations/*/singleTenantHsmInstances/*/proposals/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The time at which the + * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time at which the + * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The state of the + * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal]. + * + * Generated from protobuf field .google.cloud.kms.v1.SingleTenantHsmInstanceProposal.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The state of the + * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal]. + * + * Generated from protobuf field .google.cloud.kms.v1.SingleTenantHsmInstanceProposal.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. The root cause of the most recent failure. Only present if + * [state][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.state] is + * [FAILED][SingleTenantHsmInstanceProposal.FAILED]. + * + * Generated from protobuf field string failure_reason = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getFailureReason() + { + return $this->failure_reason; + } + + /** + * Output only. The root cause of the most recent failure. Only present if + * [state][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.state] is + * [FAILED][SingleTenantHsmInstanceProposal.FAILED]. + * + * Generated from protobuf field string failure_reason = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setFailureReason($var) + { + GPBUtil::checkString($var, True); + $this->failure_reason = $var; + + return $this; + } + + /** + * Output only. The quorum approval parameters for the + * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal]. + * + * Generated from protobuf field .google.cloud.kms.v1.SingleTenantHsmInstanceProposal.QuorumParameters quorum_parameters = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal\QuorumParameters|null + */ + public function getQuorumParameters() + { + return $this->readOneof(5); + } + + public function hasQuorumParameters() + { + return $this->hasOneof(5); + } + + /** + * Output only. The quorum approval parameters for the + * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal]. + * + * Generated from protobuf field .google.cloud.kms.v1.SingleTenantHsmInstanceProposal.QuorumParameters quorum_parameters = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal\QuorumParameters $var + * @return $this + */ + public function setQuorumParameters($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal\QuorumParameters::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Output only. Parameters for an approval of a + * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * that has both required challenges and a quorum. + * + * Generated from protobuf field .google.cloud.kms.v1.SingleTenantHsmInstanceProposal.RequiredActionQuorumParameters required_action_quorum_parameters = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal\RequiredActionQuorumParameters|null + */ + public function getRequiredActionQuorumParameters() + { + return $this->readOneof(14); + } + + public function hasRequiredActionQuorumParameters() + { + return $this->hasOneof(14); + } + + /** + * Output only. Parameters for an approval of a + * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * that has both required challenges and a quorum. + * + * Generated from protobuf field .google.cloud.kms.v1.SingleTenantHsmInstanceProposal.RequiredActionQuorumParameters required_action_quorum_parameters = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal\RequiredActionQuorumParameters $var + * @return $this + */ + public function setRequiredActionQuorumParameters($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal\RequiredActionQuorumParameters::class); + $this->writeOneof(14, $var); + + return $this; + } + + /** + * The time at which the + * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * will expire if not approved and executed. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 6; + * @return \Google\Protobuf\Timestamp|null + */ + public function getExpireTime() + { + return $this->readOneof(6); + } + + public function hasExpireTime() + { + return $this->hasOneof(6); + } + + /** + * The time at which the + * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * will expire if not approved and executed. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 6; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setExpireTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Input only. The TTL for the + * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal]. + * Proposals will expire after this duration. + * + * Generated from protobuf field .google.protobuf.Duration ttl = 7 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return \Google\Protobuf\Duration|null + */ + public function getTtl() + { + return $this->readOneof(7); + } + + public function hasTtl() + { + return $this->hasOneof(7); + } + + /** + * Input only. The TTL for the + * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal]. + * Proposals will expire after this duration. + * + * Generated from protobuf field .google.protobuf.Duration ttl = 7 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setTtl($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * Output only. The time at which the + * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * was deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getDeleteTime() + { + return $this->delete_time; + } + + public function hasDeleteTime() + { + return isset($this->delete_time); + } + + public function clearDeleteTime() + { + unset($this->delete_time); + } + + /** + * Output only. The time at which the + * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * was deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setDeleteTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->delete_time = $var; + + return $this; + } + + /** + * Output only. The time at which the soft-deleted + * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * will be permanently purged. This field is only populated + * when the state is DELETED and will be set a time after expiration of the + * proposal, i.e. >= expire_time or (create_time + ttl). + * + * Generated from protobuf field .google.protobuf.Timestamp purge_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getPurgeTime() + { + return $this->purge_time; + } + + public function hasPurgeTime() + { + return isset($this->purge_time); + } + + public function clearPurgeTime() + { + unset($this->purge_time); + } + + /** + * Output only. The time at which the soft-deleted + * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * will be permanently purged. This field is only populated + * when the state is DELETED and will be set a time after expiration of the + * proposal, i.e. >= expire_time or (create_time + ttl). + * + * Generated from protobuf field .google.protobuf.Timestamp purge_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setPurgeTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->purge_time = $var; + + return $this; + } + + /** + * Register 2FA keys for the + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. + * This operation requires all N Challenges to be signed by 2FA keys. The + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] + * must be in the + * [PENDING_TWO_FACTOR_AUTH_REGISTRATION][google.cloud.kms.v1.SingleTenantHsmInstance.State.PENDING_TWO_FACTOR_AUTH_REGISTRATION] + * state to perform this operation. + * + * Generated from protobuf field .google.cloud.kms.v1.SingleTenantHsmInstanceProposal.RegisterTwoFactorAuthKeys register_two_factor_auth_keys = 8; + * @return \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal\RegisterTwoFactorAuthKeys|null + */ + public function getRegisterTwoFactorAuthKeys() + { + return $this->readOneof(8); + } + + public function hasRegisterTwoFactorAuthKeys() + { + return $this->hasOneof(8); + } + + /** + * Register 2FA keys for the + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. + * This operation requires all N Challenges to be signed by 2FA keys. The + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] + * must be in the + * [PENDING_TWO_FACTOR_AUTH_REGISTRATION][google.cloud.kms.v1.SingleTenantHsmInstance.State.PENDING_TWO_FACTOR_AUTH_REGISTRATION] + * state to perform this operation. + * + * Generated from protobuf field .google.cloud.kms.v1.SingleTenantHsmInstanceProposal.RegisterTwoFactorAuthKeys register_two_factor_auth_keys = 8; + * @param \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal\RegisterTwoFactorAuthKeys $var + * @return $this + */ + public function setRegisterTwoFactorAuthKeys($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal\RegisterTwoFactorAuthKeys::class); + $this->writeOneof(8, $var); + + return $this; + } + + /** + * Disable the + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. + * The + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] + * must be in the + * [ACTIVE][google.cloud.kms.v1.SingleTenantHsmInstance.State.ACTIVE] state + * to perform this operation. + * + * Generated from protobuf field .google.cloud.kms.v1.SingleTenantHsmInstanceProposal.DisableSingleTenantHsmInstance disable_single_tenant_hsm_instance = 9; + * @return \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal\DisableSingleTenantHsmInstance|null + */ + public function getDisableSingleTenantHsmInstance() + { + return $this->readOneof(9); + } + + public function hasDisableSingleTenantHsmInstance() + { + return $this->hasOneof(9); + } + + /** + * Disable the + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. + * The + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] + * must be in the + * [ACTIVE][google.cloud.kms.v1.SingleTenantHsmInstance.State.ACTIVE] state + * to perform this operation. + * + * Generated from protobuf field .google.cloud.kms.v1.SingleTenantHsmInstanceProposal.DisableSingleTenantHsmInstance disable_single_tenant_hsm_instance = 9; + * @param \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal\DisableSingleTenantHsmInstance $var + * @return $this + */ + public function setDisableSingleTenantHsmInstance($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal\DisableSingleTenantHsmInstance::class); + $this->writeOneof(9, $var); + + return $this; + } + + /** + * Enable the + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. + * The + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] + * must be in the + * [DISABLED][google.cloud.kms.v1.SingleTenantHsmInstance.State.DISABLED] + * state to perform this operation. + * + * Generated from protobuf field .google.cloud.kms.v1.SingleTenantHsmInstanceProposal.EnableSingleTenantHsmInstance enable_single_tenant_hsm_instance = 10; + * @return \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal\EnableSingleTenantHsmInstance|null + */ + public function getEnableSingleTenantHsmInstance() + { + return $this->readOneof(10); + } + + public function hasEnableSingleTenantHsmInstance() + { + return $this->hasOneof(10); + } + + /** + * Enable the + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. + * The + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] + * must be in the + * [DISABLED][google.cloud.kms.v1.SingleTenantHsmInstance.State.DISABLED] + * state to perform this operation. + * + * Generated from protobuf field .google.cloud.kms.v1.SingleTenantHsmInstanceProposal.EnableSingleTenantHsmInstance enable_single_tenant_hsm_instance = 10; + * @param \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal\EnableSingleTenantHsmInstance $var + * @return $this + */ + public function setEnableSingleTenantHsmInstance($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal\EnableSingleTenantHsmInstance::class); + $this->writeOneof(10, $var); + + return $this; + } + + /** + * Delete the + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. + * Deleting a + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] + * will make all [CryptoKeys][google.cloud.kms.v1.CryptoKey] attached to the + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] + * unusable. The + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] + * must be in the + * [DISABLED][google.cloud.kms.v1.SingleTenantHsmInstance.State.DISABLED] or + * [PENDING_TWO_FACTOR_AUTH_REGISTRATION][google.cloud.kms.v1.SingleTenantHsmInstance.State.PENDING_TWO_FACTOR_AUTH_REGISTRATION] + * state to perform this operation. + * + * Generated from protobuf field .google.cloud.kms.v1.SingleTenantHsmInstanceProposal.DeleteSingleTenantHsmInstance delete_single_tenant_hsm_instance = 11; + * @return \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal\DeleteSingleTenantHsmInstance|null + */ + public function getDeleteSingleTenantHsmInstance() + { + return $this->readOneof(11); + } + + public function hasDeleteSingleTenantHsmInstance() + { + return $this->hasOneof(11); + } + + /** + * Delete the + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. + * Deleting a + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] + * will make all [CryptoKeys][google.cloud.kms.v1.CryptoKey] attached to the + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] + * unusable. The + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] + * must be in the + * [DISABLED][google.cloud.kms.v1.SingleTenantHsmInstance.State.DISABLED] or + * [PENDING_TWO_FACTOR_AUTH_REGISTRATION][google.cloud.kms.v1.SingleTenantHsmInstance.State.PENDING_TWO_FACTOR_AUTH_REGISTRATION] + * state to perform this operation. + * + * Generated from protobuf field .google.cloud.kms.v1.SingleTenantHsmInstanceProposal.DeleteSingleTenantHsmInstance delete_single_tenant_hsm_instance = 11; + * @param \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal\DeleteSingleTenantHsmInstance $var + * @return $this + */ + public function setDeleteSingleTenantHsmInstance($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal\DeleteSingleTenantHsmInstance::class); + $this->writeOneof(11, $var); + + return $this; + } + + /** + * Add a quorum member to the + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. + * This will increase the + * [total_approver_count][google.cloud.kms.v1.SingleTenantHsmInstance.QuorumAuth.total_approver_count] + * by 1. The + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] + * must be in the + * [ACTIVE][google.cloud.kms.v1.SingleTenantHsmInstance.State.ACTIVE] state + * to perform this operation. + * + * Generated from protobuf field .google.cloud.kms.v1.SingleTenantHsmInstanceProposal.AddQuorumMember add_quorum_member = 12; + * @return \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal\AddQuorumMember|null + */ + public function getAddQuorumMember() + { + return $this->readOneof(12); + } + + public function hasAddQuorumMember() + { + return $this->hasOneof(12); + } + + /** + * Add a quorum member to the + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. + * This will increase the + * [total_approver_count][google.cloud.kms.v1.SingleTenantHsmInstance.QuorumAuth.total_approver_count] + * by 1. The + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] + * must be in the + * [ACTIVE][google.cloud.kms.v1.SingleTenantHsmInstance.State.ACTIVE] state + * to perform this operation. + * + * Generated from protobuf field .google.cloud.kms.v1.SingleTenantHsmInstanceProposal.AddQuorumMember add_quorum_member = 12; + * @param \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal\AddQuorumMember $var + * @return $this + */ + public function setAddQuorumMember($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal\AddQuorumMember::class); + $this->writeOneof(12, $var); + + return $this; + } + + /** + * Remove a quorum member from the + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. + * This will reduce + * [total_approver_count][google.cloud.kms.v1.SingleTenantHsmInstance.QuorumAuth.total_approver_count] + * by 1. The + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] + * must be in the + * [ACTIVE][google.cloud.kms.v1.SingleTenantHsmInstance.State.ACTIVE] state + * to perform this operation. + * + * Generated from protobuf field .google.cloud.kms.v1.SingleTenantHsmInstanceProposal.RemoveQuorumMember remove_quorum_member = 13; + * @return \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal\RemoveQuorumMember|null + */ + public function getRemoveQuorumMember() + { + return $this->readOneof(13); + } + + public function hasRemoveQuorumMember() + { + return $this->hasOneof(13); + } + + /** + * Remove a quorum member from the + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. + * This will reduce + * [total_approver_count][google.cloud.kms.v1.SingleTenantHsmInstance.QuorumAuth.total_approver_count] + * by 1. The + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] + * must be in the + * [ACTIVE][google.cloud.kms.v1.SingleTenantHsmInstance.State.ACTIVE] state + * to perform this operation. + * + * Generated from protobuf field .google.cloud.kms.v1.SingleTenantHsmInstanceProposal.RemoveQuorumMember remove_quorum_member = 13; + * @param \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal\RemoveQuorumMember $var + * @return $this + */ + public function setRemoveQuorumMember($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal\RemoveQuorumMember::class); + $this->writeOneof(13, $var); + + return $this; + } + + /** + * Refreshes the + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. + * This operation must be performed periodically to keep the + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] + * active. This operation must be performed before + * [unrefreshed_duration_until_disable][google.cloud.kms.v1.SingleTenantHsmInstance.unrefreshed_duration_until_disable] + * has passed. The + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] + * must be in the + * [ACTIVE][google.cloud.kms.v1.SingleTenantHsmInstance.State.ACTIVE] state + * to perform this operation. + * + * Generated from protobuf field .google.cloud.kms.v1.SingleTenantHsmInstanceProposal.RefreshSingleTenantHsmInstance refresh_single_tenant_hsm_instance = 17; + * @return \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal\RefreshSingleTenantHsmInstance|null + */ + public function getRefreshSingleTenantHsmInstance() + { + return $this->readOneof(17); + } + + public function hasRefreshSingleTenantHsmInstance() + { + return $this->hasOneof(17); + } + + /** + * Refreshes the + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. + * This operation must be performed periodically to keep the + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] + * active. This operation must be performed before + * [unrefreshed_duration_until_disable][google.cloud.kms.v1.SingleTenantHsmInstance.unrefreshed_duration_until_disable] + * has passed. The + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] + * must be in the + * [ACTIVE][google.cloud.kms.v1.SingleTenantHsmInstance.State.ACTIVE] state + * to perform this operation. + * + * Generated from protobuf field .google.cloud.kms.v1.SingleTenantHsmInstanceProposal.RefreshSingleTenantHsmInstance refresh_single_tenant_hsm_instance = 17; + * @param \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal\RefreshSingleTenantHsmInstance $var + * @return $this + */ + public function setRefreshSingleTenantHsmInstance($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal\RefreshSingleTenantHsmInstance::class); + $this->writeOneof(17, $var); + + return $this; + } + + /** + * @return string + */ + public function getApprovalParameters() + { + return $this->whichOneof("approval_parameters"); + } + + /** + * @return string + */ + public function getExpiration() + { + return $this->whichOneof("expiration"); + } + + /** + * @return string + */ + public function getOperation() + { + return $this->whichOneof("operation"); + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/AddQuorumMember.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/AddQuorumMember.php new file mode 100644 index 000000000000..aa7966fe73a6 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/AddQuorumMember.php @@ -0,0 +1,82 @@ +google.cloud.kms.v1.SingleTenantHsmInstanceProposal.AddQuorumMember + */ +class AddQuorumMember extends \Google\Protobuf\Internal\Message +{ + /** + * 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. + * + * Generated from protobuf field string two_factor_public_key_pem = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $two_factor_public_key_pem = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $two_factor_public_key_pem + * 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. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\HsmManagement::initOnce(); + parent::__construct($data); + } + + /** + * 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. + * + * Generated from protobuf field string two_factor_public_key_pem = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getTwoFactorPublicKeyPem() + { + return $this->two_factor_public_key_pem; + } + + /** + * 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. + * + * Generated from protobuf field string two_factor_public_key_pem = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setTwoFactorPublicKeyPem($var) + { + GPBUtil::checkString($var, True); + $this->two_factor_public_key_pem = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(AddQuorumMember::class, \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal_AddQuorumMember::class); + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/DeleteSingleTenantHsmInstance.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/DeleteSingleTenantHsmInstance.php new file mode 100644 index 000000000000..e112a1f037de --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/DeleteSingleTenantHsmInstance.php @@ -0,0 +1,47 @@ +google.cloud.kms.v1.SingleTenantHsmInstanceProposal.DeleteSingleTenantHsmInstance + */ +class DeleteSingleTenantHsmInstance extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\HsmManagement::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DeleteSingleTenantHsmInstance::class, \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal_DeleteSingleTenantHsmInstance::class); + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/DisableSingleTenantHsmInstance.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/DisableSingleTenantHsmInstance.php new file mode 100644 index 000000000000..99bc2ff1725c --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/DisableSingleTenantHsmInstance.php @@ -0,0 +1,41 @@ +google.cloud.kms.v1.SingleTenantHsmInstanceProposal.DisableSingleTenantHsmInstance + */ +class DisableSingleTenantHsmInstance extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\HsmManagement::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DisableSingleTenantHsmInstance::class, \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal_DisableSingleTenantHsmInstance::class); + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/EnableSingleTenantHsmInstance.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/EnableSingleTenantHsmInstance.php new file mode 100644 index 000000000000..db5b8cb8ad66 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/EnableSingleTenantHsmInstance.php @@ -0,0 +1,41 @@ +google.cloud.kms.v1.SingleTenantHsmInstanceProposal.EnableSingleTenantHsmInstance + */ +class EnableSingleTenantHsmInstance extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\HsmManagement::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(EnableSingleTenantHsmInstance::class, \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal_EnableSingleTenantHsmInstance::class); + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/QuorumParameters.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/QuorumParameters.php new file mode 100644 index 000000000000..03cadd5d29da --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/QuorumParameters.php @@ -0,0 +1,163 @@ +google.cloud.kms.v1.SingleTenantHsmInstanceProposal.QuorumParameters + */ +class QuorumParameters extends \Google\Protobuf\Internal\Message +{ + /** + * 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. + * + * Generated from protobuf field int32 required_approver_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $required_approver_count = 0; + /** + * 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. + * + * Generated from protobuf field repeated .google.cloud.kms.v1.Challenge challenges = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $challenges; + /** + * Output only. The public keys associated with the 2FA keys that have + * already approved the + * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * by signing the challenge. + * + * Generated from protobuf field repeated string approved_two_factor_public_key_pems = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $approved_two_factor_public_key_pems; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $required_approver_count + * 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. + * @type array<\Google\Cloud\Kms\V1\Challenge>|\Google\Protobuf\Internal\RepeatedField $challenges + * 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. + * @type array|\Google\Protobuf\Internal\RepeatedField $approved_two_factor_public_key_pems + * Output only. The public keys associated with the 2FA keys that have + * already approved the + * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * by signing the challenge. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\HsmManagement::initOnce(); + parent::__construct($data); + } + + /** + * 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. + * + * Generated from protobuf field int32 required_approver_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getRequiredApproverCount() + { + return $this->required_approver_count; + } + + /** + * 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. + * + * Generated from protobuf field int32 required_approver_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setRequiredApproverCount($var) + { + GPBUtil::checkInt32($var); + $this->required_approver_count = $var; + + return $this; + } + + /** + * 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. + * + * Generated from protobuf field repeated .google.cloud.kms.v1.Challenge challenges = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getChallenges() + { + return $this->challenges; + } + + /** + * 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. + * + * Generated from protobuf field repeated .google.cloud.kms.v1.Challenge challenges = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\Kms\V1\Challenge>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setChallenges($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Kms\V1\Challenge::class); + $this->challenges = $arr; + + return $this; + } + + /** + * Output only. The public keys associated with the 2FA keys that have + * already approved the + * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * by signing the challenge. + * + * Generated from protobuf field repeated string approved_two_factor_public_key_pems = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getApprovedTwoFactorPublicKeyPems() + { + return $this->approved_two_factor_public_key_pems; + } + + /** + * Output only. The public keys associated with the 2FA keys that have + * already approved the + * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * by signing the challenge. + * + * Generated from protobuf field repeated string approved_two_factor_public_key_pems = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setApprovedTwoFactorPublicKeyPems($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->approved_two_factor_public_key_pems = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(QuorumParameters::class, \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal_QuorumParameters::class); + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/RefreshSingleTenantHsmInstance.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/RefreshSingleTenantHsmInstance.php new file mode 100644 index 000000000000..88afd250cc8d --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/RefreshSingleTenantHsmInstance.php @@ -0,0 +1,46 @@ +google.cloud.kms.v1.SingleTenantHsmInstanceProposal.RefreshSingleTenantHsmInstance + */ +class RefreshSingleTenantHsmInstance extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\HsmManagement::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RefreshSingleTenantHsmInstance::class, \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal_RefreshSingleTenantHsmInstance::class); + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/RegisterTwoFactorAuthKeys.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/RegisterTwoFactorAuthKeys.php new file mode 100644 index 000000000000..2347fd3c40b8 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/RegisterTwoFactorAuthKeys.php @@ -0,0 +1,134 @@ +google.cloud.kms.v1.SingleTenantHsmInstanceProposal.RegisterTwoFactorAuthKeys + */ +class RegisterTwoFactorAuthKeys extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The required numbers of approvers to set for the + * [SingleTenantHsmInstance][google.cloud.kms.v1.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][google.cloud.kms.v1.SingleTenantHsmInstance.QuorumAuth.total_approver_count] + * - 1. + * + * Generated from protobuf field int32 required_approver_count = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $required_approver_count = 0; + /** + * Required. The public keys associated with the 2FA keys for M of N quorum + * auth. Public keys must be associated with RSA 2048 keys. + * + * Generated from protobuf field repeated string two_factor_public_key_pems = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $two_factor_public_key_pems; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $required_approver_count + * Required. The required numbers of approvers to set for the + * [SingleTenantHsmInstance][google.cloud.kms.v1.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][google.cloud.kms.v1.SingleTenantHsmInstance.QuorumAuth.total_approver_count] + * - 1. + * @type array|\Google\Protobuf\Internal\RepeatedField $two_factor_public_key_pems + * Required. The public keys associated with the 2FA keys for M of N quorum + * auth. Public keys must be associated with RSA 2048 keys. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\HsmManagement::initOnce(); + parent::__construct($data); + } + + /** + * Required. The required numbers of approvers to set for the + * [SingleTenantHsmInstance][google.cloud.kms.v1.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][google.cloud.kms.v1.SingleTenantHsmInstance.QuorumAuth.total_approver_count] + * - 1. + * + * Generated from protobuf field int32 required_approver_count = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getRequiredApproverCount() + { + return $this->required_approver_count; + } + + /** + * Required. The required numbers of approvers to set for the + * [SingleTenantHsmInstance][google.cloud.kms.v1.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][google.cloud.kms.v1.SingleTenantHsmInstance.QuorumAuth.total_approver_count] + * - 1. + * + * Generated from protobuf field int32 required_approver_count = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setRequiredApproverCount($var) + { + GPBUtil::checkInt32($var); + $this->required_approver_count = $var; + + return $this; + } + + /** + * Required. The public keys associated with the 2FA keys for M of N quorum + * auth. Public keys must be associated with RSA 2048 keys. + * + * Generated from protobuf field repeated string two_factor_public_key_pems = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTwoFactorPublicKeyPems() + { + return $this->two_factor_public_key_pems; + } + + /** + * Required. The public keys associated with the 2FA keys for M of N quorum + * auth. Public keys must be associated with RSA 2048 keys. + * + * Generated from protobuf field repeated string two_factor_public_key_pems = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTwoFactorPublicKeyPems($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->two_factor_public_key_pems = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RegisterTwoFactorAuthKeys::class, \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal_RegisterTwoFactorAuthKeys::class); + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/RemoveQuorumMember.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/RemoveQuorumMember.php new file mode 100644 index 000000000000..57cd5125cd94 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/RemoveQuorumMember.php @@ -0,0 +1,82 @@ +google.cloud.kms.v1.SingleTenantHsmInstanceProposal.RemoveQuorumMember + */ +class RemoveQuorumMember extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The public key associated with the 2FA key for the quorum + * member to remove. Public keys must be associated with RSA 2048 keys. + * + * Generated from protobuf field string two_factor_public_key_pem = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $two_factor_public_key_pem = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $two_factor_public_key_pem + * Required. The public key associated with the 2FA key for the quorum + * member to remove. Public keys must be associated with RSA 2048 keys. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\HsmManagement::initOnce(); + parent::__construct($data); + } + + /** + * Required. The public key associated with the 2FA key for the quorum + * member to remove. Public keys must be associated with RSA 2048 keys. + * + * Generated from protobuf field string two_factor_public_key_pem = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getTwoFactorPublicKeyPem() + { + return $this->two_factor_public_key_pem; + } + + /** + * Required. The public key associated with the 2FA key for the quorum + * member to remove. Public keys must be associated with RSA 2048 keys. + * + * Generated from protobuf field string two_factor_public_key_pem = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setTwoFactorPublicKeyPem($var) + { + GPBUtil::checkString($var, True); + $this->two_factor_public_key_pem = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RemoveQuorumMember::class, \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal_RemoveQuorumMember::class); + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/RequiredActionQuorumParameters.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/RequiredActionQuorumParameters.php new file mode 100644 index 000000000000..7270c63ad9a4 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/RequiredActionQuorumParameters.php @@ -0,0 +1,201 @@ +google.cloud.kms.v1.SingleTenantHsmInstanceProposal.RequiredActionQuorumParameters + */ +class RequiredActionQuorumParameters extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. A list of specific challenges that must be signed. + * For some operations, this will contain a single challenge. + * + * Generated from protobuf field repeated .google.cloud.kms.v1.Challenge required_challenges = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $required_challenges; + /** + * 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. + * + * Generated from protobuf field int32 required_approver_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $required_approver_count = 0; + /** + * 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. + * + * Generated from protobuf field repeated .google.cloud.kms.v1.Challenge quorum_challenges = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $quorum_challenges; + /** + * Output only. The public keys associated with the 2FA keys that have + * already approved the + * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * by signing the challenge. + * + * Generated from protobuf field repeated string approved_two_factor_public_key_pems = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $approved_two_factor_public_key_pems; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Kms\V1\Challenge>|\Google\Protobuf\Internal\RepeatedField $required_challenges + * Output only. A list of specific challenges that must be signed. + * For some operations, this will contain a single challenge. + * @type int $required_approver_count + * 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. + * @type array<\Google\Cloud\Kms\V1\Challenge>|\Google\Protobuf\Internal\RepeatedField $quorum_challenges + * 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. + * @type array|\Google\Protobuf\Internal\RepeatedField $approved_two_factor_public_key_pems + * Output only. The public keys associated with the 2FA keys that have + * already approved the + * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * by signing the challenge. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\HsmManagement::initOnce(); + parent::__construct($data); + } + + /** + * Output only. A list of specific challenges that must be signed. + * For some operations, this will contain a single challenge. + * + * Generated from protobuf field repeated .google.cloud.kms.v1.Challenge required_challenges = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRequiredChallenges() + { + return $this->required_challenges; + } + + /** + * Output only. A list of specific challenges that must be signed. + * For some operations, this will contain a single challenge. + * + * Generated from protobuf field repeated .google.cloud.kms.v1.Challenge required_challenges = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\Kms\V1\Challenge>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRequiredChallenges($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Kms\V1\Challenge::class); + $this->required_challenges = $arr; + + return $this; + } + + /** + * 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. + * + * Generated from protobuf field int32 required_approver_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getRequiredApproverCount() + { + return $this->required_approver_count; + } + + /** + * 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. + * + * Generated from protobuf field int32 required_approver_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setRequiredApproverCount($var) + { + GPBUtil::checkInt32($var); + $this->required_approver_count = $var; + + return $this; + } + + /** + * 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. + * + * Generated from protobuf field repeated .google.cloud.kms.v1.Challenge quorum_challenges = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getQuorumChallenges() + { + return $this->quorum_challenges; + } + + /** + * 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. + * + * Generated from protobuf field repeated .google.cloud.kms.v1.Challenge quorum_challenges = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\Kms\V1\Challenge>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setQuorumChallenges($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Kms\V1\Challenge::class); + $this->quorum_challenges = $arr; + + return $this; + } + + /** + * Output only. The public keys associated with the 2FA keys that have + * already approved the + * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * by signing the challenge. + * + * Generated from protobuf field repeated string approved_two_factor_public_key_pems = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getApprovedTwoFactorPublicKeyPems() + { + return $this->approved_two_factor_public_key_pems; + } + + /** + * Output only. The public keys associated with the 2FA keys that have + * already approved the + * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * by signing the challenge. + * + * Generated from protobuf field repeated string approved_two_factor_public_key_pems = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setApprovedTwoFactorPublicKeyPems($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->approved_two_factor_public_key_pems = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RequiredActionQuorumParameters::class, \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal_RequiredActionQuorumParameters::class); + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/State.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/State.php new file mode 100644 index 000000000000..088ffacade97 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/State.php @@ -0,0 +1,114 @@ +google.cloud.kms.v1.SingleTenantHsmInstanceProposal.State + */ +class State +{ + /** + * Not specified. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The + * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * is being created. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * The + * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * is pending approval. + * + * Generated from protobuf enum PENDING = 2; + */ + const PENDING = 2; + /** + * The + * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * has been approved. + * + * Generated from protobuf enum APPROVED = 3; + */ + const APPROVED = 3; + /** + * The + * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * is being executed. + * + * Generated from protobuf enum RUNNING = 4; + */ + const RUNNING = 4; + /** + * The + * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * has been executed successfully. + * + * Generated from protobuf enum SUCCEEDED = 5; + */ + const SUCCEEDED = 5; + /** + * The + * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * has failed. + * + * Generated from protobuf enum FAILED = 6; + */ + const FAILED = 6; + /** + * The + * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * has been deleted and will be purged after the purge_time. + * + * Generated from protobuf enum DELETED = 7; + */ + const DELETED = 7; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::PENDING => 'PENDING', + self::APPROVED => 'APPROVED', + self::RUNNING => 'RUNNING', + self::SUCCEEDED => 'SUCCEEDED', + self::FAILED => 'FAILED', + self::DELETED => 'DELETED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal_State::class); + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateAutokeyConfigRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateAutokeyConfigRequest.php new file mode 100644 index 000000000000..28b4dc1f3e6d --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateAutokeyConfigRequest.php @@ -0,0 +1,152 @@ +google.cloud.kms.v1.UpdateAutokeyConfigRequest + */ +class UpdateAutokeyConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig] with values to + * update. + * + * Generated from protobuf field .google.cloud.kms.v1.AutokeyConfig autokey_config = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $autokey_config = null; + /** + * Required. Masks which fields of the + * [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig] to update, e.g. + * `keyProject`. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\Kms\V1\AutokeyConfig $autokeyConfig Required. [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig] with values to + * update. + * @param \Google\Protobuf\FieldMask $updateMask Required. Masks which fields of the + * [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig] to update, e.g. + * `keyProject`. + * + * @return \Google\Cloud\Kms\V1\UpdateAutokeyConfigRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Kms\V1\AutokeyConfig $autokeyConfig, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setAutokeyConfig($autokeyConfig) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Kms\V1\AutokeyConfig $autokey_config + * Required. [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig] with values to + * update. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Masks which fields of the + * [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig] to update, e.g. + * `keyProject`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\AutokeyAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig] with values to + * update. + * + * Generated from protobuf field .google.cloud.kms.v1.AutokeyConfig autokey_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Kms\V1\AutokeyConfig|null + */ + public function getAutokeyConfig() + { + return $this->autokey_config; + } + + public function hasAutokeyConfig() + { + return isset($this->autokey_config); + } + + public function clearAutokeyConfig() + { + unset($this->autokey_config); + } + + /** + * Required. [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig] with values to + * update. + * + * Generated from protobuf field .google.cloud.kms.v1.AutokeyConfig autokey_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Kms\V1\AutokeyConfig $var + * @return $this + */ + public function setAutokeyConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\AutokeyConfig::class); + $this->autokey_config = $var; + + return $this; + } + + /** + * Required. Masks which fields of the + * [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig] to update, e.g. + * `keyProject`. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. Masks which fields of the + * [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig] to update, e.g. + * `keyProject`. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateCryptoKeyPrimaryVersionRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateCryptoKeyPrimaryVersionRequest.php new file mode 100644 index 000000000000..1a9161832a5e --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateCryptoKeyPrimaryVersionRequest.php @@ -0,0 +1,128 @@ +google.cloud.kms.v1.UpdateCryptoKeyPrimaryVersionRequest + */ +class UpdateCryptoKeyPrimaryVersionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] to update. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. The id of the child + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use as primary. + * + * Generated from protobuf field string crypto_key_version_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $crypto_key_version_id = ''; + + /** + * @param string $name Required. The resource name of the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] to update. Please see + * {@see KeyManagementServiceClient::cryptoKeyName()} for help formatting this field. + * @param string $cryptoKeyVersionId Required. The id of the child + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use as primary. + * + * @return \Google\Cloud\Kms\V1\UpdateCryptoKeyPrimaryVersionRequest + * + * @experimental + */ + public static function build(string $name, string $cryptoKeyVersionId): self + { + return (new self()) + ->setName($name) + ->setCryptoKeyVersionId($cryptoKeyVersionId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] to update. + * @type string $crypto_key_version_id + * Required. The id of the child + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use as primary. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] to update. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] to update. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The id of the child + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use as primary. + * + * Generated from protobuf field string crypto_key_version_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getCryptoKeyVersionId() + { + return $this->crypto_key_version_id; + } + + /** + * Required. The id of the child + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use as primary. + * + * Generated from protobuf field string crypto_key_version_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setCryptoKeyVersionId($var) + { + GPBUtil::checkString($var, True); + $this->crypto_key_version_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateCryptoKeyRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateCryptoKeyRequest.php new file mode 100644 index 000000000000..b11e974dbe70 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateCryptoKeyRequest.php @@ -0,0 +1,137 @@ +google.cloud.kms.v1.UpdateCryptoKeyRequest + */ +class UpdateCryptoKeyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. [CryptoKey][google.cloud.kms.v1.CryptoKey] with updated values. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKey crypto_key = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $crypto_key = null; + /** + * Required. List of fields to be updated in this request. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\Kms\V1\CryptoKey $cryptoKey Required. [CryptoKey][google.cloud.kms.v1.CryptoKey] with updated values. + * @param \Google\Protobuf\FieldMask $updateMask Required. List of fields to be updated in this request. + * + * @return \Google\Cloud\Kms\V1\UpdateCryptoKeyRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Kms\V1\CryptoKey $cryptoKey, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setCryptoKey($cryptoKey) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Kms\V1\CryptoKey $crypto_key + * Required. [CryptoKey][google.cloud.kms.v1.CryptoKey] with updated values. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. List of fields to be updated in this request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. [CryptoKey][google.cloud.kms.v1.CryptoKey] with updated values. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKey crypto_key = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Kms\V1\CryptoKey|null + */ + public function getCryptoKey() + { + return $this->crypto_key; + } + + public function hasCryptoKey() + { + return isset($this->crypto_key); + } + + public function clearCryptoKey() + { + unset($this->crypto_key); + } + + /** + * Required. [CryptoKey][google.cloud.kms.v1.CryptoKey] with updated values. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKey crypto_key = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Kms\V1\CryptoKey $var + * @return $this + */ + public function setCryptoKey($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\CryptoKey::class); + $this->crypto_key = $var; + + return $this; + } + + /** + * Required. List of fields to be updated in this request. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. List of fields to be updated in this request. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateCryptoKeyVersionRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateCryptoKeyVersionRequest.php new file mode 100644 index 000000000000..c91c56d8b516 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateCryptoKeyVersionRequest.php @@ -0,0 +1,142 @@ +google.cloud.kms.v1.UpdateCryptoKeyVersionRequest + */ +class UpdateCryptoKeyVersionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with + * updated values. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion crypto_key_version = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $crypto_key_version = null; + /** + * Required. List of fields to be updated in this request. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\Kms\V1\CryptoKeyVersion $cryptoKeyVersion Required. [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with + * updated values. + * @param \Google\Protobuf\FieldMask $updateMask Required. List of fields to be updated in this request. + * + * @return \Google\Cloud\Kms\V1\UpdateCryptoKeyVersionRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Kms\V1\CryptoKeyVersion $cryptoKeyVersion, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setCryptoKeyVersion($cryptoKeyVersion) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Kms\V1\CryptoKeyVersion $crypto_key_version + * Required. [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with + * updated values. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. List of fields to be updated in this request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with + * updated values. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion crypto_key_version = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Kms\V1\CryptoKeyVersion|null + */ + public function getCryptoKeyVersion() + { + return $this->crypto_key_version; + } + + public function hasCryptoKeyVersion() + { + return isset($this->crypto_key_version); + } + + public function clearCryptoKeyVersion() + { + unset($this->crypto_key_version); + } + + /** + * Required. [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with + * updated values. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion crypto_key_version = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Kms\V1\CryptoKeyVersion $var + * @return $this + */ + public function setCryptoKeyVersion($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\CryptoKeyVersion::class); + $this->crypto_key_version = $var; + + return $this; + } + + /** + * Required. List of fields to be updated in this request. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. List of fields to be updated in this request. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateEkmConfigRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateEkmConfigRequest.php new file mode 100644 index 000000000000..e33d285b04a2 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateEkmConfigRequest.php @@ -0,0 +1,137 @@ +google.cloud.kms.v1.UpdateEkmConfigRequest + */ +class UpdateEkmConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. [EkmConfig][google.cloud.kms.v1.EkmConfig] with updated values. + * + * Generated from protobuf field .google.cloud.kms.v1.EkmConfig ekm_config = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $ekm_config = null; + /** + * Required. List of fields to be updated in this request. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\Kms\V1\EkmConfig $ekmConfig Required. [EkmConfig][google.cloud.kms.v1.EkmConfig] with updated values. + * @param \Google\Protobuf\FieldMask $updateMask Required. List of fields to be updated in this request. + * + * @return \Google\Cloud\Kms\V1\UpdateEkmConfigRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Kms\V1\EkmConfig $ekmConfig, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setEkmConfig($ekmConfig) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Kms\V1\EkmConfig $ekm_config + * Required. [EkmConfig][google.cloud.kms.v1.EkmConfig] with updated values. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. List of fields to be updated in this request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\EkmService::initOnce(); + parent::__construct($data); + } + + /** + * Required. [EkmConfig][google.cloud.kms.v1.EkmConfig] with updated values. + * + * Generated from protobuf field .google.cloud.kms.v1.EkmConfig ekm_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Kms\V1\EkmConfig|null + */ + public function getEkmConfig() + { + return $this->ekm_config; + } + + public function hasEkmConfig() + { + return isset($this->ekm_config); + } + + public function clearEkmConfig() + { + unset($this->ekm_config); + } + + /** + * Required. [EkmConfig][google.cloud.kms.v1.EkmConfig] with updated values. + * + * Generated from protobuf field .google.cloud.kms.v1.EkmConfig ekm_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Kms\V1\EkmConfig $var + * @return $this + */ + public function setEkmConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\EkmConfig::class); + $this->ekm_config = $var; + + return $this; + } + + /** + * Required. List of fields to be updated in this request. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. List of fields to be updated in this request. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateEkmConnectionRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateEkmConnectionRequest.php new file mode 100644 index 000000000000..0a77d3a6ab24 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateEkmConnectionRequest.php @@ -0,0 +1,142 @@ +google.cloud.kms.v1.UpdateEkmConnectionRequest + */ +class UpdateEkmConnectionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. [EkmConnection][google.cloud.kms.v1.EkmConnection] with updated + * values. + * + * Generated from protobuf field .google.cloud.kms.v1.EkmConnection ekm_connection = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $ekm_connection = null; + /** + * Required. List of fields to be updated in this request. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\Kms\V1\EkmConnection $ekmConnection Required. [EkmConnection][google.cloud.kms.v1.EkmConnection] with updated + * values. + * @param \Google\Protobuf\FieldMask $updateMask Required. List of fields to be updated in this request. + * + * @return \Google\Cloud\Kms\V1\UpdateEkmConnectionRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Kms\V1\EkmConnection $ekmConnection, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setEkmConnection($ekmConnection) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Kms\V1\EkmConnection $ekm_connection + * Required. [EkmConnection][google.cloud.kms.v1.EkmConnection] with updated + * values. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. List of fields to be updated in this request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\EkmService::initOnce(); + parent::__construct($data); + } + + /** + * Required. [EkmConnection][google.cloud.kms.v1.EkmConnection] with updated + * values. + * + * Generated from protobuf field .google.cloud.kms.v1.EkmConnection ekm_connection = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Kms\V1\EkmConnection|null + */ + public function getEkmConnection() + { + return $this->ekm_connection; + } + + public function hasEkmConnection() + { + return isset($this->ekm_connection); + } + + public function clearEkmConnection() + { + unset($this->ekm_connection); + } + + /** + * Required. [EkmConnection][google.cloud.kms.v1.EkmConnection] with updated + * values. + * + * Generated from protobuf field .google.cloud.kms.v1.EkmConnection ekm_connection = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Kms\V1\EkmConnection $var + * @return $this + */ + public function setEkmConnection($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\EkmConnection::class); + $this->ekm_connection = $var; + + return $this; + } + + /** + * Required. List of fields to be updated in this request. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. List of fields to be updated in this request. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/VerifyConnectivityRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/VerifyConnectivityRequest.php new file mode 100644 index 000000000000..7ad43869a480 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/VerifyConnectivityRequest.php @@ -0,0 +1,87 @@ +google.cloud.kms.v1.VerifyConnectivityRequest + */ +class VerifyConnectivityRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The [name][google.cloud.kms.v1.EkmConnection.name] of the + * [EkmConnection][google.cloud.kms.v1.EkmConnection] to verify. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The [name][google.cloud.kms.v1.EkmConnection.name] of the + * [EkmConnection][google.cloud.kms.v1.EkmConnection] to verify. Please see + * {@see EkmServiceClient::ekmConnectionName()} for help formatting this field. + * + * @return \Google\Cloud\Kms\V1\VerifyConnectivityRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The [name][google.cloud.kms.v1.EkmConnection.name] of the + * [EkmConnection][google.cloud.kms.v1.EkmConnection] to verify. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\EkmService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The [name][google.cloud.kms.v1.EkmConnection.name] of the + * [EkmConnection][google.cloud.kms.v1.EkmConnection] to verify. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The [name][google.cloud.kms.v1.EkmConnection.name] of the + * [EkmConnection][google.cloud.kms.v1.EkmConnection] to verify. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/VerifyConnectivityResponse.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/VerifyConnectivityResponse.php new file mode 100644 index 000000000000..4221f23c7637 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/VerifyConnectivityResponse.php @@ -0,0 +1,34 @@ +google.cloud.kms.v1.VerifyConnectivityResponse + */ +class VerifyConnectivityResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\EkmService::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/Kms/v1/samples/V1/AutokeyAdminClient/get_autokey_config.php b/owl-bot-staging/Kms/v1/samples/V1/AutokeyAdminClient/get_autokey_config.php new file mode 100644 index 000000000000..d177cd4f40ac --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/AutokeyAdminClient/get_autokey_config.php @@ -0,0 +1,74 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var AutokeyConfig $response */ + $response = $autokeyAdminClient->getAutokeyConfig($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = AutokeyAdminClient::autokeyConfigName('[FOLDER]'); + + get_autokey_config_sample($formattedName); +} +// [END cloudkms_v1_generated_AutokeyAdmin_GetAutokeyConfig_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/AutokeyAdminClient/get_iam_policy.php b/owl-bot-staging/Kms/v1/samples/V1/AutokeyAdminClient/get_iam_policy.php new file mode 100644 index 000000000000..cfc2130680ce --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/AutokeyAdminClient/get_iam_policy.php @@ -0,0 +1,72 @@ +setResource($resource); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $autokeyAdminClient->getIamPolicy($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + + get_iam_policy_sample($resource); +} +// [END cloudkms_v1_generated_AutokeyAdmin_GetIamPolicy_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/AutokeyAdminClient/get_location.php b/owl-bot-staging/Kms/v1/samples/V1/AutokeyAdminClient/get_location.php new file mode 100644 index 000000000000..313d3fd27aec --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/AutokeyAdminClient/get_location.php @@ -0,0 +1,57 @@ +getLocation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END cloudkms_v1_generated_AutokeyAdmin_GetLocation_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/AutokeyAdminClient/list_locations.php b/owl-bot-staging/Kms/v1/samples/V1/AutokeyAdminClient/list_locations.php new file mode 100644 index 000000000000..abfc6a305644 --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/AutokeyAdminClient/list_locations.php @@ -0,0 +1,69 @@ +listLocations($request); + + /** @var Location $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END cloudkms_v1_generated_AutokeyAdmin_ListLocations_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/AutokeyAdminClient/set_iam_policy.php b/owl-bot-staging/Kms/v1/samples/V1/AutokeyAdminClient/set_iam_policy.php new file mode 100644 index 000000000000..a4b890ba94fb --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/AutokeyAdminClient/set_iam_policy.php @@ -0,0 +1,77 @@ +setResource($resource) + ->setPolicy($policy); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $autokeyAdminClient->setIamPolicy($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + + set_iam_policy_sample($resource); +} +// [END cloudkms_v1_generated_AutokeyAdmin_SetIamPolicy_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/AutokeyAdminClient/show_effective_autokey_config.php b/owl-bot-staging/Kms/v1/samples/V1/AutokeyAdminClient/show_effective_autokey_config.php new file mode 100644 index 000000000000..562f33a407d3 --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/AutokeyAdminClient/show_effective_autokey_config.php @@ -0,0 +1,73 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var ShowEffectiveAutokeyConfigResponse $response */ + $response = $autokeyAdminClient->showEffectiveAutokeyConfig($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = AutokeyAdminClient::projectName('[PROJECT]'); + + show_effective_autokey_config_sample($formattedParent); +} +// [END cloudkms_v1_generated_AutokeyAdmin_ShowEffectiveAutokeyConfig_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/AutokeyAdminClient/test_iam_permissions.php b/owl-bot-staging/Kms/v1/samples/V1/AutokeyAdminClient/test_iam_permissions.php new file mode 100644 index 000000000000..808d985cd079 --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/AutokeyAdminClient/test_iam_permissions.php @@ -0,0 +1,84 @@ +setResource($resource) + ->setPermissions($permissions); + + // Call the API and handle any network failures. + try { + /** @var TestIamPermissionsResponse $response */ + $response = $autokeyAdminClient->testIamPermissions($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + $permissionsElement = '[PERMISSIONS]'; + + test_iam_permissions_sample($resource, $permissionsElement); +} +// [END cloudkms_v1_generated_AutokeyAdmin_TestIamPermissions_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/AutokeyAdminClient/update_autokey_config.php b/owl-bot-staging/Kms/v1/samples/V1/AutokeyAdminClient/update_autokey_config.php new file mode 100644 index 000000000000..0fb3c3cfaaa1 --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/AutokeyAdminClient/update_autokey_config.php @@ -0,0 +1,68 @@ +setAutokeyConfig($autokeyConfig) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var AutokeyConfig $response */ + $response = $autokeyAdminClient->updateAutokeyConfig($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END cloudkms_v1_generated_AutokeyAdmin_UpdateAutokeyConfig_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/AutokeyClient/create_key_handle.php b/owl-bot-staging/Kms/v1/samples/V1/AutokeyClient/create_key_handle.php new file mode 100644 index 000000000000..be2161924f3f --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/AutokeyClient/create_key_handle.php @@ -0,0 +1,101 @@ +setResourceTypeSelector($keyHandleResourceTypeSelector); + $request = (new CreateKeyHandleRequest()) + ->setParent($formattedParent) + ->setKeyHandle($keyHandle); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $autokeyClient->createKeyHandle($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var KeyHandle $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = AutokeyClient::locationName('[PROJECT]', '[LOCATION]'); + $keyHandleResourceTypeSelector = '[RESOURCE_TYPE_SELECTOR]'; + + create_key_handle_sample($formattedParent, $keyHandleResourceTypeSelector); +} +// [END cloudkms_v1_generated_Autokey_CreateKeyHandle_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/AutokeyClient/get_iam_policy.php b/owl-bot-staging/Kms/v1/samples/V1/AutokeyClient/get_iam_policy.php new file mode 100644 index 000000000000..99c46bdd8f62 --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/AutokeyClient/get_iam_policy.php @@ -0,0 +1,72 @@ +setResource($resource); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $autokeyClient->getIamPolicy($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + + get_iam_policy_sample($resource); +} +// [END cloudkms_v1_generated_Autokey_GetIamPolicy_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/AutokeyClient/get_key_handle.php b/owl-bot-staging/Kms/v1/samples/V1/AutokeyClient/get_key_handle.php new file mode 100644 index 000000000000..49490346aa27 --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/AutokeyClient/get_key_handle.php @@ -0,0 +1,73 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var KeyHandle $response */ + $response = $autokeyClient->getKeyHandle($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = AutokeyClient::keyHandleName('[PROJECT]', '[LOCATION]', '[KEY_HANDLE]'); + + get_key_handle_sample($formattedName); +} +// [END cloudkms_v1_generated_Autokey_GetKeyHandle_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/AutokeyClient/get_location.php b/owl-bot-staging/Kms/v1/samples/V1/AutokeyClient/get_location.php new file mode 100644 index 000000000000..d23052e76e68 --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/AutokeyClient/get_location.php @@ -0,0 +1,57 @@ +getLocation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END cloudkms_v1_generated_Autokey_GetLocation_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/AutokeyClient/list_key_handles.php b/owl-bot-staging/Kms/v1/samples/V1/AutokeyClient/list_key_handles.php new file mode 100644 index 000000000000..0d93a6139373 --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/AutokeyClient/list_key_handles.php @@ -0,0 +1,78 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $autokeyClient->listKeyHandles($request); + + /** @var KeyHandle $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = AutokeyClient::locationName('[PROJECT]', '[LOCATION]'); + + list_key_handles_sample($formattedParent); +} +// [END cloudkms_v1_generated_Autokey_ListKeyHandles_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/AutokeyClient/list_locations.php b/owl-bot-staging/Kms/v1/samples/V1/AutokeyClient/list_locations.php new file mode 100644 index 000000000000..8a0c1817b5de --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/AutokeyClient/list_locations.php @@ -0,0 +1,69 @@ +listLocations($request); + + /** @var Location $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END cloudkms_v1_generated_Autokey_ListLocations_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/AutokeyClient/set_iam_policy.php b/owl-bot-staging/Kms/v1/samples/V1/AutokeyClient/set_iam_policy.php new file mode 100644 index 000000000000..8aa83ef77ec0 --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/AutokeyClient/set_iam_policy.php @@ -0,0 +1,77 @@ +setResource($resource) + ->setPolicy($policy); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $autokeyClient->setIamPolicy($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + + set_iam_policy_sample($resource); +} +// [END cloudkms_v1_generated_Autokey_SetIamPolicy_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/AutokeyClient/test_iam_permissions.php b/owl-bot-staging/Kms/v1/samples/V1/AutokeyClient/test_iam_permissions.php new file mode 100644 index 000000000000..a7fb7048708a --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/AutokeyClient/test_iam_permissions.php @@ -0,0 +1,84 @@ +setResource($resource) + ->setPermissions($permissions); + + // Call the API and handle any network failures. + try { + /** @var TestIamPermissionsResponse $response */ + $response = $autokeyClient->testIamPermissions($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + $permissionsElement = '[PERMISSIONS]'; + + test_iam_permissions_sample($resource, $permissionsElement); +} +// [END cloudkms_v1_generated_Autokey_TestIamPermissions_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/create_ekm_connection.php b/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/create_ekm_connection.php new file mode 100644 index 000000000000..39734fabe8d6 --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/create_ekm_connection.php @@ -0,0 +1,80 @@ +setParent($formattedParent) + ->setEkmConnectionId($ekmConnectionId) + ->setEkmConnection($ekmConnection); + + // Call the API and handle any network failures. + try { + /** @var EkmConnection $response */ + $response = $ekmServiceClient->createEkmConnection($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = EkmServiceClient::locationName('[PROJECT]', '[LOCATION]'); + $ekmConnectionId = '[EKM_CONNECTION_ID]'; + + create_ekm_connection_sample($formattedParent, $ekmConnectionId); +} +// [END cloudkms_v1_generated_EkmService_CreateEkmConnection_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/get_ekm_config.php b/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/get_ekm_config.php new file mode 100644 index 000000000000..5d0335e595d0 --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/get_ekm_config.php @@ -0,0 +1,73 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var EkmConfig $response */ + $response = $ekmServiceClient->getEkmConfig($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = EkmServiceClient::ekmConfigName('[PROJECT]', '[LOCATION]'); + + get_ekm_config_sample($formattedName); +} +// [END cloudkms_v1_generated_EkmService_GetEkmConfig_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/get_ekm_connection.php b/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/get_ekm_connection.php new file mode 100644 index 000000000000..9361574c244c --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/get_ekm_connection.php @@ -0,0 +1,73 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var EkmConnection $response */ + $response = $ekmServiceClient->getEkmConnection($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = EkmServiceClient::ekmConnectionName('[PROJECT]', '[LOCATION]', '[EKM_CONNECTION]'); + + get_ekm_connection_sample($formattedName); +} +// [END cloudkms_v1_generated_EkmService_GetEkmConnection_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/get_iam_policy.php b/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/get_iam_policy.php new file mode 100644 index 000000000000..da8a9fc7e627 --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/get_iam_policy.php @@ -0,0 +1,72 @@ +setResource($resource); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $ekmServiceClient->getIamPolicy($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + + get_iam_policy_sample($resource); +} +// [END cloudkms_v1_generated_EkmService_GetIamPolicy_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/get_location.php b/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/get_location.php new file mode 100644 index 000000000000..36b24b6d0ef4 --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/get_location.php @@ -0,0 +1,57 @@ +getLocation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END cloudkms_v1_generated_EkmService_GetLocation_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/list_ekm_connections.php b/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/list_ekm_connections.php new file mode 100644 index 000000000000..89edbeb1f779 --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/list_ekm_connections.php @@ -0,0 +1,78 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $ekmServiceClient->listEkmConnections($request); + + /** @var EkmConnection $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = EkmServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + list_ekm_connections_sample($formattedParent); +} +// [END cloudkms_v1_generated_EkmService_ListEkmConnections_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/list_locations.php b/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/list_locations.php new file mode 100644 index 000000000000..3e7e5aefad1b --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/list_locations.php @@ -0,0 +1,69 @@ +listLocations($request); + + /** @var Location $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END cloudkms_v1_generated_EkmService_ListLocations_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/set_iam_policy.php b/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/set_iam_policy.php new file mode 100644 index 000000000000..b0a707b7b540 --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/set_iam_policy.php @@ -0,0 +1,77 @@ +setResource($resource) + ->setPolicy($policy); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $ekmServiceClient->setIamPolicy($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + + set_iam_policy_sample($resource); +} +// [END cloudkms_v1_generated_EkmService_SetIamPolicy_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/test_iam_permissions.php b/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/test_iam_permissions.php new file mode 100644 index 000000000000..36bcc82c8fef --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/test_iam_permissions.php @@ -0,0 +1,84 @@ +setResource($resource) + ->setPermissions($permissions); + + // Call the API and handle any network failures. + try { + /** @var TestIamPermissionsResponse $response */ + $response = $ekmServiceClient->testIamPermissions($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + $permissionsElement = '[PERMISSIONS]'; + + test_iam_permissions_sample($resource, $permissionsElement); +} +// [END cloudkms_v1_generated_EkmService_TestIamPermissions_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/update_ekm_config.php b/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/update_ekm_config.php new file mode 100644 index 000000000000..bf323f584109 --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/update_ekm_config.php @@ -0,0 +1,63 @@ +setEkmConfig($ekmConfig) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var EkmConfig $response */ + $response = $ekmServiceClient->updateEkmConfig($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END cloudkms_v1_generated_EkmService_UpdateEkmConfig_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/update_ekm_connection.php b/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/update_ekm_connection.php new file mode 100644 index 000000000000..a5e7dde39658 --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/update_ekm_connection.php @@ -0,0 +1,62 @@ +setEkmConnection($ekmConnection) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var EkmConnection $response */ + $response = $ekmServiceClient->updateEkmConnection($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END cloudkms_v1_generated_EkmService_UpdateEkmConnection_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/verify_connectivity.php b/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/verify_connectivity.php new file mode 100644 index 000000000000..3c596c035bb9 --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/verify_connectivity.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var VerifyConnectivityResponse $response */ + $response = $ekmServiceClient->verifyConnectivity($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = EkmServiceClient::ekmConnectionName('[PROJECT]', '[LOCATION]', '[EKM_CONNECTION]'); + + verify_connectivity_sample($formattedName); +} +// [END cloudkms_v1_generated_EkmService_VerifyConnectivity_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/approve_single_tenant_hsm_instance_proposal.php b/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/approve_single_tenant_hsm_instance_proposal.php new file mode 100644 index 000000000000..9ba2ff7205e9 --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/approve_single_tenant_hsm_instance_proposal.php @@ -0,0 +1,106 @@ +setSignedChallenge($quorumReplyChallengeRepliesSignedChallenge) + ->setPublicKeyPem($quorumReplyChallengeRepliesPublicKeyPem); + $quorumReplyChallengeReplies = [$challengeReply,]; + $quorumReply = (new QuorumReply()) + ->setChallengeReplies($quorumReplyChallengeReplies); + $request = (new ApproveSingleTenantHsmInstanceProposalRequest()) + ->setName($formattedName) + ->setQuorumReply($quorumReply); + + // Call the API and handle any network failures. + try { + /** @var ApproveSingleTenantHsmInstanceProposalResponse $response */ + $response = $hsmManagementClient->approveSingleTenantHsmInstanceProposal($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = HsmManagementClient::singleTenantHsmInstanceProposalName( + '[PROJECT]', + '[LOCATION]', + '[SINGLE_TENANT_HSM_INSTANCE]', + '[PROPOSAL]' + ); + $quorumReplyChallengeRepliesSignedChallenge = '...'; + $quorumReplyChallengeRepliesPublicKeyPem = '[PUBLIC_KEY_PEM]'; + + approve_single_tenant_hsm_instance_proposal_sample( + $formattedName, + $quorumReplyChallengeRepliesSignedChallenge, + $quorumReplyChallengeRepliesPublicKeyPem + ); +} +// [END cloudkms_v1_generated_HsmManagement_ApproveSingleTenantHsmInstanceProposal_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/create_single_tenant_hsm_instance.php b/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/create_single_tenant_hsm_instance.php new file mode 100644 index 000000000000..5205bd296ab8 --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/create_single_tenant_hsm_instance.php @@ -0,0 +1,104 @@ +setTotalApproverCount($singleTenantHsmInstanceQuorumAuthTotalApproverCount); + $singleTenantHsmInstance = (new SingleTenantHsmInstance()) + ->setQuorumAuth($singleTenantHsmInstanceQuorumAuth); + $request = (new CreateSingleTenantHsmInstanceRequest()) + ->setParent($formattedParent) + ->setSingleTenantHsmInstance($singleTenantHsmInstance); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $hsmManagementClient->createSingleTenantHsmInstance($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var SingleTenantHsmInstance $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = HsmManagementClient::locationName('[PROJECT]', '[LOCATION]'); + $singleTenantHsmInstanceQuorumAuthTotalApproverCount = 0; + + create_single_tenant_hsm_instance_sample( + $formattedParent, + $singleTenantHsmInstanceQuorumAuthTotalApproverCount + ); +} +// [END cloudkms_v1_generated_HsmManagement_CreateSingleTenantHsmInstance_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/create_single_tenant_hsm_instance_proposal.php b/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/create_single_tenant_hsm_instance_proposal.php new file mode 100644 index 000000000000..fcf3a1d17483 --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/create_single_tenant_hsm_instance_proposal.php @@ -0,0 +1,95 @@ +setParent($formattedParent) + ->setSingleTenantHsmInstanceProposal($singleTenantHsmInstanceProposal); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $hsmManagementClient->createSingleTenantHsmInstanceProposal($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var SingleTenantHsmInstanceProposal $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = HsmManagementClient::singleTenantHsmInstanceName( + '[PROJECT]', + '[LOCATION]', + '[SINGLE_TENANT_HSM_INSTANCE]' + ); + + create_single_tenant_hsm_instance_proposal_sample($formattedParent); +} +// [END cloudkms_v1_generated_HsmManagement_CreateSingleTenantHsmInstanceProposal_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/delete_single_tenant_hsm_instance_proposal.php b/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/delete_single_tenant_hsm_instance_proposal.php new file mode 100644 index 000000000000..7ae09872bc2d --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/delete_single_tenant_hsm_instance_proposal.php @@ -0,0 +1,78 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $hsmManagementClient->deleteSingleTenantHsmInstanceProposal($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = HsmManagementClient::singleTenantHsmInstanceProposalName( + '[PROJECT]', + '[LOCATION]', + '[SINGLE_TENANT_HSM_INSTANCE]', + '[PROPOSAL]' + ); + + delete_single_tenant_hsm_instance_proposal_sample($formattedName); +} +// [END cloudkms_v1_generated_HsmManagement_DeleteSingleTenantHsmInstanceProposal_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/execute_single_tenant_hsm_instance_proposal.php b/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/execute_single_tenant_hsm_instance_proposal.php new file mode 100644 index 000000000000..366b599149cb --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/execute_single_tenant_hsm_instance_proposal.php @@ -0,0 +1,97 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $hsmManagementClient->executeSingleTenantHsmInstanceProposal($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ExecuteSingleTenantHsmInstanceProposalResponse $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = HsmManagementClient::singleTenantHsmInstanceProposalName( + '[PROJECT]', + '[LOCATION]', + '[SINGLE_TENANT_HSM_INSTANCE]', + '[PROPOSAL]' + ); + + execute_single_tenant_hsm_instance_proposal_sample($formattedName); +} +// [END cloudkms_v1_generated_HsmManagement_ExecuteSingleTenantHsmInstanceProposal_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/get_iam_policy.php b/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/get_iam_policy.php new file mode 100644 index 000000000000..2a4568f9fbbd --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/get_iam_policy.php @@ -0,0 +1,72 @@ +setResource($resource); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $hsmManagementClient->getIamPolicy($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + + get_iam_policy_sample($resource); +} +// [END cloudkms_v1_generated_HsmManagement_GetIamPolicy_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/get_location.php b/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/get_location.php new file mode 100644 index 000000000000..4d7ab2647ef2 --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/get_location.php @@ -0,0 +1,57 @@ +getLocation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END cloudkms_v1_generated_HsmManagement_GetLocation_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/get_single_tenant_hsm_instance.php b/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/get_single_tenant_hsm_instance.php new file mode 100644 index 000000000000..3a7369e75730 --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/get_single_tenant_hsm_instance.php @@ -0,0 +1,78 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var SingleTenantHsmInstance $response */ + $response = $hsmManagementClient->getSingleTenantHsmInstance($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = HsmManagementClient::singleTenantHsmInstanceName( + '[PROJECT]', + '[LOCATION]', + '[SINGLE_TENANT_HSM_INSTANCE]' + ); + + get_single_tenant_hsm_instance_sample($formattedName); +} +// [END cloudkms_v1_generated_HsmManagement_GetSingleTenantHsmInstance_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/get_single_tenant_hsm_instance_proposal.php b/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/get_single_tenant_hsm_instance_proposal.php new file mode 100644 index 000000000000..fb7b8689f650 --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/get_single_tenant_hsm_instance_proposal.php @@ -0,0 +1,80 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var SingleTenantHsmInstanceProposal $response */ + $response = $hsmManagementClient->getSingleTenantHsmInstanceProposal($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = HsmManagementClient::singleTenantHsmInstanceProposalName( + '[PROJECT]', + '[LOCATION]', + '[SINGLE_TENANT_HSM_INSTANCE]', + '[PROPOSAL]' + ); + + get_single_tenant_hsm_instance_proposal_sample($formattedName); +} +// [END cloudkms_v1_generated_HsmManagement_GetSingleTenantHsmInstanceProposal_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/list_locations.php b/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/list_locations.php new file mode 100644 index 000000000000..44e25ec558c7 --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/list_locations.php @@ -0,0 +1,69 @@ +listLocations($request); + + /** @var Location $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END cloudkms_v1_generated_HsmManagement_ListLocations_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/list_single_tenant_hsm_instance_proposals.php b/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/list_single_tenant_hsm_instance_proposals.php new file mode 100644 index 000000000000..fe2f9f673af9 --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/list_single_tenant_hsm_instance_proposals.php @@ -0,0 +1,84 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $hsmManagementClient->listSingleTenantHsmInstanceProposals($request); + + /** @var SingleTenantHsmInstanceProposal $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = HsmManagementClient::singleTenantHsmInstanceName( + '[PROJECT]', + '[LOCATION]', + '[SINGLE_TENANT_HSM_INSTANCE]' + ); + + list_single_tenant_hsm_instance_proposals_sample($formattedParent); +} +// [END cloudkms_v1_generated_HsmManagement_ListSingleTenantHsmInstanceProposals_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/list_single_tenant_hsm_instances.php b/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/list_single_tenant_hsm_instances.php new file mode 100644 index 000000000000..cfde582acac2 --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/list_single_tenant_hsm_instances.php @@ -0,0 +1,79 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $hsmManagementClient->listSingleTenantHsmInstances($request); + + /** @var SingleTenantHsmInstance $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = HsmManagementClient::locationName('[PROJECT]', '[LOCATION]'); + + list_single_tenant_hsm_instances_sample($formattedParent); +} +// [END cloudkms_v1_generated_HsmManagement_ListSingleTenantHsmInstances_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/set_iam_policy.php b/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/set_iam_policy.php new file mode 100644 index 000000000000..cbcc043dbf4e --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/set_iam_policy.php @@ -0,0 +1,77 @@ +setResource($resource) + ->setPolicy($policy); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $hsmManagementClient->setIamPolicy($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + + set_iam_policy_sample($resource); +} +// [END cloudkms_v1_generated_HsmManagement_SetIamPolicy_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/test_iam_permissions.php b/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/test_iam_permissions.php new file mode 100644 index 000000000000..ef6d081647ee --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/test_iam_permissions.php @@ -0,0 +1,84 @@ +setResource($resource) + ->setPermissions($permissions); + + // Call the API and handle any network failures. + try { + /** @var TestIamPermissionsResponse $response */ + $response = $hsmManagementClient->testIamPermissions($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + $permissionsElement = '[PERMISSIONS]'; + + test_iam_permissions_sample($resource, $permissionsElement); +} +// [END cloudkms_v1_generated_HsmManagement_TestIamPermissions_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/asymmetric_decrypt.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/asymmetric_decrypt.php new file mode 100644 index 000000000000..182d0f9bf897 --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/asymmetric_decrypt.php @@ -0,0 +1,88 @@ +setName($formattedName) + ->setCiphertext($ciphertext); + + // Call the API and handle any network failures. + try { + /** @var AsymmetricDecryptResponse $response */ + $response = $keyManagementServiceClient->asymmetricDecrypt($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = KeyManagementServiceClient::cryptoKeyVersionName( + '[PROJECT]', + '[LOCATION]', + '[KEY_RING]', + '[CRYPTO_KEY]', + '[CRYPTO_KEY_VERSION]' + ); + $ciphertext = '...'; + + asymmetric_decrypt_sample($formattedName, $ciphertext); +} +// [END cloudkms_v1_generated_KeyManagementService_AsymmetricDecrypt_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/asymmetric_sign.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/asymmetric_sign.php new file mode 100644 index 000000000000..79016510198f --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/asymmetric_sign.php @@ -0,0 +1,86 @@ +setName($formattedName) + ->setDigest($digest); + + // Call the API and handle any network failures. + try { + /** @var AsymmetricSignResponse $response */ + $response = $keyManagementServiceClient->asymmetricSign($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = KeyManagementServiceClient::cryptoKeyVersionName( + '[PROJECT]', + '[LOCATION]', + '[KEY_RING]', + '[CRYPTO_KEY]', + '[CRYPTO_KEY_VERSION]' + ); + + asymmetric_sign_sample($formattedName); +} +// [END cloudkms_v1_generated_KeyManagementService_AsymmetricSign_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/create_crypto_key.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/create_crypto_key.php new file mode 100644 index 000000000000..e72dac741ec1 --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/create_crypto_key.php @@ -0,0 +1,83 @@ +setParent($formattedParent) + ->setCryptoKeyId($cryptoKeyId) + ->setCryptoKey($cryptoKey); + + // Call the API and handle any network failures. + try { + /** @var CryptoKey $response */ + $response = $keyManagementServiceClient->createCryptoKey($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = KeyManagementServiceClient::keyRingName('[PROJECT]', '[LOCATION]', '[KEY_RING]'); + $cryptoKeyId = '[CRYPTO_KEY_ID]'; + + create_crypto_key_sample($formattedParent, $cryptoKeyId); +} +// [END cloudkms_v1_generated_KeyManagementService_CreateCryptoKey_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/create_crypto_key_version.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/create_crypto_key_version.php new file mode 100644 index 000000000000..e207e2730242 --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/create_crypto_key_version.php @@ -0,0 +1,85 @@ +setParent($formattedParent) + ->setCryptoKeyVersion($cryptoKeyVersion); + + // Call the API and handle any network failures. + try { + /** @var CryptoKeyVersion $response */ + $response = $keyManagementServiceClient->createCryptoKeyVersion($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = KeyManagementServiceClient::cryptoKeyName( + '[PROJECT]', + '[LOCATION]', + '[KEY_RING]', + '[CRYPTO_KEY]' + ); + + create_crypto_key_version_sample($formattedParent); +} +// [END cloudkms_v1_generated_KeyManagementService_CreateCryptoKeyVersion_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/create_import_job.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/create_import_job.php new file mode 100644 index 000000000000..87db85e33ccf --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/create_import_job.php @@ -0,0 +1,106 @@ +setImportMethod($importJobImportMethod) + ->setProtectionLevel($importJobProtectionLevel); + $request = (new CreateImportJobRequest()) + ->setParent($formattedParent) + ->setImportJobId($importJobId) + ->setImportJob($importJob); + + // Call the API and handle any network failures. + try { + /** @var ImportJob $response */ + $response = $keyManagementServiceClient->createImportJob($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = KeyManagementServiceClient::keyRingName('[PROJECT]', '[LOCATION]', '[KEY_RING]'); + $importJobId = '[IMPORT_JOB_ID]'; + $importJobImportMethod = ImportMethod::IMPORT_METHOD_UNSPECIFIED; + $importJobProtectionLevel = ProtectionLevel::PROTECTION_LEVEL_UNSPECIFIED; + + create_import_job_sample( + $formattedParent, + $importJobId, + $importJobImportMethod, + $importJobProtectionLevel + ); +} +// [END cloudkms_v1_generated_KeyManagementService_CreateImportJob_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/create_key_ring.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/create_key_ring.php new file mode 100644 index 000000000000..2af54e78ea90 --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/create_key_ring.php @@ -0,0 +1,80 @@ +setParent($formattedParent) + ->setKeyRingId($keyRingId) + ->setKeyRing($keyRing); + + // Call the API and handle any network failures. + try { + /** @var KeyRing $response */ + $response = $keyManagementServiceClient->createKeyRing($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = KeyManagementServiceClient::locationName('[PROJECT]', '[LOCATION]'); + $keyRingId = '[KEY_RING_ID]'; + + create_key_ring_sample($formattedParent, $keyRingId); +} +// [END cloudkms_v1_generated_KeyManagementService_CreateKeyRing_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/decapsulate.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/decapsulate.php new file mode 100644 index 000000000000..70fbf5e4812d --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/decapsulate.php @@ -0,0 +1,88 @@ +setName($formattedName) + ->setCiphertext($ciphertext); + + // Call the API and handle any network failures. + try { + /** @var DecapsulateResponse $response */ + $response = $keyManagementServiceClient->decapsulate($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = KeyManagementServiceClient::cryptoKeyVersionName( + '[PROJECT]', + '[LOCATION]', + '[KEY_RING]', + '[CRYPTO_KEY]', + '[CRYPTO_KEY_VERSION]' + ); + $ciphertext = '...'; + + decapsulate_sample($formattedName, $ciphertext); +} +// [END cloudkms_v1_generated_KeyManagementService_Decapsulate_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/decrypt.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/decrypt.php new file mode 100644 index 000000000000..236e3354be4d --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/decrypt.php @@ -0,0 +1,85 @@ +setName($formattedName) + ->setCiphertext($ciphertext); + + // Call the API and handle any network failures. + try { + /** @var DecryptResponse $response */ + $response = $keyManagementServiceClient->decrypt($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = KeyManagementServiceClient::cryptoKeyName( + '[PROJECT]', + '[LOCATION]', + '[KEY_RING]', + '[CRYPTO_KEY]' + ); + $ciphertext = '...'; + + decrypt_sample($formattedName, $ciphertext); +} +// [END cloudkms_v1_generated_KeyManagementService_Decrypt_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/delete_crypto_key.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/delete_crypto_key.php new file mode 100644 index 000000000000..9c6daef4996e --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/delete_crypto_key.php @@ -0,0 +1,91 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $keyManagementServiceClient->deleteCryptoKey($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = KeyManagementServiceClient::cryptoKeyName( + '[PROJECT]', + '[LOCATION]', + '[KEY_RING]', + '[CRYPTO_KEY]' + ); + + delete_crypto_key_sample($formattedName); +} +// [END cloudkms_v1_generated_KeyManagementService_DeleteCryptoKey_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/delete_crypto_key_version.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/delete_crypto_key_version.php new file mode 100644 index 000000000000..611b7b987497 --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/delete_crypto_key_version.php @@ -0,0 +1,97 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $keyManagementServiceClient->deleteCryptoKeyVersion($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = KeyManagementServiceClient::cryptoKeyVersionName( + '[PROJECT]', + '[LOCATION]', + '[KEY_RING]', + '[CRYPTO_KEY]', + '[CRYPTO_KEY_VERSION]' + ); + + delete_crypto_key_version_sample($formattedName); +} +// [END cloudkms_v1_generated_KeyManagementService_DeleteCryptoKeyVersion_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/destroy_crypto_key_version.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/destroy_crypto_key_version.php new file mode 100644 index 000000000000..7e7f8dfdf034 --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/destroy_crypto_key_version.php @@ -0,0 +1,98 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var CryptoKeyVersion $response */ + $response = $keyManagementServiceClient->destroyCryptoKeyVersion($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = KeyManagementServiceClient::cryptoKeyVersionName( + '[PROJECT]', + '[LOCATION]', + '[KEY_RING]', + '[CRYPTO_KEY]', + '[CRYPTO_KEY_VERSION]' + ); + + destroy_crypto_key_version_sample($formattedName); +} +// [END cloudkms_v1_generated_KeyManagementService_DestroyCryptoKeyVersion_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/encrypt.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/encrypt.php new file mode 100644 index 000000000000..f68cdbab3abf --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/encrypt.php @@ -0,0 +1,92 @@ +setName($name) + ->setPlaintext($plaintext); + + // Call the API and handle any network failures. + try { + /** @var EncryptResponse $response */ + $response = $keyManagementServiceClient->encrypt($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $name = '[NAME]'; + $plaintext = '...'; + + encrypt_sample($name, $plaintext); +} +// [END cloudkms_v1_generated_KeyManagementService_Encrypt_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/generate_random_bytes.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/generate_random_bytes.php new file mode 100644 index 000000000000..623886589358 --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/generate_random_bytes.php @@ -0,0 +1,58 @@ +generateRandomBytes($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END cloudkms_v1_generated_KeyManagementService_GenerateRandomBytes_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_crypto_key.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_crypto_key.php new file mode 100644 index 000000000000..17133dfe6770 --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_crypto_key.php @@ -0,0 +1,79 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var CryptoKey $response */ + $response = $keyManagementServiceClient->getCryptoKey($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = KeyManagementServiceClient::cryptoKeyName( + '[PROJECT]', + '[LOCATION]', + '[KEY_RING]', + '[CRYPTO_KEY]' + ); + + get_crypto_key_sample($formattedName); +} +// [END cloudkms_v1_generated_KeyManagementService_GetCryptoKey_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_crypto_key_version.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_crypto_key_version.php new file mode 100644 index 000000000000..bc6deb40e810 --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_crypto_key_version.php @@ -0,0 +1,79 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var CryptoKeyVersion $response */ + $response = $keyManagementServiceClient->getCryptoKeyVersion($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = KeyManagementServiceClient::cryptoKeyVersionName( + '[PROJECT]', + '[LOCATION]', + '[KEY_RING]', + '[CRYPTO_KEY]', + '[CRYPTO_KEY_VERSION]' + ); + + get_crypto_key_version_sample($formattedName); +} +// [END cloudkms_v1_generated_KeyManagementService_GetCryptoKeyVersion_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_iam_policy.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_iam_policy.php new file mode 100644 index 000000000000..a9751e8e18eb --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_iam_policy.php @@ -0,0 +1,72 @@ +setResource($resource); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $keyManagementServiceClient->getIamPolicy($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + + get_iam_policy_sample($resource); +} +// [END cloudkms_v1_generated_KeyManagementService_GetIamPolicy_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_import_job.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_import_job.php new file mode 100644 index 000000000000..2c7c843c8646 --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_import_job.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var ImportJob $response */ + $response = $keyManagementServiceClient->getImportJob($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = KeyManagementServiceClient::importJobName( + '[PROJECT]', + '[LOCATION]', + '[KEY_RING]', + '[IMPORT_JOB]' + ); + + get_import_job_sample($formattedName); +} +// [END cloudkms_v1_generated_KeyManagementService_GetImportJob_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_key_ring.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_key_ring.php new file mode 100644 index 000000000000..db3efbae18ca --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_key_ring.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var KeyRing $response */ + $response = $keyManagementServiceClient->getKeyRing($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = KeyManagementServiceClient::keyRingName('[PROJECT]', '[LOCATION]', '[KEY_RING]'); + + get_key_ring_sample($formattedName); +} +// [END cloudkms_v1_generated_KeyManagementService_GetKeyRing_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_location.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_location.php new file mode 100644 index 000000000000..f83e59c97894 --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_location.php @@ -0,0 +1,57 @@ +getLocation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END cloudkms_v1_generated_KeyManagementService_GetLocation_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_public_key.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_public_key.php new file mode 100644 index 000000000000..4a31fb703223 --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_public_key.php @@ -0,0 +1,83 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var PublicKey $response */ + $response = $keyManagementServiceClient->getPublicKey($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = KeyManagementServiceClient::cryptoKeyVersionName( + '[PROJECT]', + '[LOCATION]', + '[KEY_RING]', + '[CRYPTO_KEY]', + '[CRYPTO_KEY_VERSION]' + ); + + get_public_key_sample($formattedName); +} +// [END cloudkms_v1_generated_KeyManagementService_GetPublicKey_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_retired_resource.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_retired_resource.php new file mode 100644 index 000000000000..c552d042d410 --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_retired_resource.php @@ -0,0 +1,78 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var RetiredResource $response */ + $response = $keyManagementServiceClient->getRetiredResource($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = KeyManagementServiceClient::retiredResourceName( + '[PROJECT]', + '[LOCATION]', + '[RETIRED_RESOURCE]' + ); + + get_retired_resource_sample($formattedName); +} +// [END cloudkms_v1_generated_KeyManagementService_GetRetiredResource_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/import_crypto_key_version.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/import_crypto_key_version.php new file mode 100644 index 000000000000..cc2cc250ac92 --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/import_crypto_key_version.php @@ -0,0 +1,103 @@ +setParent($formattedParent) + ->setAlgorithm($algorithm) + ->setImportJob($importJob); + + // Call the API and handle any network failures. + try { + /** @var CryptoKeyVersion $response */ + $response = $keyManagementServiceClient->importCryptoKeyVersion($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = KeyManagementServiceClient::cryptoKeyName( + '[PROJECT]', + '[LOCATION]', + '[KEY_RING]', + '[CRYPTO_KEY]' + ); + $algorithm = CryptoKeyVersionAlgorithm::CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED; + $importJob = '[IMPORT_JOB]'; + + import_crypto_key_version_sample($formattedParent, $algorithm, $importJob); +} +// [END cloudkms_v1_generated_KeyManagementService_ImportCryptoKeyVersion_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_crypto_key_versions.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_crypto_key_versions.php new file mode 100644 index 000000000000..da69102bb348 --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_crypto_key_versions.php @@ -0,0 +1,83 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $keyManagementServiceClient->listCryptoKeyVersions($request); + + /** @var CryptoKeyVersion $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = KeyManagementServiceClient::cryptoKeyName( + '[PROJECT]', + '[LOCATION]', + '[KEY_RING]', + '[CRYPTO_KEY]' + ); + + list_crypto_key_versions_sample($formattedParent); +} +// [END cloudkms_v1_generated_KeyManagementService_ListCryptoKeyVersions_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_crypto_keys.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_crypto_keys.php new file mode 100644 index 000000000000..b69ff939a120 --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_crypto_keys.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $keyManagementServiceClient->listCryptoKeys($request); + + /** @var CryptoKey $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = KeyManagementServiceClient::keyRingName('[PROJECT]', '[LOCATION]', '[KEY_RING]'); + + list_crypto_keys_sample($formattedParent); +} +// [END cloudkms_v1_generated_KeyManagementService_ListCryptoKeys_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_import_jobs.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_import_jobs.php new file mode 100644 index 000000000000..fb969eb61db7 --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_import_jobs.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $keyManagementServiceClient->listImportJobs($request); + + /** @var ImportJob $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = KeyManagementServiceClient::keyRingName('[PROJECT]', '[LOCATION]', '[KEY_RING]'); + + list_import_jobs_sample($formattedParent); +} +// [END cloudkms_v1_generated_KeyManagementService_ListImportJobs_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_key_rings.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_key_rings.php new file mode 100644 index 000000000000..4ddae61ad91a --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_key_rings.php @@ -0,0 +1,78 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $keyManagementServiceClient->listKeyRings($request); + + /** @var KeyRing $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = KeyManagementServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + list_key_rings_sample($formattedParent); +} +// [END cloudkms_v1_generated_KeyManagementService_ListKeyRings_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_locations.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_locations.php new file mode 100644 index 000000000000..eb1a063c8f1a --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_locations.php @@ -0,0 +1,69 @@ +listLocations($request); + + /** @var Location $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END cloudkms_v1_generated_KeyManagementService_ListLocations_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_retired_resources.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_retired_resources.php new file mode 100644 index 000000000000..9229d578bafe --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_retired_resources.php @@ -0,0 +1,80 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $keyManagementServiceClient->listRetiredResources($request); + + /** @var RetiredResource $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = KeyManagementServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + list_retired_resources_sample($formattedParent); +} +// [END cloudkms_v1_generated_KeyManagementService_ListRetiredResources_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/mac_sign.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/mac_sign.php new file mode 100644 index 000000000000..e4176ade1d22 --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/mac_sign.php @@ -0,0 +1,85 @@ +setName($formattedName) + ->setData($data); + + // Call the API and handle any network failures. + try { + /** @var MacSignResponse $response */ + $response = $keyManagementServiceClient->macSign($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = KeyManagementServiceClient::cryptoKeyVersionName( + '[PROJECT]', + '[LOCATION]', + '[KEY_RING]', + '[CRYPTO_KEY]', + '[CRYPTO_KEY_VERSION]' + ); + $data = '...'; + + mac_sign_sample($formattedName, $data); +} +// [END cloudkms_v1_generated_KeyManagementService_MacSign_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/mac_verify.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/mac_verify.php new file mode 100644 index 000000000000..97f20f09929d --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/mac_verify.php @@ -0,0 +1,90 @@ +setName($formattedName) + ->setData($data) + ->setMac($mac); + + // Call the API and handle any network failures. + try { + /** @var MacVerifyResponse $response */ + $response = $keyManagementServiceClient->macVerify($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = KeyManagementServiceClient::cryptoKeyVersionName( + '[PROJECT]', + '[LOCATION]', + '[KEY_RING]', + '[CRYPTO_KEY]', + '[CRYPTO_KEY_VERSION]' + ); + $data = '...'; + $mac = '...'; + + mac_verify_sample($formattedName, $data, $mac); +} +// [END cloudkms_v1_generated_KeyManagementService_MacVerify_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/raw_decrypt.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/raw_decrypt.php new file mode 100644 index 000000000000..40e08ceee581 --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/raw_decrypt.php @@ -0,0 +1,84 @@ +setName($name) + ->setCiphertext($ciphertext) + ->setInitializationVector($initializationVector); + + // Call the API and handle any network failures. + try { + /** @var RawDecryptResponse $response */ + $response = $keyManagementServiceClient->rawDecrypt($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $name = '[NAME]'; + $ciphertext = '...'; + $initializationVector = '...'; + + raw_decrypt_sample($name, $ciphertext, $initializationVector); +} +// [END cloudkms_v1_generated_KeyManagementService_RawDecrypt_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/raw_encrypt.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/raw_encrypt.php new file mode 100644 index 000000000000..00ea7c7023f0 --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/raw_encrypt.php @@ -0,0 +1,88 @@ +setName($name) + ->setPlaintext($plaintext); + + // Call the API and handle any network failures. + try { + /** @var RawEncryptResponse $response */ + $response = $keyManagementServiceClient->rawEncrypt($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $name = '[NAME]'; + $plaintext = '...'; + + raw_encrypt_sample($name, $plaintext); +} +// [END cloudkms_v1_generated_KeyManagementService_RawEncrypt_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/restore_crypto_key_version.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/restore_crypto_key_version.php new file mode 100644 index 000000000000..4076a23dd0e1 --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/restore_crypto_key_version.php @@ -0,0 +1,86 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var CryptoKeyVersion $response */ + $response = $keyManagementServiceClient->restoreCryptoKeyVersion($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = KeyManagementServiceClient::cryptoKeyVersionName( + '[PROJECT]', + '[LOCATION]', + '[KEY_RING]', + '[CRYPTO_KEY]', + '[CRYPTO_KEY_VERSION]' + ); + + restore_crypto_key_version_sample($formattedName); +} +// [END cloudkms_v1_generated_KeyManagementService_RestoreCryptoKeyVersion_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/set_iam_policy.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/set_iam_policy.php new file mode 100644 index 000000000000..5d9e43c625bc --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/set_iam_policy.php @@ -0,0 +1,77 @@ +setResource($resource) + ->setPolicy($policy); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $keyManagementServiceClient->setIamPolicy($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + + set_iam_policy_sample($resource); +} +// [END cloudkms_v1_generated_KeyManagementService_SetIamPolicy_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/test_iam_permissions.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/test_iam_permissions.php new file mode 100644 index 000000000000..ff01be37bd92 --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/test_iam_permissions.php @@ -0,0 +1,84 @@ +setResource($resource) + ->setPermissions($permissions); + + // Call the API and handle any network failures. + try { + /** @var TestIamPermissionsResponse $response */ + $response = $keyManagementServiceClient->testIamPermissions($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + $permissionsElement = '[PERMISSIONS]'; + + test_iam_permissions_sample($resource, $permissionsElement); +} +// [END cloudkms_v1_generated_KeyManagementService_TestIamPermissions_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/update_crypto_key.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/update_crypto_key.php new file mode 100644 index 000000000000..9dfd58b44670 --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/update_crypto_key.php @@ -0,0 +1,62 @@ +setCryptoKey($cryptoKey) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var CryptoKey $response */ + $response = $keyManagementServiceClient->updateCryptoKey($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END cloudkms_v1_generated_KeyManagementService_UpdateCryptoKey_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/update_crypto_key_primary_version.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/update_crypto_key_primary_version.php new file mode 100644 index 000000000000..0bb435995448 --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/update_crypto_key_primary_version.php @@ -0,0 +1,88 @@ +setName($formattedName) + ->setCryptoKeyVersionId($cryptoKeyVersionId); + + // Call the API and handle any network failures. + try { + /** @var CryptoKey $response */ + $response = $keyManagementServiceClient->updateCryptoKeyPrimaryVersion($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = KeyManagementServiceClient::cryptoKeyName( + '[PROJECT]', + '[LOCATION]', + '[KEY_RING]', + '[CRYPTO_KEY]' + ); + $cryptoKeyVersionId = '[CRYPTO_KEY_VERSION_ID]'; + + update_crypto_key_primary_version_sample($formattedName, $cryptoKeyVersionId); +} +// [END cloudkms_v1_generated_KeyManagementService_UpdateCryptoKeyPrimaryVersion_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/update_crypto_key_version.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/update_crypto_key_version.php new file mode 100644 index 000000000000..706386ccd5c1 --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/update_crypto_key_version.php @@ -0,0 +1,73 @@ +setCryptoKeyVersion($cryptoKeyVersion) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var CryptoKeyVersion $response */ + $response = $keyManagementServiceClient->updateCryptoKeyVersion($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END cloudkms_v1_generated_KeyManagementService_UpdateCryptoKeyVersion_sync] diff --git a/owl-bot-staging/Kms/v1/src/V1/Client/AutokeyAdminClient.php b/owl-bot-staging/Kms/v1/src/V1/Client/AutokeyAdminClient.php new file mode 100644 index 000000000000..e76144ea7eb4 --- /dev/null +++ b/owl-bot-staging/Kms/v1/src/V1/Client/AutokeyAdminClient.php @@ -0,0 +1,536 @@ + getAutokeyConfigAsync(GetAutokeyConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface showEffectiveAutokeyConfigAsync(ShowEffectiveAutokeyConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateAutokeyConfigAsync(UpdateAutokeyConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) + */ +final class AutokeyAdminClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.kms.v1.AutokeyAdmin'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'cloudkms.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'cloudkms.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/cloudkms', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/autokey_admin_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/autokey_admin_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/autokey_admin_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/autokey_admin_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a + * autokey_config resource. + * + * @param string $folder + * + * @return string The formatted autokey_config resource. + */ + public static function autokeyConfigName(string $folder): string + { + return self::getPathTemplate('autokeyConfig')->render([ + 'folder' => $folder, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * folder_autokeyConfig resource. + * + * @param string $folder + * + * @return string The formatted folder_autokeyConfig resource. + */ + public static function folderAutokeyConfigName(string $folder): string + { + return self::getPathTemplate('folderAutokeyConfig')->render([ + 'folder' => $folder, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a project + * resource. + * + * @param string $project + * + * @return string The formatted project resource. + */ + public static function projectName(string $project): string + { + return self::getPathTemplate('project')->render([ + 'project' => $project, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_autokeyConfig resource. + * + * @param string $project + * + * @return string The formatted project_autokeyConfig resource. + */ + public static function projectAutokeyConfigName(string $project): string + { + return self::getPathTemplate('projectAutokeyConfig')->render([ + 'project' => $project, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - autokeyConfig: folders/{folder}/autokeyConfig + * - folderAutokeyConfig: folders/{folder}/autokeyConfig + * - project: projects/{project} + * - projectAutokeyConfig: projects/{project}/autokeyConfig + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'cloudkms.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\Kms\V1\AutokeyAdminClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new AutokeyAdminClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Returns the [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig] for a folder + * or project. + * + * The async variant is {@see AutokeyAdminClient::getAutokeyConfigAsync()} . + * + * @example samples/V1/AutokeyAdminClient/get_autokey_config.php + * + * @param GetAutokeyConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return AutokeyConfig + * + * @throws ApiException Thrown if the API call fails. + */ + public function getAutokeyConfig(GetAutokeyConfigRequest $request, array $callOptions = []): AutokeyConfig + { + return $this->startApiCall('GetAutokeyConfig', $request, $callOptions)->wait(); + } + + /** + * Returns the effective Cloud KMS Autokey configuration for a given project. + * + * The async variant is + * {@see AutokeyAdminClient::showEffectiveAutokeyConfigAsync()} . + * + * @example samples/V1/AutokeyAdminClient/show_effective_autokey_config.php + * + * @param ShowEffectiveAutokeyConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ShowEffectiveAutokeyConfigResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function showEffectiveAutokeyConfig(ShowEffectiveAutokeyConfigRequest $request, array $callOptions = []): ShowEffectiveAutokeyConfigResponse + { + return $this->startApiCall('ShowEffectiveAutokeyConfig', $request, $callOptions)->wait(); + } + + /** + * Updates the [AutokeyConfig][google.cloud.kms.v1.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][google.cloud.kms.v1.KeyHandle] creation in the folder's + * descendant projects will use this configuration to determine where to + * create the resulting [CryptoKey][google.cloud.kms.v1.CryptoKey]. + * + * The async variant is {@see AutokeyAdminClient::updateAutokeyConfigAsync()} . + * + * @example samples/V1/AutokeyAdminClient/update_autokey_config.php + * + * @param UpdateAutokeyConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return AutokeyConfig + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateAutokeyConfig(UpdateAutokeyConfigRequest $request, array $callOptions = []): AutokeyConfig + { + return $this->startApiCall('UpdateAutokeyConfig', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see AutokeyAdminClient::getLocationAsync()} . + * + * @example samples/V1/AutokeyAdminClient/get_location.php + * + * @param GetLocationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Location + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLocation(GetLocationRequest $request, array $callOptions = []): Location + { + return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); + } + + /** + * Lists information about the supported locations for this service. + This method can be called in two ways: + + * **List all public locations:** Use the path `GET /v1/locations`. + * **List project-visible locations:** Use the path + `GET /v1/projects/{project_id}/locations`. This may include public + locations as well as private or other locations specifically visible + to the project. + * + * The async variant is {@see AutokeyAdminClient::listLocationsAsync()} . + * + * @example samples/V1/AutokeyAdminClient/list_locations.php + * + * @param ListLocationsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLocations', $request, $callOptions); + } + + /** + * Gets the access control policy for a resource. Returns an empty policy + if the resource exists and does not have a policy set. + * + * The async variant is {@see AutokeyAdminClient::getIamPolicyAsync()} . + * + * @example samples/V1/AutokeyAdminClient/get_iam_policy.php + * + * @param GetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * Sets the access control policy on the specified resource. Replaces + any existing policy. + + Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` + errors. + * + * The async variant is {@see AutokeyAdminClient::setIamPolicyAsync()} . + * + * @example samples/V1/AutokeyAdminClient/set_iam_policy.php + * + * @param SetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * 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. + * + * The async variant is {@see AutokeyAdminClient::testIamPermissionsAsync()} . + * + * @example samples/V1/AutokeyAdminClient/test_iam_permissions.php + * + * @param TestIamPermissionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return TestIamPermissionsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse + { + return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/Kms/v1/src/V1/Client/AutokeyClient.php b/owl-bot-staging/Kms/v1/src/V1/Client/AutokeyClient.php new file mode 100644 index 000000000000..5bd926303f91 --- /dev/null +++ b/owl-bot-staging/Kms/v1/src/V1/Client/AutokeyClient.php @@ -0,0 +1,591 @@ + createKeyHandleAsync(CreateKeyHandleRequest $request, array $optionalArgs = []) + * @method PromiseInterface getKeyHandleAsync(GetKeyHandleRequest $request, array $optionalArgs = []) + * @method PromiseInterface listKeyHandlesAsync(ListKeyHandlesRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) + */ +final class AutokeyClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.kms.v1.Autokey'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'cloudkms.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'cloudkms.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/cloudkms', + ]; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/autokey_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/autokey_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/autokey_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/autokey_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = $this->descriptors[$methodName]['longRunning'] ?? []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Formats a string containing the fully-qualified path to represent a crypto_key + * resource. + * + * @param string $project + * @param string $location + * @param string $keyRing + * @param string $cryptoKey + * + * @return string The formatted crypto_key resource. + */ + public static function cryptoKeyName(string $project, string $location, string $keyRing, string $cryptoKey): string + { + return self::getPathTemplate('cryptoKey')->render([ + 'project' => $project, + 'location' => $location, + 'key_ring' => $keyRing, + 'crypto_key' => $cryptoKey, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a key_handle + * resource. + * + * @param string $project + * @param string $location + * @param string $keyHandle + * + * @return string The formatted key_handle resource. + */ + public static function keyHandleName(string $project, string $location, string $keyHandle): string + { + return self::getPathTemplate('keyHandle')->render([ + 'project' => $project, + 'location' => $location, + 'key_handle' => $keyHandle, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName(string $project, string $location): string + { + return self::getPathTemplate('location')->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - cryptoKey: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key} + * - keyHandle: projects/{project}/locations/{location}/keyHandles/{key_handle} + * - location: projects/{project}/locations/{location} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'cloudkms.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\Kms\V1\AutokeyClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new AutokeyClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates a new [KeyHandle][google.cloud.kms.v1.KeyHandle], triggering the + * provisioning of a new [CryptoKey][google.cloud.kms.v1.CryptoKey] for CMEK + * use with the given resource type in the configured key project and the same + * location. [GetOperation][google.longrunning.Operations.GetOperation] should + * be used to resolve the resulting long-running operation and get the + * resulting [KeyHandle][google.cloud.kms.v1.KeyHandle] and + * [CryptoKey][google.cloud.kms.v1.CryptoKey]. + * + * The async variant is {@see AutokeyClient::createKeyHandleAsync()} . + * + * @example samples/V1/AutokeyClient/create_key_handle.php + * + * @param CreateKeyHandleRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createKeyHandle(CreateKeyHandleRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateKeyHandle', $request, $callOptions)->wait(); + } + + /** + * Returns the [KeyHandle][google.cloud.kms.v1.KeyHandle]. + * + * The async variant is {@see AutokeyClient::getKeyHandleAsync()} . + * + * @example samples/V1/AutokeyClient/get_key_handle.php + * + * @param GetKeyHandleRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return KeyHandle + * + * @throws ApiException Thrown if the API call fails. + */ + public function getKeyHandle(GetKeyHandleRequest $request, array $callOptions = []): KeyHandle + { + return $this->startApiCall('GetKeyHandle', $request, $callOptions)->wait(); + } + + /** + * Lists [KeyHandles][google.cloud.kms.v1.KeyHandle]. + * + * The async variant is {@see AutokeyClient::listKeyHandlesAsync()} . + * + * @example samples/V1/AutokeyClient/list_key_handles.php + * + * @param ListKeyHandlesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listKeyHandles(ListKeyHandlesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListKeyHandles', $request, $callOptions); + } + + /** + * Gets information about a location. + * + * The async variant is {@see AutokeyClient::getLocationAsync()} . + * + * @example samples/V1/AutokeyClient/get_location.php + * + * @param GetLocationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Location + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLocation(GetLocationRequest $request, array $callOptions = []): Location + { + return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); + } + + /** + * Lists information about the supported locations for this service. + This method can be called in two ways: + + * **List all public locations:** Use the path `GET /v1/locations`. + * **List project-visible locations:** Use the path + `GET /v1/projects/{project_id}/locations`. This may include public + locations as well as private or other locations specifically visible + to the project. + * + * The async variant is {@see AutokeyClient::listLocationsAsync()} . + * + * @example samples/V1/AutokeyClient/list_locations.php + * + * @param ListLocationsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLocations', $request, $callOptions); + } + + /** + * Gets the access control policy for a resource. Returns an empty policy + if the resource exists and does not have a policy set. + * + * The async variant is {@see AutokeyClient::getIamPolicyAsync()} . + * + * @example samples/V1/AutokeyClient/get_iam_policy.php + * + * @param GetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * Sets the access control policy on the specified resource. Replaces + any existing policy. + + Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` + errors. + * + * The async variant is {@see AutokeyClient::setIamPolicyAsync()} . + * + * @example samples/V1/AutokeyClient/set_iam_policy.php + * + * @param SetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * 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. + * + * The async variant is {@see AutokeyClient::testIamPermissionsAsync()} . + * + * @example samples/V1/AutokeyClient/test_iam_permissions.php + * + * @param TestIamPermissionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return TestIamPermissionsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse + { + return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/Kms/v1/src/V1/Client/EkmServiceClient.php b/owl-bot-staging/Kms/v1/src/V1/Client/EkmServiceClient.php new file mode 100644 index 000000000000..deb75945fd61 --- /dev/null +++ b/owl-bot-staging/Kms/v1/src/V1/Client/EkmServiceClient.php @@ -0,0 +1,658 @@ + createEkmConnectionAsync(CreateEkmConnectionRequest $request, array $optionalArgs = []) + * @method PromiseInterface getEkmConfigAsync(GetEkmConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface getEkmConnectionAsync(GetEkmConnectionRequest $request, array $optionalArgs = []) + * @method PromiseInterface listEkmConnectionsAsync(ListEkmConnectionsRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateEkmConfigAsync(UpdateEkmConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateEkmConnectionAsync(UpdateEkmConnectionRequest $request, array $optionalArgs = []) + * @method PromiseInterface verifyConnectivityAsync(VerifyConnectivityRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) + */ +final class EkmServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.kms.v1.EkmService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'cloudkms.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'cloudkms.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/cloudkms', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/ekm_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/ekm_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/ekm_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/ekm_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a ekm_config + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted ekm_config resource. + */ + public static function ekmConfigName(string $project, string $location): string + { + return self::getPathTemplate('ekmConfig')->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * ekm_connection resource. + * + * @param string $project + * @param string $location + * @param string $ekmConnection + * + * @return string The formatted ekm_connection resource. + */ + public static function ekmConnectionName(string $project, string $location, string $ekmConnection): string + { + return self::getPathTemplate('ekmConnection')->render([ + 'project' => $project, + 'location' => $location, + 'ekm_connection' => $ekmConnection, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName(string $project, string $location): string + { + return self::getPathTemplate('location')->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a service + * resource. + * + * @param string $project + * @param string $location + * @param string $namespace + * @param string $service + * + * @return string The formatted service resource. + */ + public static function serviceName(string $project, string $location, string $namespace, string $service): string + { + return self::getPathTemplate('service')->render([ + 'project' => $project, + 'location' => $location, + 'namespace' => $namespace, + 'service' => $service, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - ekmConfig: projects/{project}/locations/{location}/ekmConfig + * - ekmConnection: projects/{project}/locations/{location}/ekmConnections/{ekm_connection} + * - location: projects/{project}/locations/{location} + * - service: projects/{project}/locations/{location}/namespaces/{namespace}/services/{service} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'cloudkms.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\Kms\V1\EkmServiceClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new EkmServiceClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates a new [EkmConnection][google.cloud.kms.v1.EkmConnection] in a given + * Project and Location. + * + * The async variant is {@see EkmServiceClient::createEkmConnectionAsync()} . + * + * @example samples/V1/EkmServiceClient/create_ekm_connection.php + * + * @param CreateEkmConnectionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return EkmConnection + * + * @throws ApiException Thrown if the API call fails. + */ + public function createEkmConnection(CreateEkmConnectionRequest $request, array $callOptions = []): EkmConnection + { + return $this->startApiCall('CreateEkmConnection', $request, $callOptions)->wait(); + } + + /** + * Returns the [EkmConfig][google.cloud.kms.v1.EkmConfig] singleton resource + * for a given project and location. + * + * The async variant is {@see EkmServiceClient::getEkmConfigAsync()} . + * + * @example samples/V1/EkmServiceClient/get_ekm_config.php + * + * @param GetEkmConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return EkmConfig + * + * @throws ApiException Thrown if the API call fails. + */ + public function getEkmConfig(GetEkmConfigRequest $request, array $callOptions = []): EkmConfig + { + return $this->startApiCall('GetEkmConfig', $request, $callOptions)->wait(); + } + + /** + * Returns metadata for a given + * [EkmConnection][google.cloud.kms.v1.EkmConnection]. + * + * The async variant is {@see EkmServiceClient::getEkmConnectionAsync()} . + * + * @example samples/V1/EkmServiceClient/get_ekm_connection.php + * + * @param GetEkmConnectionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return EkmConnection + * + * @throws ApiException Thrown if the API call fails. + */ + public function getEkmConnection(GetEkmConnectionRequest $request, array $callOptions = []): EkmConnection + { + return $this->startApiCall('GetEkmConnection', $request, $callOptions)->wait(); + } + + /** + * Lists [EkmConnections][google.cloud.kms.v1.EkmConnection]. + * + * The async variant is {@see EkmServiceClient::listEkmConnectionsAsync()} . + * + * @example samples/V1/EkmServiceClient/list_ekm_connections.php + * + * @param ListEkmConnectionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listEkmConnections(ListEkmConnectionsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListEkmConnections', $request, $callOptions); + } + + /** + * Updates the [EkmConfig][google.cloud.kms.v1.EkmConfig] singleton resource + * for a given project and location. + * + * The async variant is {@see EkmServiceClient::updateEkmConfigAsync()} . + * + * @example samples/V1/EkmServiceClient/update_ekm_config.php + * + * @param UpdateEkmConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return EkmConfig + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateEkmConfig(UpdateEkmConfigRequest $request, array $callOptions = []): EkmConfig + { + return $this->startApiCall('UpdateEkmConfig', $request, $callOptions)->wait(); + } + + /** + * Updates an [EkmConnection][google.cloud.kms.v1.EkmConnection]'s metadata. + * + * The async variant is {@see EkmServiceClient::updateEkmConnectionAsync()} . + * + * @example samples/V1/EkmServiceClient/update_ekm_connection.php + * + * @param UpdateEkmConnectionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return EkmConnection + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateEkmConnection(UpdateEkmConnectionRequest $request, array $callOptions = []): EkmConnection + { + return $this->startApiCall('UpdateEkmConnection', $request, $callOptions)->wait(); + } + + /** + * Verifies that Cloud KMS can successfully connect to the external key + * manager specified by an [EkmConnection][google.cloud.kms.v1.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. + * + * The async variant is {@see EkmServiceClient::verifyConnectivityAsync()} . + * + * @example samples/V1/EkmServiceClient/verify_connectivity.php + * + * @param VerifyConnectivityRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return VerifyConnectivityResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function verifyConnectivity(VerifyConnectivityRequest $request, array $callOptions = []): VerifyConnectivityResponse + { + return $this->startApiCall('VerifyConnectivity', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see EkmServiceClient::getLocationAsync()} . + * + * @example samples/V1/EkmServiceClient/get_location.php + * + * @param GetLocationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Location + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLocation(GetLocationRequest $request, array $callOptions = []): Location + { + return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); + } + + /** + * Lists information about the supported locations for this service. + This method can be called in two ways: + + * **List all public locations:** Use the path `GET /v1/locations`. + * **List project-visible locations:** Use the path + `GET /v1/projects/{project_id}/locations`. This may include public + locations as well as private or other locations specifically visible + to the project. + * + * The async variant is {@see EkmServiceClient::listLocationsAsync()} . + * + * @example samples/V1/EkmServiceClient/list_locations.php + * + * @param ListLocationsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLocations', $request, $callOptions); + } + + /** + * Gets the access control policy for a resource. Returns an empty policy + if the resource exists and does not have a policy set. + * + * The async variant is {@see EkmServiceClient::getIamPolicyAsync()} . + * + * @example samples/V1/EkmServiceClient/get_iam_policy.php + * + * @param GetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * Sets the access control policy on the specified resource. Replaces + any existing policy. + + Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` + errors. + * + * The async variant is {@see EkmServiceClient::setIamPolicyAsync()} . + * + * @example samples/V1/EkmServiceClient/set_iam_policy.php + * + * @param SetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * 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. + * + * The async variant is {@see EkmServiceClient::testIamPermissionsAsync()} . + * + * @example samples/V1/EkmServiceClient/test_iam_permissions.php + * + * @param TestIamPermissionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return TestIamPermissionsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse + { + return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/Kms/v1/src/V1/Client/HsmManagementClient.php b/owl-bot-staging/Kms/v1/src/V1/Client/HsmManagementClient.php new file mode 100644 index 000000000000..8ef8ca892d3d --- /dev/null +++ b/owl-bot-staging/Kms/v1/src/V1/Client/HsmManagementClient.php @@ -0,0 +1,776 @@ + approveSingleTenantHsmInstanceProposalAsync(ApproveSingleTenantHsmInstanceProposalRequest $request, array $optionalArgs = []) + * @method PromiseInterface createSingleTenantHsmInstanceAsync(CreateSingleTenantHsmInstanceRequest $request, array $optionalArgs = []) + * @method PromiseInterface createSingleTenantHsmInstanceProposalAsync(CreateSingleTenantHsmInstanceProposalRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteSingleTenantHsmInstanceProposalAsync(DeleteSingleTenantHsmInstanceProposalRequest $request, array $optionalArgs = []) + * @method PromiseInterface executeSingleTenantHsmInstanceProposalAsync(ExecuteSingleTenantHsmInstanceProposalRequest $request, array $optionalArgs = []) + * @method PromiseInterface getSingleTenantHsmInstanceAsync(GetSingleTenantHsmInstanceRequest $request, array $optionalArgs = []) + * @method PromiseInterface getSingleTenantHsmInstanceProposalAsync(GetSingleTenantHsmInstanceProposalRequest $request, array $optionalArgs = []) + * @method PromiseInterface listSingleTenantHsmInstanceProposalsAsync(ListSingleTenantHsmInstanceProposalsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listSingleTenantHsmInstancesAsync(ListSingleTenantHsmInstancesRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) + */ +final class HsmManagementClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.kms.v1.HsmManagement'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'cloudkms.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'cloudkms.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/cloudkms', + ]; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/hsm_management_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/hsm_management_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/hsm_management_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/hsm_management_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = $this->descriptors[$methodName]['longRunning'] ?? []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName(string $project, string $location): string + { + return self::getPathTemplate('location')->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * single_tenant_hsm_instance resource. + * + * @param string $project + * @param string $location + * @param string $singleTenantHsmInstance + * + * @return string The formatted single_tenant_hsm_instance resource. + */ + public static function singleTenantHsmInstanceName(string $project, string $location, string $singleTenantHsmInstance): string + { + return self::getPathTemplate('singleTenantHsmInstance')->render([ + 'project' => $project, + 'location' => $location, + 'single_tenant_hsm_instance' => $singleTenantHsmInstance, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * single_tenant_hsm_instance_proposal resource. + * + * @param string $project + * @param string $location + * @param string $singleTenantHsmInstance + * @param string $proposal + * + * @return string The formatted single_tenant_hsm_instance_proposal resource. + */ + public static function singleTenantHsmInstanceProposalName(string $project, string $location, string $singleTenantHsmInstance, string $proposal): string + { + return self::getPathTemplate('singleTenantHsmInstanceProposal')->render([ + 'project' => $project, + 'location' => $location, + 'single_tenant_hsm_instance' => $singleTenantHsmInstance, + 'proposal' => $proposal, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - location: projects/{project}/locations/{location} + * - singleTenantHsmInstance: projects/{project}/locations/{location}/singleTenantHsmInstances/{single_tenant_hsm_instance} + * - singleTenantHsmInstanceProposal: projects/{project}/locations/{location}/singleTenantHsmInstances/{single_tenant_hsm_instance}/proposals/{proposal} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'cloudkms.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\Kms\V1\HsmManagementClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new HsmManagementClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Approves a + * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * for a given + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. The + * proposal must be in the + * [PENDING][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.State.PENDING] + * state. + * + * The async variant is + * {@see HsmManagementClient::approveSingleTenantHsmInstanceProposalAsync()} . + * + * @example samples/V1/HsmManagementClient/approve_single_tenant_hsm_instance_proposal.php + * + * @param ApproveSingleTenantHsmInstanceProposalRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ApproveSingleTenantHsmInstanceProposalResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function approveSingleTenantHsmInstanceProposal(ApproveSingleTenantHsmInstanceProposalRequest $request, array $callOptions = []): ApproveSingleTenantHsmInstanceProposalResponse + { + return $this->startApiCall('ApproveSingleTenantHsmInstanceProposal', $request, $callOptions)->wait(); + } + + /** + * Creates a new + * [SingleTenantHsmInstance][google.cloud.kms.v1.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. + * + * The async variant is + * {@see HsmManagementClient::createSingleTenantHsmInstanceAsync()} . + * + * @example samples/V1/HsmManagementClient/create_single_tenant_hsm_instance.php + * + * @param CreateSingleTenantHsmInstanceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createSingleTenantHsmInstance(CreateSingleTenantHsmInstanceRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateSingleTenantHsmInstance', $request, $callOptions)->wait(); + } + + /** + * Creates a new + * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * for a given + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. + * + * The async variant is + * {@see HsmManagementClient::createSingleTenantHsmInstanceProposalAsync()} . + * + * @example samples/V1/HsmManagementClient/create_single_tenant_hsm_instance_proposal.php + * + * @param CreateSingleTenantHsmInstanceProposalRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createSingleTenantHsmInstanceProposal(CreateSingleTenantHsmInstanceProposalRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateSingleTenantHsmInstanceProposal', $request, $callOptions)->wait(); + } + + /** + * Deletes a + * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal]. + * + * The async variant is + * {@see HsmManagementClient::deleteSingleTenantHsmInstanceProposalAsync()} . + * + * @example samples/V1/HsmManagementClient/delete_single_tenant_hsm_instance_proposal.php + * + * @param DeleteSingleTenantHsmInstanceProposalRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteSingleTenantHsmInstanceProposal(DeleteSingleTenantHsmInstanceProposalRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteSingleTenantHsmInstanceProposal', $request, $callOptions)->wait(); + } + + /** + * Executes a + * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + * for a given + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. The + * proposal must be in the + * [APPROVED][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.State.APPROVED] + * state. + * + * The async variant is + * {@see HsmManagementClient::executeSingleTenantHsmInstanceProposalAsync()} . + * + * @example samples/V1/HsmManagementClient/execute_single_tenant_hsm_instance_proposal.php + * + * @param ExecuteSingleTenantHsmInstanceProposalRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function executeSingleTenantHsmInstanceProposal(ExecuteSingleTenantHsmInstanceProposalRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('ExecuteSingleTenantHsmInstanceProposal', $request, $callOptions)->wait(); + } + + /** + * Returns metadata for a given + * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. + * + * The async variant is + * {@see HsmManagementClient::getSingleTenantHsmInstanceAsync()} . + * + * @example samples/V1/HsmManagementClient/get_single_tenant_hsm_instance.php + * + * @param GetSingleTenantHsmInstanceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return SingleTenantHsmInstance + * + * @throws ApiException Thrown if the API call fails. + */ + public function getSingleTenantHsmInstance(GetSingleTenantHsmInstanceRequest $request, array $callOptions = []): SingleTenantHsmInstance + { + return $this->startApiCall('GetSingleTenantHsmInstance', $request, $callOptions)->wait(); + } + + /** + * Returns metadata for a given + * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal]. + * + * The async variant is + * {@see HsmManagementClient::getSingleTenantHsmInstanceProposalAsync()} . + * + * @example samples/V1/HsmManagementClient/get_single_tenant_hsm_instance_proposal.php + * + * @param GetSingleTenantHsmInstanceProposalRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return SingleTenantHsmInstanceProposal + * + * @throws ApiException Thrown if the API call fails. + */ + public function getSingleTenantHsmInstanceProposal(GetSingleTenantHsmInstanceProposalRequest $request, array $callOptions = []): SingleTenantHsmInstanceProposal + { + return $this->startApiCall('GetSingleTenantHsmInstanceProposal', $request, $callOptions)->wait(); + } + + /** + * Lists + * [SingleTenantHsmInstanceProposals][google.cloud.kms.v1.SingleTenantHsmInstanceProposal]. + * + * The async variant is + * {@see HsmManagementClient::listSingleTenantHsmInstanceProposalsAsync()} . + * + * @example samples/V1/HsmManagementClient/list_single_tenant_hsm_instance_proposals.php + * + * @param ListSingleTenantHsmInstanceProposalsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listSingleTenantHsmInstanceProposals(ListSingleTenantHsmInstanceProposalsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListSingleTenantHsmInstanceProposals', $request, $callOptions); + } + + /** + * Lists + * [SingleTenantHsmInstances][google.cloud.kms.v1.SingleTenantHsmInstance]. + * + * The async variant is + * {@see HsmManagementClient::listSingleTenantHsmInstancesAsync()} . + * + * @example samples/V1/HsmManagementClient/list_single_tenant_hsm_instances.php + * + * @param ListSingleTenantHsmInstancesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listSingleTenantHsmInstances(ListSingleTenantHsmInstancesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListSingleTenantHsmInstances', $request, $callOptions); + } + + /** + * Gets information about a location. + * + * The async variant is {@see HsmManagementClient::getLocationAsync()} . + * + * @example samples/V1/HsmManagementClient/get_location.php + * + * @param GetLocationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Location + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLocation(GetLocationRequest $request, array $callOptions = []): Location + { + return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); + } + + /** + * Lists information about the supported locations for this service. + This method can be called in two ways: + + * **List all public locations:** Use the path `GET /v1/locations`. + * **List project-visible locations:** Use the path + `GET /v1/projects/{project_id}/locations`. This may include public + locations as well as private or other locations specifically visible + to the project. + * + * The async variant is {@see HsmManagementClient::listLocationsAsync()} . + * + * @example samples/V1/HsmManagementClient/list_locations.php + * + * @param ListLocationsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLocations', $request, $callOptions); + } + + /** + * Gets the access control policy for a resource. Returns an empty policy + if the resource exists and does not have a policy set. + * + * The async variant is {@see HsmManagementClient::getIamPolicyAsync()} . + * + * @example samples/V1/HsmManagementClient/get_iam_policy.php + * + * @param GetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * Sets the access control policy on the specified resource. Replaces + any existing policy. + + Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` + errors. + * + * The async variant is {@see HsmManagementClient::setIamPolicyAsync()} . + * + * @example samples/V1/HsmManagementClient/set_iam_policy.php + * + * @param SetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * 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. + * + * The async variant is {@see HsmManagementClient::testIamPermissionsAsync()} . + * + * @example samples/V1/HsmManagementClient/test_iam_permissions.php + * + * @param TestIamPermissionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return TestIamPermissionsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse + { + return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/Kms/v1/src/V1/Client/KeyManagementServiceClient.php b/owl-bot-staging/Kms/v1/src/V1/Client/KeyManagementServiceClient.php new file mode 100644 index 000000000000..6807a2830a54 --- /dev/null +++ b/owl-bot-staging/Kms/v1/src/V1/Client/KeyManagementServiceClient.php @@ -0,0 +1,1639 @@ + asymmetricDecryptAsync(AsymmetricDecryptRequest $request, array $optionalArgs = []) + * @method PromiseInterface asymmetricSignAsync(AsymmetricSignRequest $request, array $optionalArgs = []) + * @method PromiseInterface createCryptoKeyAsync(CreateCryptoKeyRequest $request, array $optionalArgs = []) + * @method PromiseInterface createCryptoKeyVersionAsync(CreateCryptoKeyVersionRequest $request, array $optionalArgs = []) + * @method PromiseInterface createImportJobAsync(CreateImportJobRequest $request, array $optionalArgs = []) + * @method PromiseInterface createKeyRingAsync(CreateKeyRingRequest $request, array $optionalArgs = []) + * @method PromiseInterface decapsulateAsync(DecapsulateRequest $request, array $optionalArgs = []) + * @method PromiseInterface decryptAsync(DecryptRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteCryptoKeyAsync(DeleteCryptoKeyRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteCryptoKeyVersionAsync(DeleteCryptoKeyVersionRequest $request, array $optionalArgs = []) + * @method PromiseInterface destroyCryptoKeyVersionAsync(DestroyCryptoKeyVersionRequest $request, array $optionalArgs = []) + * @method PromiseInterface encryptAsync(EncryptRequest $request, array $optionalArgs = []) + * @method PromiseInterface generateRandomBytesAsync(GenerateRandomBytesRequest $request, array $optionalArgs = []) + * @method PromiseInterface getCryptoKeyAsync(GetCryptoKeyRequest $request, array $optionalArgs = []) + * @method PromiseInterface getCryptoKeyVersionAsync(GetCryptoKeyVersionRequest $request, array $optionalArgs = []) + * @method PromiseInterface getImportJobAsync(GetImportJobRequest $request, array $optionalArgs = []) + * @method PromiseInterface getKeyRingAsync(GetKeyRingRequest $request, array $optionalArgs = []) + * @method PromiseInterface getPublicKeyAsync(GetPublicKeyRequest $request, array $optionalArgs = []) + * @method PromiseInterface getRetiredResourceAsync(GetRetiredResourceRequest $request, array $optionalArgs = []) + * @method PromiseInterface importCryptoKeyVersionAsync(ImportCryptoKeyVersionRequest $request, array $optionalArgs = []) + * @method PromiseInterface listCryptoKeyVersionsAsync(ListCryptoKeyVersionsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listCryptoKeysAsync(ListCryptoKeysRequest $request, array $optionalArgs = []) + * @method PromiseInterface listImportJobsAsync(ListImportJobsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listKeyRingsAsync(ListKeyRingsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listRetiredResourcesAsync(ListRetiredResourcesRequest $request, array $optionalArgs = []) + * @method PromiseInterface macSignAsync(MacSignRequest $request, array $optionalArgs = []) + * @method PromiseInterface macVerifyAsync(MacVerifyRequest $request, array $optionalArgs = []) + * @method PromiseInterface rawDecryptAsync(RawDecryptRequest $request, array $optionalArgs = []) + * @method PromiseInterface rawEncryptAsync(RawEncryptRequest $request, array $optionalArgs = []) + * @method PromiseInterface restoreCryptoKeyVersionAsync(RestoreCryptoKeyVersionRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateCryptoKeyAsync(UpdateCryptoKeyRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateCryptoKeyPrimaryVersionAsync(UpdateCryptoKeyPrimaryVersionRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateCryptoKeyVersionAsync(UpdateCryptoKeyVersionRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) + */ +final class KeyManagementServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.kms.v1.KeyManagementService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'cloudkms.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'cloudkms.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/cloudkms', + ]; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/key_management_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/key_management_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/key_management_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/key_management_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = $this->descriptors[$methodName]['longRunning'] ?? []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Formats a string containing the fully-qualified path to represent a crypto_key + * resource. + * + * @param string $project + * @param string $location + * @param string $keyRing + * @param string $cryptoKey + * + * @return string The formatted crypto_key resource. + */ + public static function cryptoKeyName(string $project, string $location, string $keyRing, string $cryptoKey): string + { + return self::getPathTemplate('cryptoKey')->render([ + 'project' => $project, + 'location' => $location, + 'key_ring' => $keyRing, + 'crypto_key' => $cryptoKey, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * crypto_key_version resource. + * + * @param string $project + * @param string $location + * @param string $keyRing + * @param string $cryptoKey + * @param string $cryptoKeyVersion + * + * @return string The formatted crypto_key_version resource. + */ + public static function cryptoKeyVersionName(string $project, string $location, string $keyRing, string $cryptoKey, string $cryptoKeyVersion): string + { + return self::getPathTemplate('cryptoKeyVersion')->render([ + 'project' => $project, + 'location' => $location, + 'key_ring' => $keyRing, + 'crypto_key' => $cryptoKey, + 'crypto_key_version' => $cryptoKeyVersion, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a import_job + * resource. + * + * @param string $project + * @param string $location + * @param string $keyRing + * @param string $importJob + * + * @return string The formatted import_job resource. + */ + public static function importJobName(string $project, string $location, string $keyRing, string $importJob): string + { + return self::getPathTemplate('importJob')->render([ + 'project' => $project, + 'location' => $location, + 'key_ring' => $keyRing, + 'import_job' => $importJob, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a key_ring + * resource. + * + * @param string $project + * @param string $location + * @param string $keyRing + * + * @return string The formatted key_ring resource. + */ + public static function keyRingName(string $project, string $location, string $keyRing): string + { + return self::getPathTemplate('keyRing')->render([ + 'project' => $project, + 'location' => $location, + 'key_ring' => $keyRing, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName(string $project, string $location): string + { + return self::getPathTemplate('location')->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * retired_resource resource. + * + * @param string $project + * @param string $location + * @param string $retiredResource + * + * @return string The formatted retired_resource resource. + */ + public static function retiredResourceName(string $project, string $location, string $retiredResource): string + { + return self::getPathTemplate('retiredResource')->render([ + 'project' => $project, + 'location' => $location, + 'retired_resource' => $retiredResource, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - cryptoKey: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key} + * - cryptoKeyVersion: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version} + * - importJob: projects/{project}/locations/{location}/keyRings/{key_ring}/importJobs/{import_job} + * - keyRing: projects/{project}/locations/{location}/keyRings/{key_ring} + * - location: projects/{project}/locations/{location} + * - retiredResource: projects/{project}/locations/{location}/retiredResources/{retired_resource} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'cloudkms.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\Kms\V1\KeyManagementServiceClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new KeyManagementServiceClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Decrypts data that was encrypted with a public key retrieved from + * [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey] + * corresponding to a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] + * with [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] + * ASYMMETRIC_DECRYPT. + * + * The async variant is {@see KeyManagementServiceClient::asymmetricDecryptAsync()} + * . + * + * @example samples/V1/KeyManagementServiceClient/asymmetric_decrypt.php + * + * @param AsymmetricDecryptRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return AsymmetricDecryptResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function asymmetricDecrypt(AsymmetricDecryptRequest $request, array $callOptions = []): AsymmetricDecryptResponse + { + return $this->startApiCall('AsymmetricDecrypt', $request, $callOptions)->wait(); + } + + /** + * Signs data using a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] + * with [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] + * ASYMMETRIC_SIGN, producing a signature that can be verified with the public + * key retrieved from + * [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey]. + * + * The async variant is {@see KeyManagementServiceClient::asymmetricSignAsync()} . + * + * @example samples/V1/KeyManagementServiceClient/asymmetric_sign.php + * + * @param AsymmetricSignRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return AsymmetricSignResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function asymmetricSign(AsymmetricSignRequest $request, array $callOptions = []): AsymmetricSignResponse + { + return $this->startApiCall('AsymmetricSign', $request, $callOptions)->wait(); + } + + /** + * Create a new [CryptoKey][google.cloud.kms.v1.CryptoKey] within a + * [KeyRing][google.cloud.kms.v1.KeyRing]. + * + * [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] and + * [CryptoKey.version_template.algorithm][google.cloud.kms.v1.CryptoKeyVersionTemplate.algorithm] + * are required. + * + * The async variant is {@see KeyManagementServiceClient::createCryptoKeyAsync()} . + * + * @example samples/V1/KeyManagementServiceClient/create_crypto_key.php + * + * @param CreateCryptoKeyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return CryptoKey + * + * @throws ApiException Thrown if the API call fails. + */ + public function createCryptoKey(CreateCryptoKeyRequest $request, array $callOptions = []): CryptoKey + { + return $this->startApiCall('CreateCryptoKey', $request, $callOptions)->wait(); + } + + /** + * Create a new [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in a + * [CryptoKey][google.cloud.kms.v1.CryptoKey]. + * + * The server will assign the next sequential id. If unset, + * [state][google.cloud.kms.v1.CryptoKeyVersion.state] will be set to + * [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED]. + * + * The async variant is + * {@see KeyManagementServiceClient::createCryptoKeyVersionAsync()} . + * + * @example samples/V1/KeyManagementServiceClient/create_crypto_key_version.php + * + * @param CreateCryptoKeyVersionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return CryptoKeyVersion + * + * @throws ApiException Thrown if the API call fails. + */ + public function createCryptoKeyVersion(CreateCryptoKeyVersionRequest $request, array $callOptions = []): CryptoKeyVersion + { + return $this->startApiCall('CreateCryptoKeyVersion', $request, $callOptions)->wait(); + } + + /** + * Create a new [ImportJob][google.cloud.kms.v1.ImportJob] within a + * [KeyRing][google.cloud.kms.v1.KeyRing]. + * + * [ImportJob.import_method][google.cloud.kms.v1.ImportJob.import_method] is + * required. + * + * The async variant is {@see KeyManagementServiceClient::createImportJobAsync()} . + * + * @example samples/V1/KeyManagementServiceClient/create_import_job.php + * + * @param CreateImportJobRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ImportJob + * + * @throws ApiException Thrown if the API call fails. + */ + public function createImportJob(CreateImportJobRequest $request, array $callOptions = []): ImportJob + { + return $this->startApiCall('CreateImportJob', $request, $callOptions)->wait(); + } + + /** + * Create a new [KeyRing][google.cloud.kms.v1.KeyRing] in a given Project and + * Location. + * + * The async variant is {@see KeyManagementServiceClient::createKeyRingAsync()} . + * + * @example samples/V1/KeyManagementServiceClient/create_key_ring.php + * + * @param CreateKeyRingRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return KeyRing + * + * @throws ApiException Thrown if the API call fails. + */ + public function createKeyRing(CreateKeyRingRequest $request, array $callOptions = []): KeyRing + { + return $this->startApiCall('CreateKeyRing', $request, $callOptions)->wait(); + } + + /** + * Decapsulates data that was encapsulated with a public key retrieved from + * [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey] + * corresponding to a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] + * with [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] + * KEY_ENCAPSULATION. + * + * The async variant is {@see KeyManagementServiceClient::decapsulateAsync()} . + * + * @example samples/V1/KeyManagementServiceClient/decapsulate.php + * + * @param DecapsulateRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return DecapsulateResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function decapsulate(DecapsulateRequest $request, array $callOptions = []): DecapsulateResponse + { + return $this->startApiCall('Decapsulate', $request, $callOptions)->wait(); + } + + /** + * Decrypts data that was protected by + * [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt]. The + * [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] must be + * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]. + * + * The async variant is {@see KeyManagementServiceClient::decryptAsync()} . + * + * @example samples/V1/KeyManagementServiceClient/decrypt.php + * + * @param DecryptRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return DecryptResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function decrypt(DecryptRequest $request, array $callOptions = []): DecryptResponse + { + return $this->startApiCall('Decrypt', $request, $callOptions)->wait(); + } + + /** + * Permanently deletes the given [CryptoKey][google.cloud.kms.v1.CryptoKey]. + * All child [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] must + * have been previously deleted using + * [KeyManagementService.DeleteCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.DeleteCryptoKeyVersion]. + * The specified crypto key will be immediately and permanently deleted upon + * calling this method. This action cannot be undone. + * + * The async variant is {@see KeyManagementServiceClient::deleteCryptoKeyAsync()} . + * + * @example samples/V1/KeyManagementServiceClient/delete_crypto_key.php + * + * @param DeleteCryptoKeyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteCryptoKey(DeleteCryptoKeyRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteCryptoKey', $request, $callOptions)->wait(); + } + + /** + * Permanently deletes the given + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. Only possible if + * the version has not been previously imported and if its + * [state][google.cloud.kms.v1.CryptoKeyVersion.state] is one of + * [DESTROYED][CryptoKeyVersionState.DESTROYED], + * [IMPORT_FAILED][CryptoKeyVersionState.IMPORT_FAILED], or + * [GENERATION_FAILED][CryptoKeyVersionState.GENERATION_FAILED]. + * Successfully imported + * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] cannot be deleted + * at this time. The specified version will be immediately and permanently + * deleted upon calling this method. This action cannot be undone. + * + * The async variant is + * {@see KeyManagementServiceClient::deleteCryptoKeyVersionAsync()} . + * + * @example samples/V1/KeyManagementServiceClient/delete_crypto_key_version.php + * + * @param DeleteCryptoKeyVersionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteCryptoKeyVersion(DeleteCryptoKeyVersionRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteCryptoKeyVersion', $request, $callOptions)->wait(); + } + + /** + * Schedule a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] for + * destruction. + * + * Upon calling this method, + * [CryptoKeyVersion.state][google.cloud.kms.v1.CryptoKeyVersion.state] will + * be set to + * [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED], + * and [destroy_time][google.cloud.kms.v1.CryptoKeyVersion.destroy_time] will + * be set to the time + * [destroy_scheduled_duration][google.cloud.kms.v1.CryptoKey.destroy_scheduled_duration] + * in the future. At that time, the + * [state][google.cloud.kms.v1.CryptoKeyVersion.state] will automatically + * change to + * [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED], + * and the key material will be irrevocably destroyed. + * + * Before the + * [destroy_time][google.cloud.kms.v1.CryptoKeyVersion.destroy_time] is + * reached, + * [RestoreCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.RestoreCryptoKeyVersion] + * may be called to reverse the process. + * + * The async variant is + * {@see KeyManagementServiceClient::destroyCryptoKeyVersionAsync()} . + * + * @example samples/V1/KeyManagementServiceClient/destroy_crypto_key_version.php + * + * @param DestroyCryptoKeyVersionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return CryptoKeyVersion + * + * @throws ApiException Thrown if the API call fails. + */ + public function destroyCryptoKeyVersion(DestroyCryptoKeyVersionRequest $request, array $callOptions = []): CryptoKeyVersion + { + return $this->startApiCall('DestroyCryptoKeyVersion', $request, $callOptions)->wait(); + } + + /** + * Encrypts data, so that it can only be recovered by a call to + * [Decrypt][google.cloud.kms.v1.KeyManagementService.Decrypt]. The + * [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] must be + * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]. + * + * The async variant is {@see KeyManagementServiceClient::encryptAsync()} . + * + * @example samples/V1/KeyManagementServiceClient/encrypt.php + * + * @param EncryptRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return EncryptResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function encrypt(EncryptRequest $request, array $callOptions = []): EncryptResponse + { + return $this->startApiCall('Encrypt', $request, $callOptions)->wait(); + } + + /** + * Generate random bytes using the Cloud KMS randomness source in the provided + * location. + * + * The async variant is + * {@see KeyManagementServiceClient::generateRandomBytesAsync()} . + * + * @example samples/V1/KeyManagementServiceClient/generate_random_bytes.php + * + * @param GenerateRandomBytesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return GenerateRandomBytesResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function generateRandomBytes(GenerateRandomBytesRequest $request, array $callOptions = []): GenerateRandomBytesResponse + { + return $this->startApiCall('GenerateRandomBytes', $request, $callOptions)->wait(); + } + + /** + * Returns metadata for a given [CryptoKey][google.cloud.kms.v1.CryptoKey], as + * well as its [primary][google.cloud.kms.v1.CryptoKey.primary] + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. + * + * The async variant is {@see KeyManagementServiceClient::getCryptoKeyAsync()} . + * + * @example samples/V1/KeyManagementServiceClient/get_crypto_key.php + * + * @param GetCryptoKeyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return CryptoKey + * + * @throws ApiException Thrown if the API call fails. + */ + public function getCryptoKey(GetCryptoKeyRequest $request, array $callOptions = []): CryptoKey + { + return $this->startApiCall('GetCryptoKey', $request, $callOptions)->wait(); + } + + /** + * Returns metadata for a given + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. + * + * The async variant is + * {@see KeyManagementServiceClient::getCryptoKeyVersionAsync()} . + * + * @example samples/V1/KeyManagementServiceClient/get_crypto_key_version.php + * + * @param GetCryptoKeyVersionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return CryptoKeyVersion + * + * @throws ApiException Thrown if the API call fails. + */ + public function getCryptoKeyVersion(GetCryptoKeyVersionRequest $request, array $callOptions = []): CryptoKeyVersion + { + return $this->startApiCall('GetCryptoKeyVersion', $request, $callOptions)->wait(); + } + + /** + * Returns metadata for a given [ImportJob][google.cloud.kms.v1.ImportJob]. + * + * The async variant is {@see KeyManagementServiceClient::getImportJobAsync()} . + * + * @example samples/V1/KeyManagementServiceClient/get_import_job.php + * + * @param GetImportJobRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ImportJob + * + * @throws ApiException Thrown if the API call fails. + */ + public function getImportJob(GetImportJobRequest $request, array $callOptions = []): ImportJob + { + return $this->startApiCall('GetImportJob', $request, $callOptions)->wait(); + } + + /** + * Returns metadata for a given [KeyRing][google.cloud.kms.v1.KeyRing]. + * + * The async variant is {@see KeyManagementServiceClient::getKeyRingAsync()} . + * + * @example samples/V1/KeyManagementServiceClient/get_key_ring.php + * + * @param GetKeyRingRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return KeyRing + * + * @throws ApiException Thrown if the API call fails. + */ + public function getKeyRing(GetKeyRingRequest $request, array $callOptions = []): KeyRing + { + return $this->startApiCall('GetKeyRing', $request, $callOptions)->wait(); + } + + /** + * Returns the public key for the given + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. The + * [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] must be + * [ASYMMETRIC_SIGN][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ASYMMETRIC_SIGN] + * or + * [ASYMMETRIC_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ASYMMETRIC_DECRYPT]. + * + * The async variant is {@see KeyManagementServiceClient::getPublicKeyAsync()} . + * + * @example samples/V1/KeyManagementServiceClient/get_public_key.php + * + * @param GetPublicKeyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PublicKey + * + * @throws ApiException Thrown if the API call fails. + */ + public function getPublicKey(GetPublicKeyRequest $request, array $callOptions = []): PublicKey + { + return $this->startApiCall('GetPublicKey', $request, $callOptions)->wait(); + } + + /** + * Retrieves a specific [RetiredResource][google.cloud.kms.v1.RetiredResource] + * resource, which represents the record of a deleted + * [CryptoKey][google.cloud.kms.v1.CryptoKey]. + * + * The async variant is + * {@see KeyManagementServiceClient::getRetiredResourceAsync()} . + * + * @example samples/V1/KeyManagementServiceClient/get_retired_resource.php + * + * @param GetRetiredResourceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return RetiredResource + * + * @throws ApiException Thrown if the API call fails. + */ + public function getRetiredResource(GetRetiredResourceRequest $request, array $callOptions = []): RetiredResource + { + return $this->startApiCall('GetRetiredResource', $request, $callOptions)->wait(); + } + + /** + * Import wrapped key material into a + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. + * + * All requests must specify a [CryptoKey][google.cloud.kms.v1.CryptoKey]. If + * a [CryptoKeyVersion][google.cloud.kms.v1.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][google.cloud.kms.v1.CryptoKey]. + * + * The async variant is + * {@see KeyManagementServiceClient::importCryptoKeyVersionAsync()} . + * + * @example samples/V1/KeyManagementServiceClient/import_crypto_key_version.php + * + * @param ImportCryptoKeyVersionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return CryptoKeyVersion + * + * @throws ApiException Thrown if the API call fails. + */ + public function importCryptoKeyVersion(ImportCryptoKeyVersionRequest $request, array $callOptions = []): CryptoKeyVersion + { + return $this->startApiCall('ImportCryptoKeyVersion', $request, $callOptions)->wait(); + } + + /** + * Lists [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. + * + * The async variant is + * {@see KeyManagementServiceClient::listCryptoKeyVersionsAsync()} . + * + * @example samples/V1/KeyManagementServiceClient/list_crypto_key_versions.php + * + * @param ListCryptoKeyVersionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listCryptoKeyVersions(ListCryptoKeyVersionsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListCryptoKeyVersions', $request, $callOptions); + } + + /** + * Lists [CryptoKeys][google.cloud.kms.v1.CryptoKey]. + * + * The async variant is {@see KeyManagementServiceClient::listCryptoKeysAsync()} . + * + * @example samples/V1/KeyManagementServiceClient/list_crypto_keys.php + * + * @param ListCryptoKeysRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listCryptoKeys(ListCryptoKeysRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListCryptoKeys', $request, $callOptions); + } + + /** + * Lists [ImportJobs][google.cloud.kms.v1.ImportJob]. + * + * The async variant is {@see KeyManagementServiceClient::listImportJobsAsync()} . + * + * @example samples/V1/KeyManagementServiceClient/list_import_jobs.php + * + * @param ListImportJobsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listImportJobs(ListImportJobsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListImportJobs', $request, $callOptions); + } + + /** + * Lists [KeyRings][google.cloud.kms.v1.KeyRing]. + * + * The async variant is {@see KeyManagementServiceClient::listKeyRingsAsync()} . + * + * @example samples/V1/KeyManagementServiceClient/list_key_rings.php + * + * @param ListKeyRingsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listKeyRings(ListKeyRingsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListKeyRings', $request, $callOptions); + } + + /** + * Lists the [RetiredResources][google.cloud.kms.v1.RetiredResource] which are + * the records of deleted [CryptoKeys][google.cloud.kms.v1.CryptoKey]. + * RetiredResources prevent the reuse of these resource names after deletion. + * + * The async variant is + * {@see KeyManagementServiceClient::listRetiredResourcesAsync()} . + * + * @example samples/V1/KeyManagementServiceClient/list_retired_resources.php + * + * @param ListRetiredResourcesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listRetiredResources(ListRetiredResourcesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListRetiredResources', $request, $callOptions); + } + + /** + * Signs data using a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] + * with [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] MAC, + * producing a tag that can be verified by another source with the same key. + * + * The async variant is {@see KeyManagementServiceClient::macSignAsync()} . + * + * @example samples/V1/KeyManagementServiceClient/mac_sign.php + * + * @param MacSignRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return MacSignResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function macSign(MacSignRequest $request, array $callOptions = []): MacSignResponse + { + return $this->startApiCall('MacSign', $request, $callOptions)->wait(); + } + + /** + * Verifies MAC tag using a + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with + * [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] MAC, and returns + * a response that indicates whether or not the verification was successful. + * + * The async variant is {@see KeyManagementServiceClient::macVerifyAsync()} . + * + * @example samples/V1/KeyManagementServiceClient/mac_verify.php + * + * @param MacVerifyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return MacVerifyResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function macVerify(MacVerifyRequest $request, array $callOptions = []): MacVerifyResponse + { + return $this->startApiCall('MacVerify', $request, $callOptions)->wait(); + } + + /** + * Decrypts data that was originally encrypted using a raw cryptographic + * mechanism. The [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] + * must be + * [RAW_ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.RAW_ENCRYPT_DECRYPT]. + * + * The async variant is {@see KeyManagementServiceClient::rawDecryptAsync()} . + * + * @example samples/V1/KeyManagementServiceClient/raw_decrypt.php + * + * @param RawDecryptRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return RawDecryptResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function rawDecrypt(RawDecryptRequest $request, array $callOptions = []): RawDecryptResponse + { + return $this->startApiCall('RawDecrypt', $request, $callOptions)->wait(); + } + + /** + * Encrypts data using portable cryptographic primitives. Most users should + * choose [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt] and + * [Decrypt][google.cloud.kms.v1.KeyManagementService.Decrypt] rather than + * their raw counterparts. The + * [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] must be + * [RAW_ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.RAW_ENCRYPT_DECRYPT]. + * + * The async variant is {@see KeyManagementServiceClient::rawEncryptAsync()} . + * + * @example samples/V1/KeyManagementServiceClient/raw_encrypt.php + * + * @param RawEncryptRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return RawEncryptResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function rawEncrypt(RawEncryptRequest $request, array $callOptions = []): RawEncryptResponse + { + return $this->startApiCall('RawEncrypt', $request, $callOptions)->wait(); + } + + /** + * Restore a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in the + * [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED] + * state. + * + * Upon restoration of the CryptoKeyVersion, + * [state][google.cloud.kms.v1.CryptoKeyVersion.state] will be set to + * [DISABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DISABLED], + * and [destroy_time][google.cloud.kms.v1.CryptoKeyVersion.destroy_time] will + * be cleared. + * + * The async variant is + * {@see KeyManagementServiceClient::restoreCryptoKeyVersionAsync()} . + * + * @example samples/V1/KeyManagementServiceClient/restore_crypto_key_version.php + * + * @param RestoreCryptoKeyVersionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return CryptoKeyVersion + * + * @throws ApiException Thrown if the API call fails. + */ + public function restoreCryptoKeyVersion(RestoreCryptoKeyVersionRequest $request, array $callOptions = []): CryptoKeyVersion + { + return $this->startApiCall('RestoreCryptoKeyVersion', $request, $callOptions)->wait(); + } + + /** + * Update a [CryptoKey][google.cloud.kms.v1.CryptoKey]. + * + * The async variant is {@see KeyManagementServiceClient::updateCryptoKeyAsync()} . + * + * @example samples/V1/KeyManagementServiceClient/update_crypto_key.php + * + * @param UpdateCryptoKeyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return CryptoKey + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateCryptoKey(UpdateCryptoKeyRequest $request, array $callOptions = []): CryptoKey + { + return $this->startApiCall('UpdateCryptoKey', $request, $callOptions)->wait(); + } + + /** + * Update the version of a [CryptoKey][google.cloud.kms.v1.CryptoKey] that + * will be used in + * [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt]. + * + * Returns an error if called on a key whose purpose is not + * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]. + * + * The async variant is + * {@see KeyManagementServiceClient::updateCryptoKeyPrimaryVersionAsync()} . + * + * @example samples/V1/KeyManagementServiceClient/update_crypto_key_primary_version.php + * + * @param UpdateCryptoKeyPrimaryVersionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return CryptoKey + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateCryptoKeyPrimaryVersion(UpdateCryptoKeyPrimaryVersionRequest $request, array $callOptions = []): CryptoKey + { + return $this->startApiCall('UpdateCryptoKeyPrimaryVersion', $request, $callOptions)->wait(); + } + + /** + * Update a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s + * metadata. + * + * [state][google.cloud.kms.v1.CryptoKeyVersion.state] may be changed between + * [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED] + * and + * [DISABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DISABLED] + * using this method. See + * [DestroyCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.DestroyCryptoKeyVersion] + * and + * [RestoreCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.RestoreCryptoKeyVersion] + * to move between other states. + * + * The async variant is + * {@see KeyManagementServiceClient::updateCryptoKeyVersionAsync()} . + * + * @example samples/V1/KeyManagementServiceClient/update_crypto_key_version.php + * + * @param UpdateCryptoKeyVersionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return CryptoKeyVersion + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateCryptoKeyVersion(UpdateCryptoKeyVersionRequest $request, array $callOptions = []): CryptoKeyVersion + { + return $this->startApiCall('UpdateCryptoKeyVersion', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see KeyManagementServiceClient::getLocationAsync()} . + * + * @example samples/V1/KeyManagementServiceClient/get_location.php + * + * @param GetLocationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Location + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLocation(GetLocationRequest $request, array $callOptions = []): Location + { + return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); + } + + /** + * Lists information about the supported locations for this service. + This method can be called in two ways: + + * **List all public locations:** Use the path `GET /v1/locations`. + * **List project-visible locations:** Use the path + `GET /v1/projects/{project_id}/locations`. This may include public + locations as well as private or other locations specifically visible + to the project. + * + * The async variant is {@see KeyManagementServiceClient::listLocationsAsync()} . + * + * @example samples/V1/KeyManagementServiceClient/list_locations.php + * + * @param ListLocationsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLocations', $request, $callOptions); + } + + /** + * Gets the access control policy for a resource. Returns an empty policy + if the resource exists and does not have a policy set. + * + * The async variant is {@see KeyManagementServiceClient::getIamPolicyAsync()} . + * + * @example samples/V1/KeyManagementServiceClient/get_iam_policy.php + * + * @param GetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * Sets the access control policy on the specified resource. Replaces + any existing policy. + + Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` + errors. + * + * The async variant is {@see KeyManagementServiceClient::setIamPolicyAsync()} . + * + * @example samples/V1/KeyManagementServiceClient/set_iam_policy.php + * + * @param SetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * 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. + * + * The async variant is + * {@see KeyManagementServiceClient::testIamPermissionsAsync()} . + * + * @example samples/V1/KeyManagementServiceClient/test_iam_permissions.php + * + * @param TestIamPermissionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return TestIamPermissionsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse + { + return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/Kms/v1/src/V1/gapic_metadata.json b/owl-bot-staging/Kms/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..72857cb3c3fc --- /dev/null +++ b/owl-bot-staging/Kms/v1/src/V1/gapic_metadata.json @@ -0,0 +1,454 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.kms.v1", + "libraryPackage": "Google\\Cloud\\Kms\\V1", + "services": { + "Autokey": { + "clients": { + "grpc": { + "libraryClient": "AutokeyGapicClient", + "rpcs": { + "CreateKeyHandle": { + "methods": [ + "createKeyHandle" + ] + }, + "GetKeyHandle": { + "methods": [ + "getKeyHandle" + ] + }, + "ListKeyHandles": { + "methods": [ + "listKeyHandles" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + } + } + } + } + }, + "AutokeyAdmin": { + "clients": { + "grpc": { + "libraryClient": "AutokeyAdminGapicClient", + "rpcs": { + "GetAutokeyConfig": { + "methods": [ + "getAutokeyConfig" + ] + }, + "ShowEffectiveAutokeyConfig": { + "methods": [ + "showEffectiveAutokeyConfig" + ] + }, + "UpdateAutokeyConfig": { + "methods": [ + "updateAutokeyConfig" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + } + } + } + } + }, + "EkmService": { + "clients": { + "grpc": { + "libraryClient": "EkmServiceGapicClient", + "rpcs": { + "CreateEkmConnection": { + "methods": [ + "createEkmConnection" + ] + }, + "GetEkmConfig": { + "methods": [ + "getEkmConfig" + ] + }, + "GetEkmConnection": { + "methods": [ + "getEkmConnection" + ] + }, + "ListEkmConnections": { + "methods": [ + "listEkmConnections" + ] + }, + "UpdateEkmConfig": { + "methods": [ + "updateEkmConfig" + ] + }, + "UpdateEkmConnection": { + "methods": [ + "updateEkmConnection" + ] + }, + "VerifyConnectivity": { + "methods": [ + "verifyConnectivity" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + } + } + } + } + }, + "HsmManagement": { + "clients": { + "grpc": { + "libraryClient": "HsmManagementGapicClient", + "rpcs": { + "ApproveSingleTenantHsmInstanceProposal": { + "methods": [ + "approveSingleTenantHsmInstanceProposal" + ] + }, + "CreateSingleTenantHsmInstance": { + "methods": [ + "createSingleTenantHsmInstance" + ] + }, + "CreateSingleTenantHsmInstanceProposal": { + "methods": [ + "createSingleTenantHsmInstanceProposal" + ] + }, + "DeleteSingleTenantHsmInstanceProposal": { + "methods": [ + "deleteSingleTenantHsmInstanceProposal" + ] + }, + "ExecuteSingleTenantHsmInstanceProposal": { + "methods": [ + "executeSingleTenantHsmInstanceProposal" + ] + }, + "GetSingleTenantHsmInstance": { + "methods": [ + "getSingleTenantHsmInstance" + ] + }, + "GetSingleTenantHsmInstanceProposal": { + "methods": [ + "getSingleTenantHsmInstanceProposal" + ] + }, + "ListSingleTenantHsmInstanceProposals": { + "methods": [ + "listSingleTenantHsmInstanceProposals" + ] + }, + "ListSingleTenantHsmInstances": { + "methods": [ + "listSingleTenantHsmInstances" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + } + } + } + } + }, + "KeyManagementService": { + "clients": { + "grpc": { + "libraryClient": "KeyManagementServiceGapicClient", + "rpcs": { + "AsymmetricDecrypt": { + "methods": [ + "asymmetricDecrypt" + ] + }, + "AsymmetricSign": { + "methods": [ + "asymmetricSign" + ] + }, + "CreateCryptoKey": { + "methods": [ + "createCryptoKey" + ] + }, + "CreateCryptoKeyVersion": { + "methods": [ + "createCryptoKeyVersion" + ] + }, + "CreateImportJob": { + "methods": [ + "createImportJob" + ] + }, + "CreateKeyRing": { + "methods": [ + "createKeyRing" + ] + }, + "Decapsulate": { + "methods": [ + "decapsulate" + ] + }, + "Decrypt": { + "methods": [ + "decrypt" + ] + }, + "DeleteCryptoKey": { + "methods": [ + "deleteCryptoKey" + ] + }, + "DeleteCryptoKeyVersion": { + "methods": [ + "deleteCryptoKeyVersion" + ] + }, + "DestroyCryptoKeyVersion": { + "methods": [ + "destroyCryptoKeyVersion" + ] + }, + "Encrypt": { + "methods": [ + "encrypt" + ] + }, + "GenerateRandomBytes": { + "methods": [ + "generateRandomBytes" + ] + }, + "GetCryptoKey": { + "methods": [ + "getCryptoKey" + ] + }, + "GetCryptoKeyVersion": { + "methods": [ + "getCryptoKeyVersion" + ] + }, + "GetImportJob": { + "methods": [ + "getImportJob" + ] + }, + "GetKeyRing": { + "methods": [ + "getKeyRing" + ] + }, + "GetPublicKey": { + "methods": [ + "getPublicKey" + ] + }, + "GetRetiredResource": { + "methods": [ + "getRetiredResource" + ] + }, + "ImportCryptoKeyVersion": { + "methods": [ + "importCryptoKeyVersion" + ] + }, + "ListCryptoKeyVersions": { + "methods": [ + "listCryptoKeyVersions" + ] + }, + "ListCryptoKeys": { + "methods": [ + "listCryptoKeys" + ] + }, + "ListImportJobs": { + "methods": [ + "listImportJobs" + ] + }, + "ListKeyRings": { + "methods": [ + "listKeyRings" + ] + }, + "ListRetiredResources": { + "methods": [ + "listRetiredResources" + ] + }, + "MacSign": { + "methods": [ + "macSign" + ] + }, + "MacVerify": { + "methods": [ + "macVerify" + ] + }, + "RawDecrypt": { + "methods": [ + "rawDecrypt" + ] + }, + "RawEncrypt": { + "methods": [ + "rawEncrypt" + ] + }, + "RestoreCryptoKeyVersion": { + "methods": [ + "restoreCryptoKeyVersion" + ] + }, + "UpdateCryptoKey": { + "methods": [ + "updateCryptoKey" + ] + }, + "UpdateCryptoKeyPrimaryVersion": { + "methods": [ + "updateCryptoKeyPrimaryVersion" + ] + }, + "UpdateCryptoKeyVersion": { + "methods": [ + "updateCryptoKeyVersion" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/Kms/v1/src/V1/resources/autokey_admin_client_config.json b/owl-bot-staging/Kms/v1/src/V1/resources/autokey_admin_client_config.json new file mode 100644 index 000000000000..b331d4cc45bf --- /dev/null +++ b/owl-bot-staging/Kms/v1/src/V1/resources/autokey_admin_client_config.json @@ -0,0 +1,75 @@ +{ + "interfaces": { + "google.cloud.kms.v1.AutokeyAdmin": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "GetAutokeyConfig": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ShowEffectiveAutokeyConfig": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateAutokeyConfig": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetLocation": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListLocations": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "SetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "TestIamPermissions": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/owl-bot-staging/Kms/v1/src/V1/resources/autokey_admin_descriptor_config.php b/owl-bot-staging/Kms/v1/src/V1/resources/autokey_admin_descriptor_config.php new file mode 100644 index 000000000000..ec6cac155324 --- /dev/null +++ b/owl-bot-staging/Kms/v1/src/V1/resources/autokey_admin_descriptor_config.php @@ -0,0 +1,144 @@ + [ + 'google.cloud.kms.v1.AutokeyAdmin' => [ + 'GetAutokeyConfig' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Kms\V1\AutokeyConfig', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ShowEffectiveAutokeyConfig' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Kms\V1\ShowEffectiveAutokeyConfigResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateAutokeyConfig' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Kms\V1\AutokeyConfig', + 'headerParams' => [ + [ + 'keyName' => 'autokey_config.name', + 'fieldAccessors' => [ + 'getAutokeyConfig', + 'getName', + ], + ], + ], + ], + 'GetLocation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Location\Location', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'GetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'SetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'TestIamPermissions' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'templateMap' => [ + 'autokeyConfig' => 'folders/{folder}/autokeyConfig', + 'folderAutokeyConfig' => 'folders/{folder}/autokeyConfig', + 'project' => 'projects/{project}', + 'projectAutokeyConfig' => 'projects/{project}/autokeyConfig', + ], + ], + ], +]; diff --git a/owl-bot-staging/Kms/v1/src/V1/resources/autokey_admin_rest_client_config.php b/owl-bot-staging/Kms/v1/src/V1/resources/autokey_admin_rest_client_config.php new file mode 100644 index 000000000000..5eb15ff9ef13 --- /dev/null +++ b/owl-bot-staging/Kms/v1/src/V1/resources/autokey_admin_rest_client_config.php @@ -0,0 +1,219 @@ + [ + 'google.cloud.kms.v1.AutokeyAdmin' => [ + 'GetAutokeyConfig' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=folders/*/autokeyConfig}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/autokeyConfig}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ShowEffectiveAutokeyConfig' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*}:showEffectiveAutokeyConfig', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateAutokeyConfig' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{autokey_config.name=folders/*/autokeyConfig}', + 'body' => 'autokey_config', + 'additionalBindings' => [ + [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{autokey_config.name=projects/*/autokeyConfig}', + 'body' => 'autokey_config', + 'queryParams' => [ + 'update_mask', + ], + ], + ], + 'placeholders' => [ + 'autokey_config.name' => [ + 'getters' => [ + 'getAutokeyConfig', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + ], + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.iam.v1.IAMPolicy' => [ + 'GetIamPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*}:getIamPolicy', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/cryptoKeys/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/importJobs/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConfig}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConnections/*}:getIamPolicy', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*}:setIamPolicy', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/cryptoKeys/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/importJobs/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConfig}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConnections/*}:setIamPolicy', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*}:testIamPermissions', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/cryptoKeys/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/importJobs/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConfig}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConnections/*}:testIamPermissions', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Kms/v1/src/V1/resources/autokey_client_config.json b/owl-bot-staging/Kms/v1/src/V1/resources/autokey_client_config.json new file mode 100644 index 000000000000..77a418964d09 --- /dev/null +++ b/owl-bot-staging/Kms/v1/src/V1/resources/autokey_client_config.json @@ -0,0 +1,85 @@ +{ + "interfaces": { + "google.cloud.kms.v1.Autokey": { + "retry_codes": { + "no_retry_codes": [], + "no_retry_1_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "CreateKeyHandle": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetKeyHandle": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListKeyHandles": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetLocation": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListLocations": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "SetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "TestIamPermissions": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/owl-bot-staging/Kms/v1/src/V1/resources/autokey_descriptor_config.php b/owl-bot-staging/Kms/v1/src/V1/resources/autokey_descriptor_config.php new file mode 100644 index 000000000000..a7221d84f4d0 --- /dev/null +++ b/owl-bot-staging/Kms/v1/src/V1/resources/autokey_descriptor_config.php @@ -0,0 +1,157 @@ + [ + 'google.cloud.kms.v1.Autokey' => [ + 'CreateKeyHandle' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Kms\V1\KeyHandle', + 'metadataReturnType' => '\Google\Cloud\Kms\V1\CreateKeyHandleMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'GetKeyHandle' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Kms\V1\KeyHandle', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListKeyHandles' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getKeyHandles', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Kms\V1\ListKeyHandlesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'GetLocation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Location\Location', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'GetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'SetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'TestIamPermissions' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'templateMap' => [ + 'cryptoKey' => 'projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}', + 'keyHandle' => 'projects/{project}/locations/{location}/keyHandles/{key_handle}', + 'location' => 'projects/{project}/locations/{location}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Kms/v1/src/V1/resources/autokey_rest_client_config.php b/owl-bot-staging/Kms/v1/src/V1/resources/autokey_rest_client_config.php new file mode 100644 index 000000000000..fedc6e60b1fc --- /dev/null +++ b/owl-bot-staging/Kms/v1/src/V1/resources/autokey_rest_client_config.php @@ -0,0 +1,199 @@ + [ + 'google.cloud.kms.v1.Autokey' => [ + 'CreateKeyHandle' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/keyHandles', + 'body' => 'key_handle', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'GetKeyHandle' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/keyHandles/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListKeyHandles' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/keyHandles', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.iam.v1.IAMPolicy' => [ + 'GetIamPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*}:getIamPolicy', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/cryptoKeys/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/importJobs/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConfig}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConnections/*}:getIamPolicy', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*}:setIamPolicy', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/cryptoKeys/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/importJobs/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConfig}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConnections/*}:setIamPolicy', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*}:testIamPermissions', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/cryptoKeys/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/importJobs/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConfig}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConnections/*}:testIamPermissions', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Kms/v1/src/V1/resources/ekm_service_client_config.json b/owl-bot-staging/Kms/v1/src/V1/resources/ekm_service_client_config.json new file mode 100644 index 000000000000..8fd9c3e0bf3c --- /dev/null +++ b/owl-bot-staging/Kms/v1/src/V1/resources/ekm_service_client_config.json @@ -0,0 +1,95 @@ +{ + "interfaces": { + "google.cloud.kms.v1.EkmService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "CreateEkmConnection": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetEkmConfig": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetEkmConnection": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListEkmConnections": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateEkmConfig": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateEkmConnection": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "VerifyConnectivity": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetLocation": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListLocations": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "SetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "TestIamPermissions": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/Kms/v1/src/V1/resources/ekm_service_descriptor_config.php b/owl-bot-staging/Kms/v1/src/V1/resources/ekm_service_descriptor_config.php new file mode 100644 index 000000000000..5835d781f32f --- /dev/null +++ b/owl-bot-staging/Kms/v1/src/V1/resources/ekm_service_descriptor_config.php @@ -0,0 +1,201 @@ + [ + 'google.cloud.kms.v1.EkmService' => [ + 'CreateEkmConnection' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Kms\V1\EkmConnection', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'GetEkmConfig' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Kms\V1\EkmConfig', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetEkmConnection' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Kms\V1\EkmConnection', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListEkmConnections' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getEkmConnections', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Kms\V1\ListEkmConnectionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateEkmConfig' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Kms\V1\EkmConfig', + 'headerParams' => [ + [ + 'keyName' => 'ekm_config.name', + 'fieldAccessors' => [ + 'getEkmConfig', + 'getName', + ], + ], + ], + ], + 'UpdateEkmConnection' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Kms\V1\EkmConnection', + 'headerParams' => [ + [ + 'keyName' => 'ekm_connection.name', + 'fieldAccessors' => [ + 'getEkmConnection', + 'getName', + ], + ], + ], + ], + 'VerifyConnectivity' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Kms\V1\VerifyConnectivityResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetLocation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Location\Location', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'GetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'SetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'TestIamPermissions' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'templateMap' => [ + 'ekmConfig' => 'projects/{project}/locations/{location}/ekmConfig', + 'ekmConnection' => 'projects/{project}/locations/{location}/ekmConnections/{ekm_connection}', + 'location' => 'projects/{project}/locations/{location}', + 'service' => 'projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Kms/v1/src/V1/resources/ekm_service_rest_client_config.php b/owl-bot-staging/Kms/v1/src/V1/resources/ekm_service_rest_client_config.php new file mode 100644 index 000000000000..a3bec12d18ce --- /dev/null +++ b/owl-bot-staging/Kms/v1/src/V1/resources/ekm_service_rest_client_config.php @@ -0,0 +1,256 @@ + [ + 'google.cloud.kms.v1.EkmService' => [ + 'CreateEkmConnection' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/ekmConnections', + 'body' => 'ekm_connection', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'ekm_connection_id', + ], + ], + 'GetEkmConfig' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ekmConfig}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetEkmConnection' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ekmConnections/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListEkmConnections' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/ekmConnections', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateEkmConfig' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{ekm_config.name=projects/*/locations/*/ekmConfig}', + 'body' => 'ekm_config', + 'placeholders' => [ + 'ekm_config.name' => [ + 'getters' => [ + 'getEkmConfig', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateEkmConnection' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{ekm_connection.name=projects/*/locations/*/ekmConnections/*}', + 'body' => 'ekm_connection', + 'placeholders' => [ + 'ekm_connection.name' => [ + 'getters' => [ + 'getEkmConnection', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'VerifyConnectivity' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ekmConnections/*}:verifyConnectivity', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.iam.v1.IAMPolicy' => [ + 'GetIamPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*}:getIamPolicy', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/cryptoKeys/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/importJobs/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConfig}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConnections/*}:getIamPolicy', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*}:setIamPolicy', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/cryptoKeys/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/importJobs/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConfig}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConnections/*}:setIamPolicy', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*}:testIamPermissions', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/cryptoKeys/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/importJobs/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConfig}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConnections/*}:testIamPermissions', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Kms/v1/src/V1/resources/hsm_management_client_config.json b/owl-bot-staging/Kms/v1/src/V1/resources/hsm_management_client_config.json new file mode 100644 index 000000000000..806ba3603014 --- /dev/null +++ b/owl-bot-staging/Kms/v1/src/V1/resources/hsm_management_client_config.json @@ -0,0 +1,105 @@ +{ + "interfaces": { + "google.cloud.kms.v1.HsmManagement": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "ApproveSingleTenantHsmInstanceProposal": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "CreateSingleTenantHsmInstance": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "CreateSingleTenantHsmInstanceProposal": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteSingleTenantHsmInstanceProposal": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ExecuteSingleTenantHsmInstanceProposal": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetSingleTenantHsmInstance": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetSingleTenantHsmInstanceProposal": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListSingleTenantHsmInstanceProposals": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListSingleTenantHsmInstances": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetLocation": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListLocations": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "SetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "TestIamPermissions": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/owl-bot-staging/Kms/v1/src/V1/resources/hsm_management_descriptor_config.php b/owl-bot-staging/Kms/v1/src/V1/resources/hsm_management_descriptor_config.php new file mode 100644 index 000000000000..5082664c04aa --- /dev/null +++ b/owl-bot-staging/Kms/v1/src/V1/resources/hsm_management_descriptor_config.php @@ -0,0 +1,251 @@ + [ + 'google.cloud.kms.v1.HsmManagement' => [ + 'CreateSingleTenantHsmInstance' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Kms\V1\SingleTenantHsmInstance', + 'metadataReturnType' => '\Google\Cloud\Kms\V1\CreateSingleTenantHsmInstanceMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateSingleTenantHsmInstanceProposal' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal', + 'metadataReturnType' => '\Google\Cloud\Kms\V1\CreateSingleTenantHsmInstanceProposalMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ExecuteSingleTenantHsmInstanceProposal' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Kms\V1\ExecuteSingleTenantHsmInstanceProposalResponse', + 'metadataReturnType' => '\Google\Cloud\Kms\V1\ExecuteSingleTenantHsmInstanceProposalMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ApproveSingleTenantHsmInstanceProposal' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Kms\V1\ApproveSingleTenantHsmInstanceProposalResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteSingleTenantHsmInstanceProposal' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetSingleTenantHsmInstance' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Kms\V1\SingleTenantHsmInstance', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetSingleTenantHsmInstanceProposal' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListSingleTenantHsmInstanceProposals' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getSingleTenantHsmInstanceProposals', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Kms\V1\ListSingleTenantHsmInstanceProposalsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListSingleTenantHsmInstances' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getSingleTenantHsmInstances', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Kms\V1\ListSingleTenantHsmInstancesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'GetLocation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Location\Location', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'GetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'SetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'TestIamPermissions' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'templateMap' => [ + 'location' => 'projects/{project}/locations/{location}', + 'singleTenantHsmInstance' => 'projects/{project}/locations/{location}/singleTenantHsmInstances/{single_tenant_hsm_instance}', + 'singleTenantHsmInstanceProposal' => 'projects/{project}/locations/{location}/singleTenantHsmInstances/{single_tenant_hsm_instance}/proposals/{proposal}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Kms/v1/src/V1/resources/hsm_management_rest_client_config.php b/owl-bot-staging/Kms/v1/src/V1/resources/hsm_management_rest_client_config.php new file mode 100644 index 000000000000..9bc1e1828a7d --- /dev/null +++ b/owl-bot-staging/Kms/v1/src/V1/resources/hsm_management_rest_client_config.php @@ -0,0 +1,268 @@ + [ + 'google.cloud.kms.v1.HsmManagement' => [ + 'ApproveSingleTenantHsmInstanceProposal' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/singleTenantHsmInstances/*/proposals/*}:approve', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'CreateSingleTenantHsmInstance' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/singleTenantHsmInstances', + 'body' => 'single_tenant_hsm_instance', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateSingleTenantHsmInstanceProposal' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/singleTenantHsmInstances/*}/proposals', + 'body' => 'single_tenant_hsm_instance_proposal', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteSingleTenantHsmInstanceProposal' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/singleTenantHsmInstances/*/proposals/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ExecuteSingleTenantHsmInstanceProposal' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/singleTenantHsmInstances/*/proposals/*}:execute', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetSingleTenantHsmInstance' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/singleTenantHsmInstances/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetSingleTenantHsmInstanceProposal' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/singleTenantHsmInstances/*/proposals/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListSingleTenantHsmInstanceProposals' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/singleTenantHsmInstances/*}/proposals', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListSingleTenantHsmInstances' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/singleTenantHsmInstances', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.iam.v1.IAMPolicy' => [ + 'GetIamPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*}:getIamPolicy', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/cryptoKeys/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/importJobs/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConfig}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConnections/*}:getIamPolicy', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*}:setIamPolicy', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/cryptoKeys/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/importJobs/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConfig}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConnections/*}:setIamPolicy', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*}:testIamPermissions', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/cryptoKeys/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/importJobs/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConfig}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConnections/*}:testIamPermissions', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Kms/v1/src/V1/resources/key_management_service_client_config.json b/owl-bot-staging/Kms/v1/src/V1/resources/key_management_service_client_config.json new file mode 100644 index 000000000000..50f258cec721 --- /dev/null +++ b/owl-bot-staging/Kms/v1/src/V1/resources/key_management_service_client_config.json @@ -0,0 +1,235 @@ +{ + "interfaces": { + "google.cloud.kms.v1.KeyManagementService": { + "retry_codes": { + "no_retry_codes": [], + "no_retry_1_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "AsymmetricDecrypt": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "AsymmetricSign": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "CreateCryptoKey": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "CreateCryptoKeyVersion": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateImportJob": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "CreateKeyRing": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "Decapsulate": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "Decrypt": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteCryptoKey": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteCryptoKeyVersion": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DestroyCryptoKeyVersion": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "Encrypt": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GenerateRandomBytes": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetCryptoKey": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetCryptoKeyVersion": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetImportJob": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetKeyRing": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetPublicKey": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetRetiredResource": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ImportCryptoKeyVersion": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListCryptoKeyVersions": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListCryptoKeys": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListImportJobs": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListKeyRings": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListRetiredResources": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "MacSign": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "MacVerify": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "RawDecrypt": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "RawEncrypt": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "RestoreCryptoKeyVersion": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateCryptoKey": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateCryptoKeyPrimaryVersion": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateCryptoKeyVersion": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetLocation": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListLocations": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "SetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "TestIamPermissions": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/Kms/v1/src/V1/resources/key_management_service_descriptor_config.php b/owl-bot-staging/Kms/v1/src/V1/resources/key_management_service_descriptor_config.php new file mode 100644 index 000000000000..98ac00539531 --- /dev/null +++ b/owl-bot-staging/Kms/v1/src/V1/resources/key_management_service_descriptor_config.php @@ -0,0 +1,561 @@ + [ + 'google.cloud.kms.v1.KeyManagementService' => [ + 'DeleteCryptoKey' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\Kms\V1\DeleteCryptoKeyMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteCryptoKeyVersion' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\Kms\V1\DeleteCryptoKeyVersionMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'AsymmetricDecrypt' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Kms\V1\AsymmetricDecryptResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'AsymmetricSign' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Kms\V1\AsymmetricSignResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'CreateCryptoKey' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Kms\V1\CryptoKey', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateCryptoKeyVersion' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Kms\V1\CryptoKeyVersion', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateImportJob' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Kms\V1\ImportJob', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateKeyRing' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Kms\V1\KeyRing', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'Decapsulate' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Kms\V1\DecapsulateResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'Decrypt' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Kms\V1\DecryptResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DestroyCryptoKeyVersion' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Kms\V1\CryptoKeyVersion', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'Encrypt' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Kms\V1\EncryptResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GenerateRandomBytes' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Kms\V1\GenerateRandomBytesResponse', + 'headerParams' => [ + [ + 'keyName' => 'location', + 'fieldAccessors' => [ + 'getLocation', + ], + ], + ], + ], + 'GetCryptoKey' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Kms\V1\CryptoKey', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetCryptoKeyVersion' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Kms\V1\CryptoKeyVersion', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetImportJob' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Kms\V1\ImportJob', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetKeyRing' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Kms\V1\KeyRing', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetPublicKey' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Kms\V1\PublicKey', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetRetiredResource' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Kms\V1\RetiredResource', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ImportCryptoKeyVersion' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Kms\V1\CryptoKeyVersion', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListCryptoKeyVersions' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getCryptoKeyVersions', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Kms\V1\ListCryptoKeyVersionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListCryptoKeys' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getCryptoKeys', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Kms\V1\ListCryptoKeysResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListImportJobs' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getImportJobs', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Kms\V1\ListImportJobsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListKeyRings' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getKeyRings', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Kms\V1\ListKeyRingsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListRetiredResources' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getRetiredResources', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Kms\V1\ListRetiredResourcesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'MacSign' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Kms\V1\MacSignResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'MacVerify' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Kms\V1\MacVerifyResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'RawDecrypt' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Kms\V1\RawDecryptResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'RawEncrypt' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Kms\V1\RawEncryptResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'RestoreCryptoKeyVersion' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Kms\V1\CryptoKeyVersion', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateCryptoKey' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Kms\V1\CryptoKey', + 'headerParams' => [ + [ + 'keyName' => 'crypto_key.name', + 'fieldAccessors' => [ + 'getCryptoKey', + 'getName', + ], + ], + ], + ], + 'UpdateCryptoKeyPrimaryVersion' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Kms\V1\CryptoKey', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateCryptoKeyVersion' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Kms\V1\CryptoKeyVersion', + 'headerParams' => [ + [ + 'keyName' => 'crypto_key_version.name', + 'fieldAccessors' => [ + 'getCryptoKeyVersion', + 'getName', + ], + ], + ], + ], + 'GetLocation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Location\Location', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'GetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'SetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'TestIamPermissions' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'templateMap' => [ + 'cryptoKey' => 'projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}', + 'cryptoKeyVersion' => 'projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}', + 'importJob' => 'projects/{project}/locations/{location}/keyRings/{key_ring}/importJobs/{import_job}', + 'keyRing' => 'projects/{project}/locations/{location}/keyRings/{key_ring}', + 'location' => 'projects/{project}/locations/{location}', + 'retiredResource' => 'projects/{project}/locations/{location}/retiredResources/{retired_resource}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Kms/v1/src/V1/resources/key_management_service_rest_client_config.php b/owl-bot-staging/Kms/v1/src/V1/resources/key_management_service_rest_client_config.php new file mode 100644 index 000000000000..1172465d9707 --- /dev/null +++ b/owl-bot-staging/Kms/v1/src/V1/resources/key_management_service_rest_client_config.php @@ -0,0 +1,565 @@ + [ + 'google.cloud.kms.v1.KeyManagementService' => [ + 'AsymmetricDecrypt' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}:asymmetricDecrypt', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'AsymmetricSign' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}:asymmetricSign', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'CreateCryptoKey' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/keyRings/*}/cryptoKeys', + 'body' => 'crypto_key', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'crypto_key_id', + ], + ], + 'CreateCryptoKeyVersion' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/keyRings/*/cryptoKeys/*}/cryptoKeyVersions', + 'body' => 'crypto_key_version', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateImportJob' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/keyRings/*}/importJobs', + 'body' => 'import_job', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'import_job_id', + ], + ], + 'CreateKeyRing' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/keyRings', + 'body' => 'key_ring', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'key_ring_id', + ], + ], + 'Decapsulate' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}:decapsulate', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'Decrypt' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*}:decrypt', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteCryptoKey' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteCryptoKeyVersion' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DestroyCryptoKeyVersion' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}:destroy', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'Encrypt' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/**}:encrypt', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GenerateRandomBytes' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{location=projects/*/locations/*}:generateRandomBytes', + 'body' => '*', + 'placeholders' => [ + 'location' => [ + 'getters' => [ + 'getLocation', + ], + ], + ], + ], + 'GetCryptoKey' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetCryptoKeyVersion' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetImportJob' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/keyRings/*/importJobs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetKeyRing' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/keyRings/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetPublicKey' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}/publicKey', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetRetiredResource' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/retiredResources/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ImportCryptoKeyVersion' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/keyRings/*/cryptoKeys/*}/cryptoKeyVersions:import', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListCryptoKeyVersions' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/keyRings/*/cryptoKeys/*}/cryptoKeyVersions', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListCryptoKeys' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/keyRings/*}/cryptoKeys', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListImportJobs' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/keyRings/*}/importJobs', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListKeyRings' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/keyRings', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListRetiredResources' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/retiredResources', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'MacSign' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}:macSign', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'MacVerify' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}:macVerify', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'RawDecrypt' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}:rawDecrypt', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'RawEncrypt' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}:rawEncrypt', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'RestoreCryptoKeyVersion' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}:restore', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'UpdateCryptoKey' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{crypto_key.name=projects/*/locations/*/keyRings/*/cryptoKeys/*}', + 'body' => 'crypto_key', + 'placeholders' => [ + 'crypto_key.name' => [ + 'getters' => [ + 'getCryptoKey', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateCryptoKeyPrimaryVersion' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*}:updatePrimaryVersion', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'UpdateCryptoKeyVersion' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{crypto_key_version.name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}', + 'body' => 'crypto_key_version', + 'placeholders' => [ + 'crypto_key_version.name' => [ + 'getters' => [ + 'getCryptoKeyVersion', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + ], + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.iam.v1.IAMPolicy' => [ + 'GetIamPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*}:getIamPolicy', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/cryptoKeys/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/importJobs/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConfig}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConnections/*}:getIamPolicy', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*}:setIamPolicy', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/cryptoKeys/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/importJobs/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConfig}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConnections/*}:setIamPolicy', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*}:testIamPermissions', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/cryptoKeys/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/importJobs/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConfig}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConnections/*}:testIamPermissions', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Kms/v1/tests/Unit/V1/Client/AutokeyAdminClientTest.php b/owl-bot-staging/Kms/v1/tests/Unit/V1/Client/AutokeyAdminClientTest.php new file mode 100644 index 000000000000..c102ca5b4c03 --- /dev/null +++ b/owl-bot-staging/Kms/v1/tests/Unit/V1/Client/AutokeyAdminClientTest.php @@ -0,0 +1,644 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return AutokeyAdminClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new AutokeyAdminClient($options); + } + + /** @test */ + public function getAutokeyConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $keyProject = 'keyProject721994041'; + $etag = 'etag3123477'; + $expectedResponse = new AutokeyConfig(); + $expectedResponse->setName($name2); + $expectedResponse->setKeyProject($keyProject); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->autokeyConfigName('[FOLDER]'); + $request = (new GetAutokeyConfigRequest()) + ->setName($formattedName); + $response = $gapicClient->getAutokeyConfig($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.AutokeyAdmin/GetAutokeyConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAutokeyConfigExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->autokeyConfigName('[FOLDER]'); + $request = (new GetAutokeyConfigRequest()) + ->setName($formattedName); + try { + $gapicClient->getAutokeyConfig($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function showEffectiveAutokeyConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $keyProject = 'keyProject721994041'; + $expectedResponse = new ShowEffectiveAutokeyConfigResponse(); + $expectedResponse->setKeyProject($keyProject); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $request = (new ShowEffectiveAutokeyConfigRequest()) + ->setParent($formattedParent); + $response = $gapicClient->showEffectiveAutokeyConfig($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.AutokeyAdmin/ShowEffectiveAutokeyConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function showEffectiveAutokeyConfigExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $request = (new ShowEffectiveAutokeyConfigRequest()) + ->setParent($formattedParent); + try { + $gapicClient->showEffectiveAutokeyConfig($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateAutokeyConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $keyProject = 'keyProject721994041'; + $etag = 'etag3123477'; + $expectedResponse = new AutokeyConfig(); + $expectedResponse->setName($name); + $expectedResponse->setKeyProject($keyProject); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $autokeyConfig = new AutokeyConfig(); + $updateMask = new FieldMask(); + $request = (new UpdateAutokeyConfigRequest()) + ->setAutokeyConfig($autokeyConfig) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateAutokeyConfig($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.AutokeyAdmin/UpdateAutokeyConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getAutokeyConfig(); + $this->assertProtobufEquals($autokeyConfig, $actualValue); + $actualValue = $actualRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateAutokeyConfigExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $autokeyConfig = new AutokeyConfig(); + $updateMask = new FieldMask(); + $request = (new UpdateAutokeyConfigRequest()) + ->setAutokeyConfig($autokeyConfig) + ->setUpdateMask($updateMask); + try { + $gapicClient->updateAutokeyConfig($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Location(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + $request = new GetLocationRequest(); + $response = $gapicClient->getLocation($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new GetLocationRequest(); + try { + $gapicClient->getLocation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $request = new ListLocationsRequest(); + $response = $gapicClient->listLocations($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new ListLocationsRequest(); + try { + $gapicClient->listLocations($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + $response = $gapicClient->getIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + try { + $gapicClient->getIamPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + $response = $gapicClient->setIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPolicy(); + $this->assertProtobufEquals($policy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + try { + $gapicClient->setIamPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new TestIamPermissionsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + $response = $gapicClient->testIamPermissions($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPermissions(); + $this->assertProtobufEquals($permissions, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + try { + $gapicClient->testIamPermissions($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAutokeyConfigAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $keyProject = 'keyProject721994041'; + $etag = 'etag3123477'; + $expectedResponse = new AutokeyConfig(); + $expectedResponse->setName($name2); + $expectedResponse->setKeyProject($keyProject); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->autokeyConfigName('[FOLDER]'); + $request = (new GetAutokeyConfigRequest()) + ->setName($formattedName); + $response = $gapicClient->getAutokeyConfigAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.AutokeyAdmin/GetAutokeyConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Kms/v1/tests/Unit/V1/Client/AutokeyClientTest.php b/owl-bot-staging/Kms/v1/tests/Unit/V1/Client/AutokeyClientTest.php new file mode 100644 index 000000000000..9828c533da4b --- /dev/null +++ b/owl-bot-staging/Kms/v1/tests/Unit/V1/Client/AutokeyClientTest.php @@ -0,0 +1,761 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return AutokeyClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new AutokeyClient($options); + } + + /** @test */ + public function createKeyHandleTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createKeyHandleTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $kmsKey = 'kmsKey-591635343'; + $resourceTypeSelector = 'resourceTypeSelector-455377709'; + $expectedResponse = new KeyHandle(); + $expectedResponse->setName($name); + $expectedResponse->setKmsKey($kmsKey); + $expectedResponse->setResourceTypeSelector($resourceTypeSelector); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createKeyHandleTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $keyHandle = new KeyHandle(); + $keyHandleResourceTypeSelector = 'keyHandleResourceTypeSelector-1310560146'; + $keyHandle->setResourceTypeSelector($keyHandleResourceTypeSelector); + $request = (new CreateKeyHandleRequest()) + ->setParent($formattedParent) + ->setKeyHandle($keyHandle); + $response = $gapicClient->createKeyHandle($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.Autokey/CreateKeyHandle', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getKeyHandle(); + $this->assertProtobufEquals($keyHandle, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createKeyHandleTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createKeyHandleExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createKeyHandleTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $keyHandle = new KeyHandle(); + $keyHandleResourceTypeSelector = 'keyHandleResourceTypeSelector-1310560146'; + $keyHandle->setResourceTypeSelector($keyHandleResourceTypeSelector); + $request = (new CreateKeyHandleRequest()) + ->setParent($formattedParent) + ->setKeyHandle($keyHandle); + $response = $gapicClient->createKeyHandle($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createKeyHandleTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getKeyHandleTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $kmsKey = 'kmsKey-591635343'; + $resourceTypeSelector = 'resourceTypeSelector-455377709'; + $expectedResponse = new KeyHandle(); + $expectedResponse->setName($name2); + $expectedResponse->setKmsKey($kmsKey); + $expectedResponse->setResourceTypeSelector($resourceTypeSelector); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->keyHandleName('[PROJECT]', '[LOCATION]', '[KEY_HANDLE]'); + $request = (new GetKeyHandleRequest()) + ->setName($formattedName); + $response = $gapicClient->getKeyHandle($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.Autokey/GetKeyHandle', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getKeyHandleExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->keyHandleName('[PROJECT]', '[LOCATION]', '[KEY_HANDLE]'); + $request = (new GetKeyHandleRequest()) + ->setName($formattedName); + try { + $gapicClient->getKeyHandle($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listKeyHandlesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $keyHandlesElement = new KeyHandle(); + $keyHandles = [ + $keyHandlesElement, + ]; + $expectedResponse = new ListKeyHandlesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setKeyHandles($keyHandles); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListKeyHandlesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listKeyHandles($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getKeyHandles()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.Autokey/ListKeyHandles', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listKeyHandlesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListKeyHandlesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listKeyHandles($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Location(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + $request = new GetLocationRequest(); + $response = $gapicClient->getLocation($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new GetLocationRequest(); + try { + $gapicClient->getLocation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $request = new ListLocationsRequest(); + $response = $gapicClient->listLocations($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new ListLocationsRequest(); + try { + $gapicClient->listLocations($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + $response = $gapicClient->getIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + try { + $gapicClient->getIamPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + $response = $gapicClient->setIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPolicy(); + $this->assertProtobufEquals($policy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + try { + $gapicClient->setIamPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new TestIamPermissionsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + $response = $gapicClient->testIamPermissions($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPermissions(); + $this->assertProtobufEquals($permissions, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + try { + $gapicClient->testIamPermissions($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createKeyHandleAsyncTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createKeyHandleTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $kmsKey = 'kmsKey-591635343'; + $resourceTypeSelector = 'resourceTypeSelector-455377709'; + $expectedResponse = new KeyHandle(); + $expectedResponse->setName($name); + $expectedResponse->setKmsKey($kmsKey); + $expectedResponse->setResourceTypeSelector($resourceTypeSelector); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createKeyHandleTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $keyHandle = new KeyHandle(); + $keyHandleResourceTypeSelector = 'keyHandleResourceTypeSelector-1310560146'; + $keyHandle->setResourceTypeSelector($keyHandleResourceTypeSelector); + $request = (new CreateKeyHandleRequest()) + ->setParent($formattedParent) + ->setKeyHandle($keyHandle); + $response = $gapicClient->createKeyHandleAsync($request)->wait(); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.Autokey/CreateKeyHandle', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getKeyHandle(); + $this->assertProtobufEquals($keyHandle, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createKeyHandleTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} diff --git a/owl-bot-staging/Kms/v1/tests/Unit/V1/Client/EkmServiceClientTest.php b/owl-bot-staging/Kms/v1/tests/Unit/V1/Client/EkmServiceClientTest.php new file mode 100644 index 000000000000..fe3bede918ee --- /dev/null +++ b/owl-bot-staging/Kms/v1/tests/Unit/V1/Client/EkmServiceClientTest.php @@ -0,0 +1,948 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return EkmServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new EkmServiceClient($options); + } + + /** @test */ + public function createEkmConnectionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $etag = 'etag3123477'; + $cryptoSpacePath = 'cryptoSpacePath-1229393412'; + $expectedResponse = new EkmConnection(); + $expectedResponse->setName($name); + $expectedResponse->setEtag($etag); + $expectedResponse->setCryptoSpacePath($cryptoSpacePath); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $ekmConnectionId = 'ekmConnectionId270499940'; + $ekmConnection = new EkmConnection(); + $request = (new CreateEkmConnectionRequest()) + ->setParent($formattedParent) + ->setEkmConnectionId($ekmConnectionId) + ->setEkmConnection($ekmConnection); + $response = $gapicClient->createEkmConnection($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.EkmService/CreateEkmConnection', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getEkmConnectionId(); + $this->assertProtobufEquals($ekmConnectionId, $actualValue); + $actualValue = $actualRequestObject->getEkmConnection(); + $this->assertProtobufEquals($ekmConnection, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createEkmConnectionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $ekmConnectionId = 'ekmConnectionId270499940'; + $ekmConnection = new EkmConnection(); + $request = (new CreateEkmConnectionRequest()) + ->setParent($formattedParent) + ->setEkmConnectionId($ekmConnectionId) + ->setEkmConnection($ekmConnection); + try { + $gapicClient->createEkmConnection($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getEkmConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $defaultEkmConnection = 'defaultEkmConnection1342549844'; + $expectedResponse = new EkmConfig(); + $expectedResponse->setName($name2); + $expectedResponse->setDefaultEkmConnection($defaultEkmConnection); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->ekmConfigName('[PROJECT]', '[LOCATION]'); + $request = (new GetEkmConfigRequest()) + ->setName($formattedName); + $response = $gapicClient->getEkmConfig($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.EkmService/GetEkmConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getEkmConfigExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->ekmConfigName('[PROJECT]', '[LOCATION]'); + $request = (new GetEkmConfigRequest()) + ->setName($formattedName); + try { + $gapicClient->getEkmConfig($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getEkmConnectionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $etag = 'etag3123477'; + $cryptoSpacePath = 'cryptoSpacePath-1229393412'; + $expectedResponse = new EkmConnection(); + $expectedResponse->setName($name2); + $expectedResponse->setEtag($etag); + $expectedResponse->setCryptoSpacePath($cryptoSpacePath); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->ekmConnectionName('[PROJECT]', '[LOCATION]', '[EKM_CONNECTION]'); + $request = (new GetEkmConnectionRequest()) + ->setName($formattedName); + $response = $gapicClient->getEkmConnection($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.EkmService/GetEkmConnection', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getEkmConnectionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->ekmConnectionName('[PROJECT]', '[LOCATION]', '[EKM_CONNECTION]'); + $request = (new GetEkmConnectionRequest()) + ->setName($formattedName); + try { + $gapicClient->getEkmConnection($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listEkmConnectionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $totalSize = 705419236; + $ekmConnectionsElement = new EkmConnection(); + $ekmConnections = [ + $ekmConnectionsElement, + ]; + $expectedResponse = new ListEkmConnectionsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTotalSize($totalSize); + $expectedResponse->setEkmConnections($ekmConnections); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListEkmConnectionsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listEkmConnections($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getEkmConnections()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.EkmService/ListEkmConnections', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listEkmConnectionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListEkmConnectionsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listEkmConnections($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateEkmConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $defaultEkmConnection = 'defaultEkmConnection1342549844'; + $expectedResponse = new EkmConfig(); + $expectedResponse->setName($name); + $expectedResponse->setDefaultEkmConnection($defaultEkmConnection); + $transport->addResponse($expectedResponse); + // Mock request + $ekmConfig = new EkmConfig(); + $updateMask = new FieldMask(); + $request = (new UpdateEkmConfigRequest()) + ->setEkmConfig($ekmConfig) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateEkmConfig($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.EkmService/UpdateEkmConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getEkmConfig(); + $this->assertProtobufEquals($ekmConfig, $actualValue); + $actualValue = $actualRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateEkmConfigExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $ekmConfig = new EkmConfig(); + $updateMask = new FieldMask(); + $request = (new UpdateEkmConfigRequest()) + ->setEkmConfig($ekmConfig) + ->setUpdateMask($updateMask); + try { + $gapicClient->updateEkmConfig($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateEkmConnectionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $etag = 'etag3123477'; + $cryptoSpacePath = 'cryptoSpacePath-1229393412'; + $expectedResponse = new EkmConnection(); + $expectedResponse->setName($name); + $expectedResponse->setEtag($etag); + $expectedResponse->setCryptoSpacePath($cryptoSpacePath); + $transport->addResponse($expectedResponse); + // Mock request + $ekmConnection = new EkmConnection(); + $updateMask = new FieldMask(); + $request = (new UpdateEkmConnectionRequest()) + ->setEkmConnection($ekmConnection) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateEkmConnection($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.EkmService/UpdateEkmConnection', $actualFuncCall); + $actualValue = $actualRequestObject->getEkmConnection(); + $this->assertProtobufEquals($ekmConnection, $actualValue); + $actualValue = $actualRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateEkmConnectionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $ekmConnection = new EkmConnection(); + $updateMask = new FieldMask(); + $request = (new UpdateEkmConnectionRequest()) + ->setEkmConnection($ekmConnection) + ->setUpdateMask($updateMask); + try { + $gapicClient->updateEkmConnection($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function verifyConnectivityTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new VerifyConnectivityResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->ekmConnectionName('[PROJECT]', '[LOCATION]', '[EKM_CONNECTION]'); + $request = (new VerifyConnectivityRequest()) + ->setName($formattedName); + $response = $gapicClient->verifyConnectivity($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.EkmService/VerifyConnectivity', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function verifyConnectivityExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->ekmConnectionName('[PROJECT]', '[LOCATION]', '[EKM_CONNECTION]'); + $request = (new VerifyConnectivityRequest()) + ->setName($formattedName); + try { + $gapicClient->verifyConnectivity($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Location(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + $request = new GetLocationRequest(); + $response = $gapicClient->getLocation($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new GetLocationRequest(); + try { + $gapicClient->getLocation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $request = new ListLocationsRequest(); + $response = $gapicClient->listLocations($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new ListLocationsRequest(); + try { + $gapicClient->listLocations($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + $response = $gapicClient->getIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + try { + $gapicClient->getIamPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + $response = $gapicClient->setIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPolicy(); + $this->assertProtobufEquals($policy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + try { + $gapicClient->setIamPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new TestIamPermissionsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + $response = $gapicClient->testIamPermissions($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPermissions(); + $this->assertProtobufEquals($permissions, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + try { + $gapicClient->testIamPermissions($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createEkmConnectionAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $etag = 'etag3123477'; + $cryptoSpacePath = 'cryptoSpacePath-1229393412'; + $expectedResponse = new EkmConnection(); + $expectedResponse->setName($name); + $expectedResponse->setEtag($etag); + $expectedResponse->setCryptoSpacePath($cryptoSpacePath); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $ekmConnectionId = 'ekmConnectionId270499940'; + $ekmConnection = new EkmConnection(); + $request = (new CreateEkmConnectionRequest()) + ->setParent($formattedParent) + ->setEkmConnectionId($ekmConnectionId) + ->setEkmConnection($ekmConnection); + $response = $gapicClient->createEkmConnectionAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.EkmService/CreateEkmConnection', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getEkmConnectionId(); + $this->assertProtobufEquals($ekmConnectionId, $actualValue); + $actualValue = $actualRequestObject->getEkmConnection(); + $this->assertProtobufEquals($ekmConnection, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Kms/v1/tests/Unit/V1/Client/HsmManagementClientTest.php b/owl-bot-staging/Kms/v1/tests/Unit/V1/Client/HsmManagementClientTest.php new file mode 100644 index 000000000000..93b8e0e98def --- /dev/null +++ b/owl-bot-staging/Kms/v1/tests/Unit/V1/Client/HsmManagementClientTest.php @@ -0,0 +1,1254 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return HsmManagementClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new HsmManagementClient($options); + } + + /** @test */ + public function approveSingleTenantHsmInstanceProposalTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new ApproveSingleTenantHsmInstanceProposalResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->singleTenantHsmInstanceProposalName('[PROJECT]', '[LOCATION]', '[SINGLE_TENANT_HSM_INSTANCE]', '[PROPOSAL]'); + $quorumReply = new QuorumReply(); + $quorumReplyChallengeReplies = []; + $quorumReply->setChallengeReplies($quorumReplyChallengeReplies); + $request = (new ApproveSingleTenantHsmInstanceProposalRequest()) + ->setName($formattedName) + ->setQuorumReply($quorumReply); + $response = $gapicClient->approveSingleTenantHsmInstanceProposal($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.HsmManagement/ApproveSingleTenantHsmInstanceProposal', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getQuorumReply(); + $this->assertProtobufEquals($quorumReply, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function approveSingleTenantHsmInstanceProposalExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->singleTenantHsmInstanceProposalName('[PROJECT]', '[LOCATION]', '[SINGLE_TENANT_HSM_INSTANCE]', '[PROPOSAL]'); + $quorumReply = new QuorumReply(); + $quorumReplyChallengeReplies = []; + $quorumReply->setChallengeReplies($quorumReplyChallengeReplies); + $request = (new ApproveSingleTenantHsmInstanceProposalRequest()) + ->setName($formattedName) + ->setQuorumReply($quorumReply); + try { + $gapicClient->approveSingleTenantHsmInstanceProposal($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createSingleTenantHsmInstanceTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createSingleTenantHsmInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $expectedResponse = new SingleTenantHsmInstance(); + $expectedResponse->setName($name); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createSingleTenantHsmInstanceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $singleTenantHsmInstance = new SingleTenantHsmInstance(); + $singleTenantHsmInstanceQuorumAuth = new QuorumAuth(); + $quorumAuthTotalApproverCount = 152512237; + $singleTenantHsmInstanceQuorumAuth->setTotalApproverCount($quorumAuthTotalApproverCount); + $singleTenantHsmInstance->setQuorumAuth($singleTenantHsmInstanceQuorumAuth); + $request = (new CreateSingleTenantHsmInstanceRequest()) + ->setParent($formattedParent) + ->setSingleTenantHsmInstance($singleTenantHsmInstance); + $response = $gapicClient->createSingleTenantHsmInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.HsmManagement/CreateSingleTenantHsmInstance', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getSingleTenantHsmInstance(); + $this->assertProtobufEquals($singleTenantHsmInstance, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createSingleTenantHsmInstanceTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createSingleTenantHsmInstanceExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createSingleTenantHsmInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $singleTenantHsmInstance = new SingleTenantHsmInstance(); + $singleTenantHsmInstanceQuorumAuth = new QuorumAuth(); + $quorumAuthTotalApproverCount = 152512237; + $singleTenantHsmInstanceQuorumAuth->setTotalApproverCount($quorumAuthTotalApproverCount); + $singleTenantHsmInstance->setQuorumAuth($singleTenantHsmInstanceQuorumAuth); + $request = (new CreateSingleTenantHsmInstanceRequest()) + ->setParent($formattedParent) + ->setSingleTenantHsmInstance($singleTenantHsmInstance); + $response = $gapicClient->createSingleTenantHsmInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createSingleTenantHsmInstanceTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createSingleTenantHsmInstanceProposalTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createSingleTenantHsmInstanceProposalTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $failureReason = 'failureReason1743941273'; + $expectedResponse = new SingleTenantHsmInstanceProposal(); + $expectedResponse->setName($name); + $expectedResponse->setFailureReason($failureReason); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createSingleTenantHsmInstanceProposalTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->singleTenantHsmInstanceName('[PROJECT]', '[LOCATION]', '[SINGLE_TENANT_HSM_INSTANCE]'); + $singleTenantHsmInstanceProposal = new SingleTenantHsmInstanceProposal(); + $request = (new CreateSingleTenantHsmInstanceProposalRequest()) + ->setParent($formattedParent) + ->setSingleTenantHsmInstanceProposal($singleTenantHsmInstanceProposal); + $response = $gapicClient->createSingleTenantHsmInstanceProposal($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.HsmManagement/CreateSingleTenantHsmInstanceProposal', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getSingleTenantHsmInstanceProposal(); + $this->assertProtobufEquals($singleTenantHsmInstanceProposal, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createSingleTenantHsmInstanceProposalTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createSingleTenantHsmInstanceProposalExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createSingleTenantHsmInstanceProposalTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->singleTenantHsmInstanceName('[PROJECT]', '[LOCATION]', '[SINGLE_TENANT_HSM_INSTANCE]'); + $singleTenantHsmInstanceProposal = new SingleTenantHsmInstanceProposal(); + $request = (new CreateSingleTenantHsmInstanceProposalRequest()) + ->setParent($formattedParent) + ->setSingleTenantHsmInstanceProposal($singleTenantHsmInstanceProposal); + $response = $gapicClient->createSingleTenantHsmInstanceProposal($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createSingleTenantHsmInstanceProposalTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteSingleTenantHsmInstanceProposalTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->singleTenantHsmInstanceProposalName('[PROJECT]', '[LOCATION]', '[SINGLE_TENANT_HSM_INSTANCE]', '[PROPOSAL]'); + $request = (new DeleteSingleTenantHsmInstanceProposalRequest()) + ->setName($formattedName); + $gapicClient->deleteSingleTenantHsmInstanceProposal($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.HsmManagement/DeleteSingleTenantHsmInstanceProposal', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteSingleTenantHsmInstanceProposalExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->singleTenantHsmInstanceProposalName('[PROJECT]', '[LOCATION]', '[SINGLE_TENANT_HSM_INSTANCE]', '[PROPOSAL]'); + $request = (new DeleteSingleTenantHsmInstanceProposalRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteSingleTenantHsmInstanceProposal($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function executeSingleTenantHsmInstanceProposalTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/executeSingleTenantHsmInstanceProposalTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new ExecuteSingleTenantHsmInstanceProposalResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/executeSingleTenantHsmInstanceProposalTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->singleTenantHsmInstanceProposalName('[PROJECT]', '[LOCATION]', '[SINGLE_TENANT_HSM_INSTANCE]', '[PROPOSAL]'); + $request = (new ExecuteSingleTenantHsmInstanceProposalRequest()) + ->setName($formattedName); + $response = $gapicClient->executeSingleTenantHsmInstanceProposal($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.HsmManagement/ExecuteSingleTenantHsmInstanceProposal', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/executeSingleTenantHsmInstanceProposalTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function executeSingleTenantHsmInstanceProposalExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/executeSingleTenantHsmInstanceProposalTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->singleTenantHsmInstanceProposalName('[PROJECT]', '[LOCATION]', '[SINGLE_TENANT_HSM_INSTANCE]', '[PROPOSAL]'); + $request = (new ExecuteSingleTenantHsmInstanceProposalRequest()) + ->setName($formattedName); + $response = $gapicClient->executeSingleTenantHsmInstanceProposal($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/executeSingleTenantHsmInstanceProposalTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getSingleTenantHsmInstanceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new SingleTenantHsmInstance(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->singleTenantHsmInstanceName('[PROJECT]', '[LOCATION]', '[SINGLE_TENANT_HSM_INSTANCE]'); + $request = (new GetSingleTenantHsmInstanceRequest()) + ->setName($formattedName); + $response = $gapicClient->getSingleTenantHsmInstance($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.HsmManagement/GetSingleTenantHsmInstance', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSingleTenantHsmInstanceExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->singleTenantHsmInstanceName('[PROJECT]', '[LOCATION]', '[SINGLE_TENANT_HSM_INSTANCE]'); + $request = (new GetSingleTenantHsmInstanceRequest()) + ->setName($formattedName); + try { + $gapicClient->getSingleTenantHsmInstance($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSingleTenantHsmInstanceProposalTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $failureReason = 'failureReason1743941273'; + $expectedResponse = new SingleTenantHsmInstanceProposal(); + $expectedResponse->setName($name2); + $expectedResponse->setFailureReason($failureReason); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->singleTenantHsmInstanceProposalName('[PROJECT]', '[LOCATION]', '[SINGLE_TENANT_HSM_INSTANCE]', '[PROPOSAL]'); + $request = (new GetSingleTenantHsmInstanceProposalRequest()) + ->setName($formattedName); + $response = $gapicClient->getSingleTenantHsmInstanceProposal($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.HsmManagement/GetSingleTenantHsmInstanceProposal', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSingleTenantHsmInstanceProposalExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->singleTenantHsmInstanceProposalName('[PROJECT]', '[LOCATION]', '[SINGLE_TENANT_HSM_INSTANCE]', '[PROPOSAL]'); + $request = (new GetSingleTenantHsmInstanceProposalRequest()) + ->setName($formattedName); + try { + $gapicClient->getSingleTenantHsmInstanceProposal($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSingleTenantHsmInstanceProposalsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $totalSize = 705419236; + $singleTenantHsmInstanceProposalsElement = new SingleTenantHsmInstanceProposal(); + $singleTenantHsmInstanceProposals = [ + $singleTenantHsmInstanceProposalsElement, + ]; + $expectedResponse = new ListSingleTenantHsmInstanceProposalsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTotalSize($totalSize); + $expectedResponse->setSingleTenantHsmInstanceProposals($singleTenantHsmInstanceProposals); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->singleTenantHsmInstanceName('[PROJECT]', '[LOCATION]', '[SINGLE_TENANT_HSM_INSTANCE]'); + $request = (new ListSingleTenantHsmInstanceProposalsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listSingleTenantHsmInstanceProposals($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getSingleTenantHsmInstanceProposals()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.HsmManagement/ListSingleTenantHsmInstanceProposals', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSingleTenantHsmInstanceProposalsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->singleTenantHsmInstanceName('[PROJECT]', '[LOCATION]', '[SINGLE_TENANT_HSM_INSTANCE]'); + $request = (new ListSingleTenantHsmInstanceProposalsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listSingleTenantHsmInstanceProposals($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSingleTenantHsmInstancesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $totalSize = 705419236; + $singleTenantHsmInstancesElement = new SingleTenantHsmInstance(); + $singleTenantHsmInstances = [ + $singleTenantHsmInstancesElement, + ]; + $expectedResponse = new ListSingleTenantHsmInstancesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTotalSize($totalSize); + $expectedResponse->setSingleTenantHsmInstances($singleTenantHsmInstances); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListSingleTenantHsmInstancesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listSingleTenantHsmInstances($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getSingleTenantHsmInstances()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.HsmManagement/ListSingleTenantHsmInstances', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSingleTenantHsmInstancesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListSingleTenantHsmInstancesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listSingleTenantHsmInstances($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Location(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + $request = new GetLocationRequest(); + $response = $gapicClient->getLocation($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new GetLocationRequest(); + try { + $gapicClient->getLocation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $request = new ListLocationsRequest(); + $response = $gapicClient->listLocations($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new ListLocationsRequest(); + try { + $gapicClient->listLocations($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + $response = $gapicClient->getIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + try { + $gapicClient->getIamPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + $response = $gapicClient->setIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPolicy(); + $this->assertProtobufEquals($policy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + try { + $gapicClient->setIamPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new TestIamPermissionsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + $response = $gapicClient->testIamPermissions($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPermissions(); + $this->assertProtobufEquals($permissions, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + try { + $gapicClient->testIamPermissions($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function approveSingleTenantHsmInstanceProposalAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new ApproveSingleTenantHsmInstanceProposalResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->singleTenantHsmInstanceProposalName('[PROJECT]', '[LOCATION]', '[SINGLE_TENANT_HSM_INSTANCE]', '[PROPOSAL]'); + $quorumReply = new QuorumReply(); + $quorumReplyChallengeReplies = []; + $quorumReply->setChallengeReplies($quorumReplyChallengeReplies); + $request = (new ApproveSingleTenantHsmInstanceProposalRequest()) + ->setName($formattedName) + ->setQuorumReply($quorumReply); + $response = $gapicClient->approveSingleTenantHsmInstanceProposalAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.HsmManagement/ApproveSingleTenantHsmInstanceProposal', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getQuorumReply(); + $this->assertProtobufEquals($quorumReply, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Kms/v1/tests/Unit/V1/Client/KeyManagementServiceClientTest.php b/owl-bot-staging/Kms/v1/tests/Unit/V1/Client/KeyManagementServiceClientTest.php new file mode 100644 index 000000000000..bb1c652777b8 --- /dev/null +++ b/owl-bot-staging/Kms/v1/tests/Unit/V1/Client/KeyManagementServiceClientTest.php @@ -0,0 +1,3050 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return KeyManagementServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new KeyManagementServiceClient($options); + } + + /** @test */ + public function asymmetricDecryptTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $plaintext = '-9'; + $verifiedCiphertextCrc32c = true; + $expectedResponse = new AsymmetricDecryptResponse(); + $expectedResponse->setPlaintext($plaintext); + $expectedResponse->setVerifiedCiphertextCrc32c($verifiedCiphertextCrc32c); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); + $ciphertext = '-72'; + $request = (new AsymmetricDecryptRequest()) + ->setName($formattedName) + ->setCiphertext($ciphertext); + $response = $gapicClient->asymmetricDecrypt($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.KeyManagementService/AsymmetricDecrypt', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getCiphertext(); + $this->assertProtobufEquals($ciphertext, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function asymmetricDecryptExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); + $ciphertext = '-72'; + $request = (new AsymmetricDecryptRequest()) + ->setName($formattedName) + ->setCiphertext($ciphertext); + try { + $gapicClient->asymmetricDecrypt($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function asymmetricSignTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $signature = '-72'; + $verifiedDigestCrc32c = true; + $name2 = 'name2-1052831874'; + $verifiedDataCrc32c = true; + $expectedResponse = new AsymmetricSignResponse(); + $expectedResponse->setSignature($signature); + $expectedResponse->setVerifiedDigestCrc32c($verifiedDigestCrc32c); + $expectedResponse->setName($name2); + $expectedResponse->setVerifiedDataCrc32c($verifiedDataCrc32c); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); + $digest = new Digest(); + $request = (new AsymmetricSignRequest()) + ->setName($formattedName) + ->setDigest($digest); + $response = $gapicClient->asymmetricSign($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.KeyManagementService/AsymmetricSign', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getDigest(); + $this->assertProtobufEquals($digest, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function asymmetricSignExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); + $digest = new Digest(); + $request = (new AsymmetricSignRequest()) + ->setName($formattedName) + ->setDigest($digest); + try { + $gapicClient->asymmetricSign($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createCryptoKeyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $importOnly = true; + $cryptoKeyBackend = 'cryptoKeyBackend-1526615498'; + $expectedResponse = new CryptoKey(); + $expectedResponse->setName($name); + $expectedResponse->setImportOnly($importOnly); + $expectedResponse->setCryptoKeyBackend($cryptoKeyBackend); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->keyRingName('[PROJECT]', '[LOCATION]', '[KEY_RING]'); + $cryptoKeyId = 'cryptoKeyId-2123094983'; + $cryptoKey = new CryptoKey(); + $request = (new CreateCryptoKeyRequest()) + ->setParent($formattedParent) + ->setCryptoKeyId($cryptoKeyId) + ->setCryptoKey($cryptoKey); + $response = $gapicClient->createCryptoKey($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.KeyManagementService/CreateCryptoKey', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getCryptoKeyId(); + $this->assertProtobufEquals($cryptoKeyId, $actualValue); + $actualValue = $actualRequestObject->getCryptoKey(); + $this->assertProtobufEquals($cryptoKey, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createCryptoKeyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->keyRingName('[PROJECT]', '[LOCATION]', '[KEY_RING]'); + $cryptoKeyId = 'cryptoKeyId-2123094983'; + $cryptoKey = new CryptoKey(); + $request = (new CreateCryptoKeyRequest()) + ->setParent($formattedParent) + ->setCryptoKeyId($cryptoKeyId) + ->setCryptoKey($cryptoKey); + try { + $gapicClient->createCryptoKey($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createCryptoKeyVersionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $importJob = 'importJob2125587491'; + $importFailureReason = 'importFailureReason-494073229'; + $generationFailureReason = 'generationFailureReason1749803168'; + $externalDestructionFailureReason = 'externalDestructionFailureReason-2122384710'; + $reimportEligible = true; + $expectedResponse = new CryptoKeyVersion(); + $expectedResponse->setName($name); + $expectedResponse->setImportJob($importJob); + $expectedResponse->setImportFailureReason($importFailureReason); + $expectedResponse->setGenerationFailureReason($generationFailureReason); + $expectedResponse->setExternalDestructionFailureReason($externalDestructionFailureReason); + $expectedResponse->setReimportEligible($reimportEligible); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->cryptoKeyName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]'); + $cryptoKeyVersion = new CryptoKeyVersion(); + $request = (new CreateCryptoKeyVersionRequest()) + ->setParent($formattedParent) + ->setCryptoKeyVersion($cryptoKeyVersion); + $response = $gapicClient->createCryptoKeyVersion($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.KeyManagementService/CreateCryptoKeyVersion', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getCryptoKeyVersion(); + $this->assertProtobufEquals($cryptoKeyVersion, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createCryptoKeyVersionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->cryptoKeyName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]'); + $cryptoKeyVersion = new CryptoKeyVersion(); + $request = (new CreateCryptoKeyVersionRequest()) + ->setParent($formattedParent) + ->setCryptoKeyVersion($cryptoKeyVersion); + try { + $gapicClient->createCryptoKeyVersion($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createImportJobTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $cryptoKeyBackend = 'cryptoKeyBackend-1526615498'; + $expectedResponse = new ImportJob(); + $expectedResponse->setName($name); + $expectedResponse->setCryptoKeyBackend($cryptoKeyBackend); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->keyRingName('[PROJECT]', '[LOCATION]', '[KEY_RING]'); + $importJobId = 'importJobId-1620773193'; + $importJob = new ImportJob(); + $importJobImportMethod = ImportMethod::IMPORT_METHOD_UNSPECIFIED; + $importJob->setImportMethod($importJobImportMethod); + $importJobProtectionLevel = ProtectionLevel::PROTECTION_LEVEL_UNSPECIFIED; + $importJob->setProtectionLevel($importJobProtectionLevel); + $request = (new CreateImportJobRequest()) + ->setParent($formattedParent) + ->setImportJobId($importJobId) + ->setImportJob($importJob); + $response = $gapicClient->createImportJob($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.KeyManagementService/CreateImportJob', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getImportJobId(); + $this->assertProtobufEquals($importJobId, $actualValue); + $actualValue = $actualRequestObject->getImportJob(); + $this->assertProtobufEquals($importJob, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createImportJobExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->keyRingName('[PROJECT]', '[LOCATION]', '[KEY_RING]'); + $importJobId = 'importJobId-1620773193'; + $importJob = new ImportJob(); + $importJobImportMethod = ImportMethod::IMPORT_METHOD_UNSPECIFIED; + $importJob->setImportMethod($importJobImportMethod); + $importJobProtectionLevel = ProtectionLevel::PROTECTION_LEVEL_UNSPECIFIED; + $importJob->setProtectionLevel($importJobProtectionLevel); + $request = (new CreateImportJobRequest()) + ->setParent($formattedParent) + ->setImportJobId($importJobId) + ->setImportJob($importJob); + try { + $gapicClient->createImportJob($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createKeyRingTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $expectedResponse = new KeyRing(); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $keyRingId = 'keyRingId-2056646742'; + $keyRing = new KeyRing(); + $request = (new CreateKeyRingRequest()) + ->setParent($formattedParent) + ->setKeyRingId($keyRingId) + ->setKeyRing($keyRing); + $response = $gapicClient->createKeyRing($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.KeyManagementService/CreateKeyRing', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getKeyRingId(); + $this->assertProtobufEquals($keyRingId, $actualValue); + $actualValue = $actualRequestObject->getKeyRing(); + $this->assertProtobufEquals($keyRing, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createKeyRingExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $keyRingId = 'keyRingId-2056646742'; + $keyRing = new KeyRing(); + $request = (new CreateKeyRingRequest()) + ->setParent($formattedParent) + ->setKeyRingId($keyRingId) + ->setKeyRing($keyRing); + try { + $gapicClient->createKeyRing($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function decapsulateTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $sharedSecret = '-54'; + $sharedSecretCrc32c = 1482306981; + $verifiedCiphertextCrc32c = true; + $expectedResponse = new DecapsulateResponse(); + $expectedResponse->setName($name2); + $expectedResponse->setSharedSecret($sharedSecret); + $expectedResponse->setSharedSecretCrc32c($sharedSecretCrc32c); + $expectedResponse->setVerifiedCiphertextCrc32c($verifiedCiphertextCrc32c); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); + $ciphertext = '-72'; + $request = (new DecapsulateRequest()) + ->setName($formattedName) + ->setCiphertext($ciphertext); + $response = $gapicClient->decapsulate($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.KeyManagementService/Decapsulate', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getCiphertext(); + $this->assertProtobufEquals($ciphertext, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function decapsulateExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); + $ciphertext = '-72'; + $request = (new DecapsulateRequest()) + ->setName($formattedName) + ->setCiphertext($ciphertext); + try { + $gapicClient->decapsulate($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function decryptTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $plaintext = '-9'; + $usedPrimary = true; + $expectedResponse = new DecryptResponse(); + $expectedResponse->setPlaintext($plaintext); + $expectedResponse->setUsedPrimary($usedPrimary); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->cryptoKeyName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]'); + $ciphertext = '-72'; + $request = (new DecryptRequest()) + ->setName($formattedName) + ->setCiphertext($ciphertext); + $response = $gapicClient->decrypt($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.KeyManagementService/Decrypt', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getCiphertext(); + $this->assertProtobufEquals($ciphertext, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function decryptExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->cryptoKeyName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]'); + $ciphertext = '-72'; + $request = (new DecryptRequest()) + ->setName($formattedName) + ->setCiphertext($ciphertext); + try { + $gapicClient->decrypt($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteCryptoKeyTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteCryptoKeyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteCryptoKeyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->cryptoKeyName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]'); + $request = (new DeleteCryptoKeyRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteCryptoKey($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.KeyManagementService/DeleteCryptoKey', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteCryptoKeyTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteCryptoKeyExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteCryptoKeyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->cryptoKeyName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]'); + $request = (new DeleteCryptoKeyRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteCryptoKey($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteCryptoKeyTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteCryptoKeyVersionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteCryptoKeyVersionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteCryptoKeyVersionTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); + $request = (new DeleteCryptoKeyVersionRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteCryptoKeyVersion($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.KeyManagementService/DeleteCryptoKeyVersion', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteCryptoKeyVersionTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteCryptoKeyVersionExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteCryptoKeyVersionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); + $request = (new DeleteCryptoKeyVersionRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteCryptoKeyVersion($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteCryptoKeyVersionTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function destroyCryptoKeyVersionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $importJob = 'importJob2125587491'; + $importFailureReason = 'importFailureReason-494073229'; + $generationFailureReason = 'generationFailureReason1749803168'; + $externalDestructionFailureReason = 'externalDestructionFailureReason-2122384710'; + $reimportEligible = true; + $expectedResponse = new CryptoKeyVersion(); + $expectedResponse->setName($name2); + $expectedResponse->setImportJob($importJob); + $expectedResponse->setImportFailureReason($importFailureReason); + $expectedResponse->setGenerationFailureReason($generationFailureReason); + $expectedResponse->setExternalDestructionFailureReason($externalDestructionFailureReason); + $expectedResponse->setReimportEligible($reimportEligible); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); + $request = (new DestroyCryptoKeyVersionRequest()) + ->setName($formattedName); + $response = $gapicClient->destroyCryptoKeyVersion($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.KeyManagementService/DestroyCryptoKeyVersion', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function destroyCryptoKeyVersionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); + $request = (new DestroyCryptoKeyVersionRequest()) + ->setName($formattedName); + try { + $gapicClient->destroyCryptoKeyVersion($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function encryptTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $ciphertext = '-72'; + $verifiedPlaintextCrc32c = false; + $verifiedAdditionalAuthenticatedDataCrc32c = true; + $expectedResponse = new EncryptResponse(); + $expectedResponse->setName($name2); + $expectedResponse->setCiphertext($ciphertext); + $expectedResponse->setVerifiedPlaintextCrc32c($verifiedPlaintextCrc32c); + $expectedResponse->setVerifiedAdditionalAuthenticatedDataCrc32c($verifiedAdditionalAuthenticatedDataCrc32c); + $transport->addResponse($expectedResponse); + // Mock request + $name = 'name3373707'; + $plaintext = '-9'; + $request = (new EncryptRequest()) + ->setName($name) + ->setPlaintext($plaintext); + $response = $gapicClient->encrypt($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.KeyManagementService/Encrypt', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $actualValue = $actualRequestObject->getPlaintext(); + $this->assertProtobufEquals($plaintext, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function encryptExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $name = 'name3373707'; + $plaintext = '-9'; + $request = (new EncryptRequest()) + ->setName($name) + ->setPlaintext($plaintext); + try { + $gapicClient->encrypt($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function generateRandomBytesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $data = '-86'; + $expectedResponse = new GenerateRandomBytesResponse(); + $expectedResponse->setData($data); + $transport->addResponse($expectedResponse); + $request = new GenerateRandomBytesRequest(); + $response = $gapicClient->generateRandomBytes($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.KeyManagementService/GenerateRandomBytes', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function generateRandomBytesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new GenerateRandomBytesRequest(); + try { + $gapicClient->generateRandomBytes($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getCryptoKeyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $importOnly = true; + $cryptoKeyBackend = 'cryptoKeyBackend-1526615498'; + $expectedResponse = new CryptoKey(); + $expectedResponse->setName($name2); + $expectedResponse->setImportOnly($importOnly); + $expectedResponse->setCryptoKeyBackend($cryptoKeyBackend); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->cryptoKeyName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]'); + $request = (new GetCryptoKeyRequest()) + ->setName($formattedName); + $response = $gapicClient->getCryptoKey($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.KeyManagementService/GetCryptoKey', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getCryptoKeyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->cryptoKeyName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]'); + $request = (new GetCryptoKeyRequest()) + ->setName($formattedName); + try { + $gapicClient->getCryptoKey($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getCryptoKeyVersionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $importJob = 'importJob2125587491'; + $importFailureReason = 'importFailureReason-494073229'; + $generationFailureReason = 'generationFailureReason1749803168'; + $externalDestructionFailureReason = 'externalDestructionFailureReason-2122384710'; + $reimportEligible = true; + $expectedResponse = new CryptoKeyVersion(); + $expectedResponse->setName($name2); + $expectedResponse->setImportJob($importJob); + $expectedResponse->setImportFailureReason($importFailureReason); + $expectedResponse->setGenerationFailureReason($generationFailureReason); + $expectedResponse->setExternalDestructionFailureReason($externalDestructionFailureReason); + $expectedResponse->setReimportEligible($reimportEligible); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); + $request = (new GetCryptoKeyVersionRequest()) + ->setName($formattedName); + $response = $gapicClient->getCryptoKeyVersion($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.KeyManagementService/GetCryptoKeyVersion', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getCryptoKeyVersionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); + $request = (new GetCryptoKeyVersionRequest()) + ->setName($formattedName); + try { + $gapicClient->getCryptoKeyVersion($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getImportJobTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $cryptoKeyBackend = 'cryptoKeyBackend-1526615498'; + $expectedResponse = new ImportJob(); + $expectedResponse->setName($name2); + $expectedResponse->setCryptoKeyBackend($cryptoKeyBackend); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->importJobName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[IMPORT_JOB]'); + $request = (new GetImportJobRequest()) + ->setName($formattedName); + $response = $gapicClient->getImportJob($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.KeyManagementService/GetImportJob', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getImportJobExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->importJobName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[IMPORT_JOB]'); + $request = (new GetImportJobRequest()) + ->setName($formattedName); + try { + $gapicClient->getImportJob($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getKeyRingTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new KeyRing(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->keyRingName('[PROJECT]', '[LOCATION]', '[KEY_RING]'); + $request = (new GetKeyRingRequest()) + ->setName($formattedName); + $response = $gapicClient->getKeyRing($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.KeyManagementService/GetKeyRing', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getKeyRingExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->keyRingName('[PROJECT]', '[LOCATION]', '[KEY_RING]'); + $request = (new GetKeyRingRequest()) + ->setName($formattedName); + try { + $gapicClient->getKeyRing($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getPublicKeyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $pem = 'pem110872'; + $name2 = 'name2-1052831874'; + $expectedResponse = new PublicKey(); + $expectedResponse->setPem($pem); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); + $request = (new GetPublicKeyRequest()) + ->setName($formattedName); + $response = $gapicClient->getPublicKey($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.KeyManagementService/GetPublicKey', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getPublicKeyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); + $request = (new GetPublicKeyRequest()) + ->setName($formattedName); + try { + $gapicClient->getPublicKey($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getRetiredResourceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $originalResource = 'originalResource-1264720196'; + $resourceType = 'resourceType979623115'; + $expectedResponse = new RetiredResource(); + $expectedResponse->setName($name2); + $expectedResponse->setOriginalResource($originalResource); + $expectedResponse->setResourceType($resourceType); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->retiredResourceName('[PROJECT]', '[LOCATION]', '[RETIRED_RESOURCE]'); + $request = (new GetRetiredResourceRequest()) + ->setName($formattedName); + $response = $gapicClient->getRetiredResource($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.KeyManagementService/GetRetiredResource', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getRetiredResourceExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->retiredResourceName('[PROJECT]', '[LOCATION]', '[RETIRED_RESOURCE]'); + $request = (new GetRetiredResourceRequest()) + ->setName($formattedName); + try { + $gapicClient->getRetiredResource($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function importCryptoKeyVersionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $importJob2 = 'importJob2-1714851050'; + $importFailureReason = 'importFailureReason-494073229'; + $generationFailureReason = 'generationFailureReason1749803168'; + $externalDestructionFailureReason = 'externalDestructionFailureReason-2122384710'; + $reimportEligible = true; + $expectedResponse = new CryptoKeyVersion(); + $expectedResponse->setName($name); + $expectedResponse->setImportJob($importJob2); + $expectedResponse->setImportFailureReason($importFailureReason); + $expectedResponse->setGenerationFailureReason($generationFailureReason); + $expectedResponse->setExternalDestructionFailureReason($externalDestructionFailureReason); + $expectedResponse->setReimportEligible($reimportEligible); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->cryptoKeyName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]'); + $algorithm = CryptoKeyVersionAlgorithm::CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED; + $importJob = 'importJob2125587491'; + $request = (new ImportCryptoKeyVersionRequest()) + ->setParent($formattedParent) + ->setAlgorithm($algorithm) + ->setImportJob($importJob); + $response = $gapicClient->importCryptoKeyVersion($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.KeyManagementService/ImportCryptoKeyVersion', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getAlgorithm(); + $this->assertProtobufEquals($algorithm, $actualValue); + $actualValue = $actualRequestObject->getImportJob(); + $this->assertProtobufEquals($importJob, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function importCryptoKeyVersionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->cryptoKeyName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]'); + $algorithm = CryptoKeyVersionAlgorithm::CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED; + $importJob = 'importJob2125587491'; + $request = (new ImportCryptoKeyVersionRequest()) + ->setParent($formattedParent) + ->setAlgorithm($algorithm) + ->setImportJob($importJob); + try { + $gapicClient->importCryptoKeyVersion($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listCryptoKeyVersionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $totalSize = 705419236; + $cryptoKeyVersionsElement = new CryptoKeyVersion(); + $cryptoKeyVersions = [ + $cryptoKeyVersionsElement, + ]; + $expectedResponse = new ListCryptoKeyVersionsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTotalSize($totalSize); + $expectedResponse->setCryptoKeyVersions($cryptoKeyVersions); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->cryptoKeyName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]'); + $request = (new ListCryptoKeyVersionsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listCryptoKeyVersions($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getCryptoKeyVersions()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.KeyManagementService/ListCryptoKeyVersions', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listCryptoKeyVersionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->cryptoKeyName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]'); + $request = (new ListCryptoKeyVersionsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listCryptoKeyVersions($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listCryptoKeysTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $totalSize = 705419236; + $cryptoKeysElement = new CryptoKey(); + $cryptoKeys = [ + $cryptoKeysElement, + ]; + $expectedResponse = new ListCryptoKeysResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTotalSize($totalSize); + $expectedResponse->setCryptoKeys($cryptoKeys); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->keyRingName('[PROJECT]', '[LOCATION]', '[KEY_RING]'); + $request = (new ListCryptoKeysRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listCryptoKeys($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getCryptoKeys()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.KeyManagementService/ListCryptoKeys', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listCryptoKeysExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->keyRingName('[PROJECT]', '[LOCATION]', '[KEY_RING]'); + $request = (new ListCryptoKeysRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listCryptoKeys($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listImportJobsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $totalSize = 705419236; + $importJobsElement = new ImportJob(); + $importJobs = [ + $importJobsElement, + ]; + $expectedResponse = new ListImportJobsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTotalSize($totalSize); + $expectedResponse->setImportJobs($importJobs); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->keyRingName('[PROJECT]', '[LOCATION]', '[KEY_RING]'); + $request = (new ListImportJobsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listImportJobs($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getImportJobs()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.KeyManagementService/ListImportJobs', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listImportJobsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->keyRingName('[PROJECT]', '[LOCATION]', '[KEY_RING]'); + $request = (new ListImportJobsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listImportJobs($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listKeyRingsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $totalSize = 705419236; + $keyRingsElement = new KeyRing(); + $keyRings = [ + $keyRingsElement, + ]; + $expectedResponse = new ListKeyRingsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTotalSize($totalSize); + $expectedResponse->setKeyRings($keyRings); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListKeyRingsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listKeyRings($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getKeyRings()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.KeyManagementService/ListKeyRings', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listKeyRingsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListKeyRingsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listKeyRings($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listRetiredResourcesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $totalSize = 705419236; + $retiredResourcesElement = new RetiredResource(); + $retiredResources = [ + $retiredResourcesElement, + ]; + $expectedResponse = new ListRetiredResourcesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTotalSize($totalSize); + $expectedResponse->setRetiredResources($retiredResources); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListRetiredResourcesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listRetiredResources($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getRetiredResources()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.KeyManagementService/ListRetiredResources', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listRetiredResourcesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListRetiredResourcesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listRetiredResources($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function macSignTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $mac = '79'; + $verifiedDataCrc32c = true; + $expectedResponse = new MacSignResponse(); + $expectedResponse->setName($name2); + $expectedResponse->setMac($mac); + $expectedResponse->setVerifiedDataCrc32c($verifiedDataCrc32c); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); + $data = '-86'; + $request = (new MacSignRequest()) + ->setName($formattedName) + ->setData($data); + $response = $gapicClient->macSign($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.KeyManagementService/MacSign', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getData(); + $this->assertProtobufEquals($data, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function macSignExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); + $data = '-86'; + $request = (new MacSignRequest()) + ->setName($formattedName) + ->setData($data); + try { + $gapicClient->macSign($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function macVerifyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $success = false; + $verifiedDataCrc32c = true; + $verifiedMacCrc32c = false; + $verifiedSuccessIntegrity = true; + $expectedResponse = new MacVerifyResponse(); + $expectedResponse->setName($name2); + $expectedResponse->setSuccess($success); + $expectedResponse->setVerifiedDataCrc32c($verifiedDataCrc32c); + $expectedResponse->setVerifiedMacCrc32c($verifiedMacCrc32c); + $expectedResponse->setVerifiedSuccessIntegrity($verifiedSuccessIntegrity); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); + $data = '-86'; + $mac = '79'; + $request = (new MacVerifyRequest()) + ->setName($formattedName) + ->setData($data) + ->setMac($mac); + $response = $gapicClient->macVerify($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.KeyManagementService/MacVerify', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getData(); + $this->assertProtobufEquals($data, $actualValue); + $actualValue = $actualRequestObject->getMac(); + $this->assertProtobufEquals($mac, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function macVerifyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); + $data = '-86'; + $mac = '79'; + $request = (new MacVerifyRequest()) + ->setName($formattedName) + ->setData($data) + ->setMac($mac); + try { + $gapicClient->macVerify($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function rawDecryptTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $plaintext = '-9'; + $verifiedCiphertextCrc32c = true; + $verifiedAdditionalAuthenticatedDataCrc32c = true; + $verifiedInitializationVectorCrc32c = true; + $expectedResponse = new RawDecryptResponse(); + $expectedResponse->setPlaintext($plaintext); + $expectedResponse->setVerifiedCiphertextCrc32c($verifiedCiphertextCrc32c); + $expectedResponse->setVerifiedAdditionalAuthenticatedDataCrc32c($verifiedAdditionalAuthenticatedDataCrc32c); + $expectedResponse->setVerifiedInitializationVectorCrc32c($verifiedInitializationVectorCrc32c); + $transport->addResponse($expectedResponse); + // Mock request + $name = 'name3373707'; + $ciphertext = '-72'; + $initializationVector = '-62'; + $request = (new RawDecryptRequest()) + ->setName($name) + ->setCiphertext($ciphertext) + ->setInitializationVector($initializationVector); + $response = $gapicClient->rawDecrypt($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.KeyManagementService/RawDecrypt', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $actualValue = $actualRequestObject->getCiphertext(); + $this->assertProtobufEquals($ciphertext, $actualValue); + $actualValue = $actualRequestObject->getInitializationVector(); + $this->assertProtobufEquals($initializationVector, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function rawDecryptExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $name = 'name3373707'; + $ciphertext = '-72'; + $initializationVector = '-62'; + $request = (new RawDecryptRequest()) + ->setName($name) + ->setCiphertext($ciphertext) + ->setInitializationVector($initializationVector); + try { + $gapicClient->rawDecrypt($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function rawEncryptTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $ciphertext = '-72'; + $initializationVector2 = '-11'; + $tagLength = 172791595; + $verifiedPlaintextCrc32c = false; + $verifiedAdditionalAuthenticatedDataCrc32c = true; + $verifiedInitializationVectorCrc32c = true; + $name2 = 'name2-1052831874'; + $expectedResponse = new RawEncryptResponse(); + $expectedResponse->setCiphertext($ciphertext); + $expectedResponse->setInitializationVector($initializationVector2); + $expectedResponse->setTagLength($tagLength); + $expectedResponse->setVerifiedPlaintextCrc32c($verifiedPlaintextCrc32c); + $expectedResponse->setVerifiedAdditionalAuthenticatedDataCrc32c($verifiedAdditionalAuthenticatedDataCrc32c); + $expectedResponse->setVerifiedInitializationVectorCrc32c($verifiedInitializationVectorCrc32c); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $name = 'name3373707'; + $plaintext = '-9'; + $request = (new RawEncryptRequest()) + ->setName($name) + ->setPlaintext($plaintext); + $response = $gapicClient->rawEncrypt($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.KeyManagementService/RawEncrypt', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $actualValue = $actualRequestObject->getPlaintext(); + $this->assertProtobufEquals($plaintext, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function rawEncryptExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $name = 'name3373707'; + $plaintext = '-9'; + $request = (new RawEncryptRequest()) + ->setName($name) + ->setPlaintext($plaintext); + try { + $gapicClient->rawEncrypt($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function restoreCryptoKeyVersionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $importJob = 'importJob2125587491'; + $importFailureReason = 'importFailureReason-494073229'; + $generationFailureReason = 'generationFailureReason1749803168'; + $externalDestructionFailureReason = 'externalDestructionFailureReason-2122384710'; + $reimportEligible = true; + $expectedResponse = new CryptoKeyVersion(); + $expectedResponse->setName($name2); + $expectedResponse->setImportJob($importJob); + $expectedResponse->setImportFailureReason($importFailureReason); + $expectedResponse->setGenerationFailureReason($generationFailureReason); + $expectedResponse->setExternalDestructionFailureReason($externalDestructionFailureReason); + $expectedResponse->setReimportEligible($reimportEligible); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); + $request = (new RestoreCryptoKeyVersionRequest()) + ->setName($formattedName); + $response = $gapicClient->restoreCryptoKeyVersion($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.KeyManagementService/RestoreCryptoKeyVersion', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function restoreCryptoKeyVersionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); + $request = (new RestoreCryptoKeyVersionRequest()) + ->setName($formattedName); + try { + $gapicClient->restoreCryptoKeyVersion($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateCryptoKeyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $importOnly = true; + $cryptoKeyBackend = 'cryptoKeyBackend-1526615498'; + $expectedResponse = new CryptoKey(); + $expectedResponse->setName($name); + $expectedResponse->setImportOnly($importOnly); + $expectedResponse->setCryptoKeyBackend($cryptoKeyBackend); + $transport->addResponse($expectedResponse); + // Mock request + $cryptoKey = new CryptoKey(); + $updateMask = new FieldMask(); + $request = (new UpdateCryptoKeyRequest()) + ->setCryptoKey($cryptoKey) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateCryptoKey($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.KeyManagementService/UpdateCryptoKey', $actualFuncCall); + $actualValue = $actualRequestObject->getCryptoKey(); + $this->assertProtobufEquals($cryptoKey, $actualValue); + $actualValue = $actualRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateCryptoKeyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $cryptoKey = new CryptoKey(); + $updateMask = new FieldMask(); + $request = (new UpdateCryptoKeyRequest()) + ->setCryptoKey($cryptoKey) + ->setUpdateMask($updateMask); + try { + $gapicClient->updateCryptoKey($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateCryptoKeyPrimaryVersionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $importOnly = true; + $cryptoKeyBackend = 'cryptoKeyBackend-1526615498'; + $expectedResponse = new CryptoKey(); + $expectedResponse->setName($name2); + $expectedResponse->setImportOnly($importOnly); + $expectedResponse->setCryptoKeyBackend($cryptoKeyBackend); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->cryptoKeyName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]'); + $cryptoKeyVersionId = 'cryptoKeyVersionId729489152'; + $request = (new UpdateCryptoKeyPrimaryVersionRequest()) + ->setName($formattedName) + ->setCryptoKeyVersionId($cryptoKeyVersionId); + $response = $gapicClient->updateCryptoKeyPrimaryVersion($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.KeyManagementService/UpdateCryptoKeyPrimaryVersion', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getCryptoKeyVersionId(); + $this->assertProtobufEquals($cryptoKeyVersionId, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateCryptoKeyPrimaryVersionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->cryptoKeyName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]'); + $cryptoKeyVersionId = 'cryptoKeyVersionId729489152'; + $request = (new UpdateCryptoKeyPrimaryVersionRequest()) + ->setName($formattedName) + ->setCryptoKeyVersionId($cryptoKeyVersionId); + try { + $gapicClient->updateCryptoKeyPrimaryVersion($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateCryptoKeyVersionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $importJob = 'importJob2125587491'; + $importFailureReason = 'importFailureReason-494073229'; + $generationFailureReason = 'generationFailureReason1749803168'; + $externalDestructionFailureReason = 'externalDestructionFailureReason-2122384710'; + $reimportEligible = true; + $expectedResponse = new CryptoKeyVersion(); + $expectedResponse->setName($name); + $expectedResponse->setImportJob($importJob); + $expectedResponse->setImportFailureReason($importFailureReason); + $expectedResponse->setGenerationFailureReason($generationFailureReason); + $expectedResponse->setExternalDestructionFailureReason($externalDestructionFailureReason); + $expectedResponse->setReimportEligible($reimportEligible); + $transport->addResponse($expectedResponse); + // Mock request + $cryptoKeyVersion = new CryptoKeyVersion(); + $updateMask = new FieldMask(); + $request = (new UpdateCryptoKeyVersionRequest()) + ->setCryptoKeyVersion($cryptoKeyVersion) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateCryptoKeyVersion($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.KeyManagementService/UpdateCryptoKeyVersion', $actualFuncCall); + $actualValue = $actualRequestObject->getCryptoKeyVersion(); + $this->assertProtobufEquals($cryptoKeyVersion, $actualValue); + $actualValue = $actualRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateCryptoKeyVersionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $cryptoKeyVersion = new CryptoKeyVersion(); + $updateMask = new FieldMask(); + $request = (new UpdateCryptoKeyVersionRequest()) + ->setCryptoKeyVersion($cryptoKeyVersion) + ->setUpdateMask($updateMask); + try { + $gapicClient->updateCryptoKeyVersion($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Location(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + $request = new GetLocationRequest(); + $response = $gapicClient->getLocation($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new GetLocationRequest(); + try { + $gapicClient->getLocation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $request = new ListLocationsRequest(); + $response = $gapicClient->listLocations($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new ListLocationsRequest(); + try { + $gapicClient->listLocations($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + $response = $gapicClient->getIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + try { + $gapicClient->getIamPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + $response = $gapicClient->setIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPolicy(); + $this->assertProtobufEquals($policy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + try { + $gapicClient->setIamPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new TestIamPermissionsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + $response = $gapicClient->testIamPermissions($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPermissions(); + $this->assertProtobufEquals($permissions, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + try { + $gapicClient->testIamPermissions($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function asymmetricDecryptAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $plaintext = '-9'; + $verifiedCiphertextCrc32c = true; + $expectedResponse = new AsymmetricDecryptResponse(); + $expectedResponse->setPlaintext($plaintext); + $expectedResponse->setVerifiedCiphertextCrc32c($verifiedCiphertextCrc32c); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); + $ciphertext = '-72'; + $request = (new AsymmetricDecryptRequest()) + ->setName($formattedName) + ->setCiphertext($ciphertext); + $response = $gapicClient->asymmetricDecryptAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.KeyManagementService/AsymmetricDecrypt', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getCiphertext(); + $this->assertProtobufEquals($ciphertext, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} From d3f1660ea5f396b74526b11e8db4261e531e3ab8 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Mon, 16 Feb 2026 16:14:16 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- Kms/metadata/V1/AutokeyAdmin.php | Bin 2566 -> 2989 bytes Kms/metadata/V1/Resources.php | Bin 8540 -> 8734 bytes .../AutokeyAdminClient/get_autokey_config.php | 7 +- .../V1/AutokeyAdminClient/list_locations.php | 7 + .../update_autokey_config.php | 4 +- .../V1/AutokeyClient/list_locations.php | 7 + .../V1/EkmServiceClient/list_locations.php | 7 + .../V1/HsmManagementClient/list_locations.php | 7 + .../list_locations.php | 7 + Kms/src/V1/AutokeyConfig.php | 54 +- .../KeyProjectResolutionMode.php | 2 - Kms/src/V1/AutokeyConfig/State.php | 8 + Kms/src/V1/Client/AutokeyAdminClient.php | 63 +- Kms/src/V1/Client/AutokeyClient.php | 7 + Kms/src/V1/Client/EkmServiceClient.php | 7 + Kms/src/V1/Client/HsmManagementClient.php | 7 + .../V1/Client/KeyManagementServiceClient.php | 7 + .../CryptoKeyVersionAlgorithm.php | 51 + Kms/src/V1/GetAutokeyConfigRequest.php | 15 +- Kms/src/V1/ImportJob.php | 12 +- .../autokey_admin_descriptor_config.php | 2 + .../autokey_admin_rest_client_config.php | 16 + .../Google/Cloud/Kms/V1/Autokey.php | 65 - .../Google/Cloud/Kms/V1/AutokeyAdmin.php | Bin 2989 -> 0 bytes .../Google/Cloud/Kms/V1/EkmService.php | Bin 5224 -> 0 bytes .../Google/Cloud/Kms/V1/HsmManagement.php | Bin 10694 -> 0 bytes .../Google/Cloud/Kms/V1/Resources.php | Bin 8734 -> 0 bytes .../Google/Cloud/Kms/V1/Service.php | Bin 17709 -> 0 bytes .../src/Google/Cloud/Kms/V1/AccessReason.php | 159 - ...SingleTenantHsmInstanceProposalRequest.php | 188 - .../QuorumReply.php | 88 - .../RequiredActionQuorumReply.php | 126 - ...ingleTenantHsmInstanceProposalResponse.php | 34 - .../Cloud/Kms/V1/AsymmetricDecryptRequest.php | 317 -- .../Kms/V1/AsymmetricDecryptResponse.php | 339 -- .../Cloud/Kms/V1/AsymmetricSignRequest.php | 568 --- .../Cloud/Kms/V1/AsymmetricSignResponse.php | 463 --- .../src/Google/Cloud/Kms/V1/AutokeyConfig.php | 271 -- .../Cloud/Kms/V1/AutokeyConfig/State.php | 81 - .../src/Google/Cloud/Kms/V1/Certificate.php | 388 --- .../src/Google/Cloud/Kms/V1/Challenge.php | 109 - .../Google/Cloud/Kms/V1/ChallengeReply.php | 105 - .../Google/Cloud/Kms/V1/ChecksummedData.php | 216 -- .../Cloud/Kms/V1/CreateCryptoKeyRequest.php | 241 -- .../Kms/V1/CreateCryptoKeyVersionRequest.php | 143 - .../Kms/V1/CreateEkmConnectionRequest.php | 184 - .../Cloud/Kms/V1/CreateImportJobRequest.php | 184 - .../Cloud/Kms/V1/CreateKeyHandleMetadata.php | 35 - .../Cloud/Kms/V1/CreateKeyHandleRequest.php | 184 - .../Cloud/Kms/V1/CreateKeyRingRequest.php | 184 - .../CreateSingleTenantHsmInstanceMetadata.php | 35 - ...ingleTenantHsmInstanceProposalMetadata.php | 35 - ...SingleTenantHsmInstanceProposalRequest.php | 194 -- .../CreateSingleTenantHsmInstanceRequest.php | 189 - .../src/Google/Cloud/Kms/V1/CryptoKey.php | 768 ----- .../Kms/V1/CryptoKey/CryptoKeyPurpose.php | 114 - .../Google/Cloud/Kms/V1/CryptoKeyVersion.php | 819 ----- .../CryptoKeyVersionAlgorithm.php | 425 --- .../CryptoKeyVersionState.php | 154 - .../CryptoKeyVersion/CryptoKeyVersionView.php | 67 - .../Cloud/Kms/V1/CryptoKeyVersionTemplate.php | 150 - .../Cloud/Kms/V1/DecapsulateRequest.php | 297 -- .../Cloud/Kms/V1/DecapsulateResponse.php | 354 -- .../Google/Cloud/Kms/V1/DecryptRequest.php | 529 --- .../Google/Cloud/Kms/V1/DecryptResponse.php | 315 -- .../Cloud/Kms/V1/DeleteCryptoKeyMetadata.php | 81 - .../Cloud/Kms/V1/DeleteCryptoKeyRequest.php | 87 - .../Kms/V1/DeleteCryptoKeyVersionMetadata.php | 35 - .../Kms/V1/DeleteCryptoKeyVersionRequest.php | 87 - ...SingleTenantHsmInstanceProposalRequest.php | 97 - .../Kms/V1/DestroyCryptoKeyVersionRequest.php | 87 - .../proto/src/Google/Cloud/Kms/V1/Digest.php | 141 - .../src/Google/Cloud/Kms/V1/EkmConfig.php | 123 - .../src/Google/Cloud/Kms/V1/EkmConnection.php | 314 -- .../V1/EkmConnection/KeyManagementMode.php | 91 - .../Kms/V1/EkmConnection/ServiceResolver.php | 206 -- .../Google/Cloud/Kms/V1/EncryptRequest.php | 625 ---- .../Google/Cloud/Kms/V1/EncryptResponse.php | 471 --- ...ingleTenantHsmInstanceProposalMetadata.php | 35 - ...SingleTenantHsmInstanceProposalRequest.php | 97 - ...ingleTenantHsmInstanceProposalResponse.php | 34 - .../Kms/V1/ExternalProtectionLevelOptions.php | 122 - .../Kms/V1/GenerateRandomBytesRequest.php | 179 - .../Kms/V1/GenerateRandomBytesResponse.php | 211 -- .../Cloud/Kms/V1/GetAutokeyConfigRequest.php | 92 - .../Cloud/Kms/V1/GetCryptoKeyRequest.php | 87 - .../Kms/V1/GetCryptoKeyVersionRequest.php | 87 - .../Cloud/Kms/V1/GetEkmConfigRequest.php | 87 - .../Cloud/Kms/V1/GetEkmConnectionRequest.php | 87 - .../Cloud/Kms/V1/GetImportJobRequest.php | 87 - .../Cloud/Kms/V1/GetKeyHandleRequest.php | 91 - .../Google/Cloud/Kms/V1/GetKeyRingRequest.php | 87 - .../Cloud/Kms/V1/GetPublicKeyRequest.php | 145 - .../Kms/V1/GetRetiredResourceRequest.php | 87 - ...SingleTenantHsmInstanceProposalRequest.php | 97 - .../V1/GetSingleTenantHsmInstanceRequest.php | 92 - .../Kms/V1/ImportCryptoKeyVersionRequest.php | 499 --- .../src/Google/Cloud/Kms/V1/ImportJob.php | 607 ---- .../Cloud/Kms/V1/ImportJob/ImportJobState.php | 79 - .../Cloud/Kms/V1/ImportJob/ImportMethod.php | 120 - .../Kms/V1/ImportJob/WrappingPublicKey.php | 88 - .../Kms/V1/KeyAccessJustificationsPolicy.php | 87 - .../src/Google/Cloud/Kms/V1/KeyHandle.php | 196 -- .../Cloud/Kms/V1/KeyOperationAttestation.php | 151 - .../AttestationFormat.php | 68 - .../CertificateChains.php | 140 - .../proto/src/Google/Cloud/Kms/V1/KeyRing.php | 124 - .../Kms/V1/ListCryptoKeyVersionsRequest.php | 314 -- .../Kms/V1/ListCryptoKeyVersionsResponse.php | 164 - .../Cloud/Kms/V1/ListCryptoKeysRequest.php | 309 -- .../Cloud/Kms/V1/ListCryptoKeysResponse.php | 160 - .../Kms/V1/ListEkmConnectionsRequest.php | 280 -- .../Kms/V1/ListEkmConnectionsResponse.php | 160 - .../Cloud/Kms/V1/ListImportJobsRequest.php | 275 -- .../Cloud/Kms/V1/ListImportJobsResponse.php | 160 - .../Cloud/Kms/V1/ListKeyHandlesRequest.php | 234 -- .../Cloud/Kms/V1/ListKeyHandlesResponse.php | 110 - .../Cloud/Kms/V1/ListKeyRingsRequest.php | 280 -- .../Cloud/Kms/V1/ListKeyRingsResponse.php | 160 - .../Kms/V1/ListRetiredResourcesRequest.php | 192 -- .../Kms/V1/ListRetiredResourcesResponse.php | 148 - ...ingleTenantHsmInstanceProposalsRequest.php | 339 -- ...ngleTenantHsmInstanceProposalsResponse.php | 168 - .../ListSingleTenantHsmInstancesRequest.php | 338 -- .../ListSingleTenantHsmInstancesResponse.php | 168 - .../Google/Cloud/Kms/V1/LocationMetadata.php | 172 - .../Google/Cloud/Kms/V1/MacSignRequest.php | 300 -- .../Google/Cloud/Kms/V1/MacSignResponse.php | 377 -- .../Google/Cloud/Kms/V1/MacVerifyRequest.php | 514 --- .../Google/Cloud/Kms/V1/MacVerifyResponse.php | 386 --- .../Google/Cloud/Kms/V1/ProtectionLevel.php | 84 - .../src/Google/Cloud/Kms/V1/PublicKey.php | 452 --- .../Kms/V1/PublicKey/PublicKeyFormat.php | 94 - .../Google/Cloud/Kms/V1/RawDecryptRequest.php | 707 ---- .../Cloud/Kms/V1/RawDecryptResponse.php | 511 --- .../Google/Cloud/Kms/V1/RawEncryptRequest.php | 743 ---- .../Cloud/Kms/V1/RawEncryptResponse.php | 744 ---- .../Kms/V1/RestoreCryptoKeyVersionRequest.php | 87 - .../Google/Cloud/Kms/V1/RetiredResource.php | 202 -- .../V1/ShowEffectiveAutokeyConfigRequest.php | 92 - .../V1/ShowEffectiveAutokeyConfigResponse.php | 72 - .../Cloud/Kms/V1/SingleTenantHsmInstance.php | 395 --- .../V1/SingleTenantHsmInstance/QuorumAuth.php | 166 - .../Kms/V1/SingleTenantHsmInstance/State.php | 131 - .../V1/SingleTenantHsmInstanceProposal.php | 898 ----- .../AddQuorumMember.php | 82 - .../DeleteSingleTenantHsmInstance.php | 47 - .../DisableSingleTenantHsmInstance.php | 41 - .../EnableSingleTenantHsmInstance.php | 41 - .../QuorumParameters.php | 163 - .../RefreshSingleTenantHsmInstance.php | 46 - .../RegisterTwoFactorAuthKeys.php | 134 - .../RemoveQuorumMember.php | 82 - .../RequiredActionQuorumParameters.php | 201 -- .../SingleTenantHsmInstanceProposal/State.php | 114 - .../Kms/V1/UpdateAutokeyConfigRequest.php | 152 - .../UpdateCryptoKeyPrimaryVersionRequest.php | 128 - .../Cloud/Kms/V1/UpdateCryptoKeyRequest.php | 137 - .../Kms/V1/UpdateCryptoKeyVersionRequest.php | 142 - .../Cloud/Kms/V1/UpdateEkmConfigRequest.php | 137 - .../Kms/V1/UpdateEkmConnectionRequest.php | 142 - .../Kms/V1/VerifyConnectivityRequest.php | 87 - .../Kms/V1/VerifyConnectivityResponse.php | 34 - .../AutokeyAdminClient/get_autokey_config.php | 74 - .../V1/AutokeyAdminClient/get_iam_policy.php | 72 - .../V1/AutokeyAdminClient/get_location.php | 57 - .../V1/AutokeyAdminClient/list_locations.php | 69 - .../V1/AutokeyAdminClient/set_iam_policy.php | 77 - .../show_effective_autokey_config.php | 73 - .../test_iam_permissions.php | 84 - .../update_autokey_config.php | 68 - .../V1/AutokeyClient/create_key_handle.php | 101 - .../V1/AutokeyClient/get_iam_policy.php | 72 - .../V1/AutokeyClient/get_key_handle.php | 73 - .../samples/V1/AutokeyClient/get_location.php | 57 - .../V1/AutokeyClient/list_key_handles.php | 78 - .../V1/AutokeyClient/list_locations.php | 69 - .../V1/AutokeyClient/set_iam_policy.php | 77 - .../V1/AutokeyClient/test_iam_permissions.php | 84 - .../create_ekm_connection.php | 80 - .../V1/EkmServiceClient/get_ekm_config.php | 73 - .../EkmServiceClient/get_ekm_connection.php | 73 - .../V1/EkmServiceClient/get_iam_policy.php | 72 - .../V1/EkmServiceClient/get_location.php | 57 - .../EkmServiceClient/list_ekm_connections.php | 78 - .../V1/EkmServiceClient/list_locations.php | 69 - .../V1/EkmServiceClient/set_iam_policy.php | 77 - .../EkmServiceClient/test_iam_permissions.php | 84 - .../V1/EkmServiceClient/update_ekm_config.php | 63 - .../update_ekm_connection.php | 62 - .../EkmServiceClient/verify_connectivity.php | 76 - ...ve_single_tenant_hsm_instance_proposal.php | 106 - .../create_single_tenant_hsm_instance.php | 104 - ...te_single_tenant_hsm_instance_proposal.php | 95 - ...te_single_tenant_hsm_instance_proposal.php | 78 - ...te_single_tenant_hsm_instance_proposal.php | 97 - .../V1/HsmManagementClient/get_iam_policy.php | 72 - .../V1/HsmManagementClient/get_location.php | 57 - .../get_single_tenant_hsm_instance.php | 78 - ...et_single_tenant_hsm_instance_proposal.php | 80 - .../V1/HsmManagementClient/list_locations.php | 69 - ...t_single_tenant_hsm_instance_proposals.php | 84 - .../list_single_tenant_hsm_instances.php | 79 - .../V1/HsmManagementClient/set_iam_policy.php | 77 - .../test_iam_permissions.php | 84 - .../asymmetric_decrypt.php | 88 - .../asymmetric_sign.php | 86 - .../create_crypto_key.php | 83 - .../create_crypto_key_version.php | 85 - .../create_import_job.php | 106 - .../create_key_ring.php | 80 - .../decapsulate.php | 88 - .../V1/KeyManagementServiceClient/decrypt.php | 85 - .../delete_crypto_key.php | 91 - .../delete_crypto_key_version.php | 97 - .../destroy_crypto_key_version.php | 98 - .../V1/KeyManagementServiceClient/encrypt.php | 92 - .../generate_random_bytes.php | 58 - .../get_crypto_key.php | 79 - .../get_crypto_key_version.php | 79 - .../get_iam_policy.php | 72 - .../get_import_job.php | 77 - .../get_key_ring.php | 72 - .../get_location.php | 57 - .../get_public_key.php | 83 - .../get_retired_resource.php | 78 - .../import_crypto_key_version.php | 103 - .../list_crypto_key_versions.php | 83 - .../list_crypto_keys.php | 77 - .../list_import_jobs.php | 77 - .../list_key_rings.php | 78 - .../list_locations.php | 69 - .../list_retired_resources.php | 80 - .../KeyManagementServiceClient/mac_sign.php | 85 - .../KeyManagementServiceClient/mac_verify.php | 90 - .../raw_decrypt.php | 84 - .../raw_encrypt.php | 88 - .../restore_crypto_key_version.php | 86 - .../set_iam_policy.php | 77 - .../test_iam_permissions.php | 84 - .../update_crypto_key.php | 62 - .../update_crypto_key_primary_version.php | 88 - .../update_crypto_key_version.php | 73 - .../v1/src/V1/Client/AutokeyAdminClient.php | 536 --- .../Kms/v1/src/V1/Client/AutokeyClient.php | 591 ---- .../Kms/v1/src/V1/Client/EkmServiceClient.php | 658 ---- .../v1/src/V1/Client/HsmManagementClient.php | 776 ----- .../V1/Client/KeyManagementServiceClient.php | 1639 --------- .../Kms/v1/src/V1/gapic_metadata.json | 454 --- .../autokey_admin_client_config.json | 75 - .../autokey_admin_descriptor_config.php | 144 - .../autokey_admin_rest_client_config.php | 219 -- .../V1/resources/autokey_client_config.json | 85 - .../resources/autokey_descriptor_config.php | 157 - .../resources/autokey_rest_client_config.php | 199 -- .../resources/ekm_service_client_config.json | 95 - .../ekm_service_descriptor_config.php | 201 -- .../ekm_service_rest_client_config.php | 256 -- .../hsm_management_client_config.json | 105 - .../hsm_management_descriptor_config.php | 251 -- .../hsm_management_rest_client_config.php | 268 -- .../key_management_service_client_config.json | 235 -- ...y_management_service_descriptor_config.php | 561 --- ..._management_service_rest_client_config.php | 565 --- .../Unit/V1/Client/AutokeyAdminClientTest.php | 644 ---- .../Unit/V1/Client/AutokeyClientTest.php | 761 ---- .../Unit/V1/Client/EkmServiceClientTest.php | 948 ----- .../V1/Client/HsmManagementClientTest.php | 1254 ------- .../Client/KeyManagementServiceClientTest.php | 3050 ----------------- 269 files changed, 262 insertions(+), 49610 deletions(-) rename {owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms => Kms/src}/V1/AutokeyConfig/KeyProjectResolutionMode.php (93%) delete mode 100644 owl-bot-staging/Kms/v1/proto/src/GPBMetadata/Google/Cloud/Kms/V1/Autokey.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/GPBMetadata/Google/Cloud/Kms/V1/AutokeyAdmin.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/GPBMetadata/Google/Cloud/Kms/V1/EkmService.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/GPBMetadata/Google/Cloud/Kms/V1/HsmManagement.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/GPBMetadata/Google/Cloud/Kms/V1/Resources.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/GPBMetadata/Google/Cloud/Kms/V1/Service.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AccessReason.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ApproveSingleTenantHsmInstanceProposalRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ApproveSingleTenantHsmInstanceProposalRequest/QuorumReply.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ApproveSingleTenantHsmInstanceProposalRequest/RequiredActionQuorumReply.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ApproveSingleTenantHsmInstanceProposalResponse.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AsymmetricDecryptRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AsymmetricDecryptResponse.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AsymmetricSignRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AsymmetricSignResponse.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AutokeyConfig.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AutokeyConfig/State.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/Certificate.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/Challenge.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ChallengeReply.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ChecksummedData.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateCryptoKeyRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateCryptoKeyVersionRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateEkmConnectionRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateImportJobRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateKeyHandleMetadata.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateKeyHandleRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateKeyRingRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateSingleTenantHsmInstanceMetadata.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateSingleTenantHsmInstanceProposalMetadata.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateSingleTenantHsmInstanceProposalRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateSingleTenantHsmInstanceRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKey.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKey/CryptoKeyPurpose.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersion.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersion/CryptoKeyVersionAlgorithm.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersion/CryptoKeyVersionState.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersion/CryptoKeyVersionView.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersionTemplate.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DecapsulateRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DecapsulateResponse.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DecryptRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DecryptResponse.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DeleteCryptoKeyMetadata.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DeleteCryptoKeyRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DeleteCryptoKeyVersionMetadata.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DeleteCryptoKeyVersionRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DeleteSingleTenantHsmInstanceProposalRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DestroyCryptoKeyVersionRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/Digest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EkmConfig.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EkmConnection.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EkmConnection/KeyManagementMode.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EkmConnection/ServiceResolver.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EncryptRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EncryptResponse.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ExecuteSingleTenantHsmInstanceProposalMetadata.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ExecuteSingleTenantHsmInstanceProposalRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ExecuteSingleTenantHsmInstanceProposalResponse.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ExternalProtectionLevelOptions.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GenerateRandomBytesRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GenerateRandomBytesResponse.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetAutokeyConfigRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetCryptoKeyRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetCryptoKeyVersionRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetEkmConfigRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetEkmConnectionRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetImportJobRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetKeyHandleRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetKeyRingRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetPublicKeyRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetRetiredResourceRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetSingleTenantHsmInstanceProposalRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetSingleTenantHsmInstanceRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportCryptoKeyVersionRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportJob.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportJob/ImportJobState.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportJob/ImportMethod.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportJob/WrappingPublicKey.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyAccessJustificationsPolicy.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyHandle.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyOperationAttestation.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyOperationAttestation/AttestationFormat.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyOperationAttestation/CertificateChains.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyRing.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListCryptoKeyVersionsRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListCryptoKeyVersionsResponse.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListCryptoKeysRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListCryptoKeysResponse.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListEkmConnectionsRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListEkmConnectionsResponse.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListImportJobsRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListImportJobsResponse.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListKeyHandlesRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListKeyHandlesResponse.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListKeyRingsRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListKeyRingsResponse.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListRetiredResourcesRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListRetiredResourcesResponse.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListSingleTenantHsmInstanceProposalsRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListSingleTenantHsmInstanceProposalsResponse.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListSingleTenantHsmInstancesRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListSingleTenantHsmInstancesResponse.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/LocationMetadata.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/MacSignRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/MacSignResponse.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/MacVerifyRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/MacVerifyResponse.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ProtectionLevel.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/PublicKey.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/PublicKey/PublicKeyFormat.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/RawDecryptRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/RawDecryptResponse.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/RawEncryptRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/RawEncryptResponse.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/RestoreCryptoKeyVersionRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/RetiredResource.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ShowEffectiveAutokeyConfigRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ShowEffectiveAutokeyConfigResponse.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstance.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstance/QuorumAuth.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstance/State.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/AddQuorumMember.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/DeleteSingleTenantHsmInstance.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/DisableSingleTenantHsmInstance.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/EnableSingleTenantHsmInstance.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/QuorumParameters.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/RefreshSingleTenantHsmInstance.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/RegisterTwoFactorAuthKeys.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/RemoveQuorumMember.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/RequiredActionQuorumParameters.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/State.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateAutokeyConfigRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateCryptoKeyPrimaryVersionRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateCryptoKeyRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateCryptoKeyVersionRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateEkmConfigRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateEkmConnectionRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/VerifyConnectivityRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/VerifyConnectivityResponse.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/AutokeyAdminClient/get_autokey_config.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/AutokeyAdminClient/get_iam_policy.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/AutokeyAdminClient/get_location.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/AutokeyAdminClient/list_locations.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/AutokeyAdminClient/set_iam_policy.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/AutokeyAdminClient/show_effective_autokey_config.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/AutokeyAdminClient/test_iam_permissions.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/AutokeyAdminClient/update_autokey_config.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/AutokeyClient/create_key_handle.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/AutokeyClient/get_iam_policy.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/AutokeyClient/get_key_handle.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/AutokeyClient/get_location.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/AutokeyClient/list_key_handles.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/AutokeyClient/list_locations.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/AutokeyClient/set_iam_policy.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/AutokeyClient/test_iam_permissions.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/create_ekm_connection.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/get_ekm_config.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/get_ekm_connection.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/get_iam_policy.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/get_location.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/list_ekm_connections.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/list_locations.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/set_iam_policy.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/test_iam_permissions.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/update_ekm_config.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/update_ekm_connection.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/verify_connectivity.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/approve_single_tenant_hsm_instance_proposal.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/create_single_tenant_hsm_instance.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/create_single_tenant_hsm_instance_proposal.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/delete_single_tenant_hsm_instance_proposal.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/execute_single_tenant_hsm_instance_proposal.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/get_iam_policy.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/get_location.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/get_single_tenant_hsm_instance.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/get_single_tenant_hsm_instance_proposal.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/list_locations.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/list_single_tenant_hsm_instance_proposals.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/list_single_tenant_hsm_instances.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/set_iam_policy.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/test_iam_permissions.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/asymmetric_decrypt.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/asymmetric_sign.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/create_crypto_key.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/create_crypto_key_version.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/create_import_job.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/create_key_ring.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/decapsulate.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/decrypt.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/delete_crypto_key.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/delete_crypto_key_version.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/destroy_crypto_key_version.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/encrypt.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/generate_random_bytes.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_crypto_key.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_crypto_key_version.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_iam_policy.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_import_job.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_key_ring.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_location.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_public_key.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_retired_resource.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/import_crypto_key_version.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_crypto_key_versions.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_crypto_keys.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_import_jobs.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_key_rings.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_locations.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_retired_resources.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/mac_sign.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/mac_verify.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/raw_decrypt.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/raw_encrypt.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/restore_crypto_key_version.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/set_iam_policy.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/test_iam_permissions.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/update_crypto_key.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/update_crypto_key_primary_version.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/update_crypto_key_version.php delete mode 100644 owl-bot-staging/Kms/v1/src/V1/Client/AutokeyAdminClient.php delete mode 100644 owl-bot-staging/Kms/v1/src/V1/Client/AutokeyClient.php delete mode 100644 owl-bot-staging/Kms/v1/src/V1/Client/EkmServiceClient.php delete mode 100644 owl-bot-staging/Kms/v1/src/V1/Client/HsmManagementClient.php delete mode 100644 owl-bot-staging/Kms/v1/src/V1/Client/KeyManagementServiceClient.php delete mode 100644 owl-bot-staging/Kms/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/Kms/v1/src/V1/resources/autokey_admin_client_config.json delete mode 100644 owl-bot-staging/Kms/v1/src/V1/resources/autokey_admin_descriptor_config.php delete mode 100644 owl-bot-staging/Kms/v1/src/V1/resources/autokey_admin_rest_client_config.php delete mode 100644 owl-bot-staging/Kms/v1/src/V1/resources/autokey_client_config.json delete mode 100644 owl-bot-staging/Kms/v1/src/V1/resources/autokey_descriptor_config.php delete mode 100644 owl-bot-staging/Kms/v1/src/V1/resources/autokey_rest_client_config.php delete mode 100644 owl-bot-staging/Kms/v1/src/V1/resources/ekm_service_client_config.json delete mode 100644 owl-bot-staging/Kms/v1/src/V1/resources/ekm_service_descriptor_config.php delete mode 100644 owl-bot-staging/Kms/v1/src/V1/resources/ekm_service_rest_client_config.php delete mode 100644 owl-bot-staging/Kms/v1/src/V1/resources/hsm_management_client_config.json delete mode 100644 owl-bot-staging/Kms/v1/src/V1/resources/hsm_management_descriptor_config.php delete mode 100644 owl-bot-staging/Kms/v1/src/V1/resources/hsm_management_rest_client_config.php delete mode 100644 owl-bot-staging/Kms/v1/src/V1/resources/key_management_service_client_config.json delete mode 100644 owl-bot-staging/Kms/v1/src/V1/resources/key_management_service_descriptor_config.php delete mode 100644 owl-bot-staging/Kms/v1/src/V1/resources/key_management_service_rest_client_config.php delete mode 100644 owl-bot-staging/Kms/v1/tests/Unit/V1/Client/AutokeyAdminClientTest.php delete mode 100644 owl-bot-staging/Kms/v1/tests/Unit/V1/Client/AutokeyClientTest.php delete mode 100644 owl-bot-staging/Kms/v1/tests/Unit/V1/Client/EkmServiceClientTest.php delete mode 100644 owl-bot-staging/Kms/v1/tests/Unit/V1/Client/HsmManagementClientTest.php delete mode 100644 owl-bot-staging/Kms/v1/tests/Unit/V1/Client/KeyManagementServiceClientTest.php diff --git a/Kms/metadata/V1/AutokeyAdmin.php b/Kms/metadata/V1/AutokeyAdmin.php index 25deea6f10b4484d1a7acea5b42c24fb1d30f749..9c621b31bc3123c4ac0c3580d055981d2fd51848 100644 GIT binary patch delta 468 zcmZn@Su4Kb3lr;m0j?PJiQej)6_{%nnc7(=&tvIT7fR)l&Q7h2FDS~-N=+__FG?-W z&nYd*%+HI@%}+^{;80-H;4`wGJb_(w5-Xp)cWPw-L}d_Mp)XLK6Y~Q{My1Nhx~yUK zLW*3n-ma1H0YUy=uFfIx0j@#5p25MM{(kW;u6~}bE&?n{ZH!zJxXcpL2D%g3fFRdk zf1l70kO98_F0S#Re!&5*&Yo@{qZouFxkO!DT|Au~LtI_rf!fSr77H*6iEs&kG=~N` zyTV18gm}0(Ts(svoqT}$nXP&lUpaO#a;Z*!%OO6wmxXWgdR7HtAq8lF6zf+*S(6X2 zUJ>2S#>L}UT9OY8GRKtM%sio4OkBc~H!=%P-oqBgw3czQFuM{{C*x!@c4w6+7b7G6 zGDH39M2Lp?v7lstD^a2IR4GLT*kxM7DAOm~>0?-1Jo&=2oB36@>1y%(*Y3e~{lb!}g zlLrUI6UYS$3_*2tZ);_FL1b-dZW7V~livqx0cMj-2qFPPlW+(_0uq;#`v_(ZG1@@{ WZeeX@g45)a0wj}f2_&<+3G)HvMJO)- diff --git a/Kms/metadata/V1/Resources.php b/Kms/metadata/V1/Resources.php index 61ed2670c980ed812f910be7829e22ef30b26daa..7bf454a61f90e150271a3341f8955afe3630ca5b 100644 GIT binary patch delta 252 zcmccPG|y$jHzt-_wp_{+y_Gl1GT&!sS}D5uA6GjwOBWZHne?-~)}8sz8b6Ym=;;D$wsnJJ1AXH+GkV7n~L NQPj9^z97`Y2LRvjM{fWC delta 56 zcmV-80LTBHMBGBK_5uW$JPIR`OCz%#1K$S%=M%I33Woy($OsAstring name = 1 [(.google.api.field_behavior) = IDENTIFIER]; */ @@ -53,6 +54,14 @@ class AutokeyConfig extends \Google\Protobuf\Internal\Message * Generated from protobuf field string etag = 6 [(.google.api.field_behavior) = OPTIONAL]; */ protected $etag = ''; + /** + * Optional. KeyProjectResolutionMode for the AutokeyConfig. + * Valid values are `DEDICATED_KEY_PROJECT`, `RESOURCE_PROJECT`, or + * `DISABLED`. + * + * Generated from protobuf field .google.cloud.kms.v1.AutokeyConfig.KeyProjectResolutionMode key_project_resolution_mode = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $key_project_resolution_mode = 0; /** * Constructor. @@ -62,7 +71,8 @@ class AutokeyConfig extends \Google\Protobuf\Internal\Message * * @type string $name * Identifier. Name of the [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig] - * resource, e.g. `folders/{FOLDER_NUMBER}/autokeyConfig`. + * resource, e.g. `folders/{FOLDER_NUMBER}/autokeyConfig` or + * `projects/{PROJECT_NUMBER}/autokeyConfig`. * @type string $key_project * Optional. Name of the key project, e.g. `projects/{PROJECT_ID}` or * `projects/{PROJECT_NUMBER}`, where Cloud KMS Autokey will provision a new @@ -82,6 +92,10 @@ class AutokeyConfig extends \Google\Protobuf\Internal\Message * 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. + * @type int $key_project_resolution_mode + * Optional. KeyProjectResolutionMode for the AutokeyConfig. + * Valid values are `DEDICATED_KEY_PROJECT`, `RESOURCE_PROJECT`, or + * `DISABLED`. * } */ public function __construct($data = NULL) { @@ -91,7 +105,8 @@ public function __construct($data = NULL) { /** * Identifier. Name of the [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig] - * resource, e.g. `folders/{FOLDER_NUMBER}/autokeyConfig`. + * resource, e.g. `folders/{FOLDER_NUMBER}/autokeyConfig` or + * `projects/{PROJECT_NUMBER}/autokeyConfig`. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * @return string @@ -103,7 +118,8 @@ public function getName() /** * Identifier. Name of the [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig] - * resource, e.g. `folders/{FOLDER_NUMBER}/autokeyConfig`. + * resource, e.g. `folders/{FOLDER_NUMBER}/autokeyConfig` or + * `projects/{PROJECT_NUMBER}/autokeyConfig`. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * @param string $var @@ -221,5 +237,35 @@ public function setEtag($var) return $this; } + /** + * Optional. KeyProjectResolutionMode for the AutokeyConfig. + * Valid values are `DEDICATED_KEY_PROJECT`, `RESOURCE_PROJECT`, or + * `DISABLED`. + * + * Generated from protobuf field .google.cloud.kms.v1.AutokeyConfig.KeyProjectResolutionMode key_project_resolution_mode = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getKeyProjectResolutionMode() + { + return $this->key_project_resolution_mode; + } + + /** + * Optional. KeyProjectResolutionMode for the AutokeyConfig. + * Valid values are `DEDICATED_KEY_PROJECT`, `RESOURCE_PROJECT`, or + * `DISABLED`. + * + * Generated from protobuf field .google.cloud.kms.v1.AutokeyConfig.KeyProjectResolutionMode key_project_resolution_mode = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setKeyProjectResolutionMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\AutokeyConfig\KeyProjectResolutionMode::class); + $this->key_project_resolution_mode = $var; + + return $this; + } + } diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AutokeyConfig/KeyProjectResolutionMode.php b/Kms/src/V1/AutokeyConfig/KeyProjectResolutionMode.php similarity index 93% rename from owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AutokeyConfig/KeyProjectResolutionMode.php rename to Kms/src/V1/AutokeyConfig/KeyProjectResolutionMode.php index f235653a2686..7d33a060d1f2 100644 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AutokeyConfig/KeyProjectResolutionMode.php +++ b/Kms/src/V1/AutokeyConfig/KeyProjectResolutionMode.php @@ -81,6 +81,4 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(KeyProjectResolutionMode::class, \Google\Cloud\Kms\V1\AutokeyConfig_KeyProjectResolutionMode::class); diff --git a/Kms/src/V1/AutokeyConfig/State.php b/Kms/src/V1/AutokeyConfig/State.php index 505b2b2aa890..eb4d6022b4a6 100644 --- a/Kms/src/V1/AutokeyConfig/State.php +++ b/Kms/src/V1/AutokeyConfig/State.php @@ -39,12 +39,20 @@ class State * Generated from protobuf enum UNINITIALIZED = 3; */ const UNINITIALIZED = 3; + /** + * The service account lacks the necessary permissions in the key project to + * configure Autokey. + * + * Generated from protobuf enum KEY_PROJECT_PERMISSION_DENIED = 4; + */ + const KEY_PROJECT_PERMISSION_DENIED = 4; private static $valueToName = [ self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', self::ACTIVE => 'ACTIVE', self::KEY_PROJECT_DELETED => 'KEY_PROJECT_DELETED', self::UNINITIALIZED => 'UNINITIALIZED', + self::KEY_PROJECT_PERMISSION_DENIED => 'KEY_PROJECT_PERMISSION_DENIED', ]; public static function name($value) diff --git a/Kms/src/V1/Client/AutokeyAdminClient.php b/Kms/src/V1/Client/AutokeyAdminClient.php index 146a58de6875..179e4ddc825d 100644 --- a/Kms/src/V1/Client/AutokeyAdminClient.php +++ b/Kms/src/V1/Client/AutokeyAdminClient.php @@ -52,13 +52,15 @@ /** * Service Description: Provides interfaces for managing [Cloud KMS - * Autokey](https://cloud.google.com/kms/help/autokey) folder-level - * configurations. A configuration is inherited by all descendent projects. A - * configuration at one folder overrides any other configurations in its - * ancestry. Setting a configuration on a folder is a prerequisite for Cloud KMS - * Autokey, so that users working in a descendant project can request - * provisioned [CryptoKeys][google.cloud.kms.v1.CryptoKey], ready for Customer - * Managed Encryption Key (CMEK) use, on-demand. + * Autokey](https://cloud.google.com/kms/help/autokey) folder-level or + * project-level configurations. A configuration is inherited by all descendent + * folders and projects. A configuration at a folder or project overrides any + * other configurations in its ancestry. Setting a configuration on a folder is + * a prerequisite for Cloud KMS Autokey, so that users working in a descendant + * project can request provisioned [CryptoKeys][google.cloud.kms.v1.CryptoKey], + * ready for Customer Managed Encryption Key (CMEK) use, on-demand when using + * the dedicated key project mode. This is not required when using the delegated + * key management mode for same-project keys. * * This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. @@ -141,6 +143,21 @@ public static function autokeyConfigName(string $folder): string ]); } + /** + * Formats a string containing the fully-qualified path to represent a + * folder_autokeyConfig resource. + * + * @param string $folder + * + * @return string The formatted folder_autokeyConfig resource. + */ + public static function folderAutokeyConfigName(string $folder): string + { + return self::getPathTemplate('folderAutokeyConfig')->render([ + 'folder' => $folder, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a project * resource. @@ -156,12 +173,29 @@ public static function projectName(string $project): string ]); } + /** + * Formats a string containing the fully-qualified path to represent a + * project_autokeyConfig resource. + * + * @param string $project + * + * @return string The formatted project_autokeyConfig resource. + */ + public static function projectAutokeyConfigName(string $project): string + { + return self::getPathTemplate('projectAutokeyConfig')->render([ + 'project' => $project, + ]); + } + /** * Parses a formatted name string and returns an associative array of the components in the name. * The following name formats are supported: * Template: Pattern * - autokeyConfig: folders/{folder}/autokeyConfig + * - folderAutokeyConfig: folders/{folder}/autokeyConfig * - project: projects/{project} + * - projectAutokeyConfig: projects/{project}/autokeyConfig * * The optional $template argument can be supplied to specify a particular pattern, * and must match one of the templates listed above. If no $template argument is @@ -267,8 +301,8 @@ public function __call($method, $args) } /** - * Returns the [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig] for a - * folder. + * Returns the [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig] for a folder + * or project. * * The async variant is {@see AutokeyAdminClient::getAutokeyConfigAsync()} . * @@ -323,8 +357,8 @@ public function showEffectiveAutokeyConfig( } /** - * Updates the [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig] for a - * folder. The caller must have both `cloudkms.autokeyConfigs.update` + * Updates the [AutokeyConfig][google.cloud.kms.v1.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][google.cloud.kms.v1.KeyHandle] creation in the folder's @@ -382,6 +416,13 @@ public function getLocation(GetLocationRequest $request, array $callOptions = [] /** * Lists information about the supported locations for this service. + This method can be called in two ways: + + * **List all public locations:** Use the path `GET /v1/locations`. + * **List project-visible locations:** Use the path + `GET /v1/projects/{project_id}/locations`. This may include public + locations as well as private or other locations specifically visible + to the project. * * The async variant is {@see AutokeyAdminClient::listLocationsAsync()} . * diff --git a/Kms/src/V1/Client/AutokeyClient.php b/Kms/src/V1/Client/AutokeyClient.php index 2c890dbd4e5a..b706617006b0 100644 --- a/Kms/src/V1/Client/AutokeyClient.php +++ b/Kms/src/V1/Client/AutokeyClient.php @@ -469,6 +469,13 @@ public function getLocation(GetLocationRequest $request, array $callOptions = [] /** * Lists information about the supported locations for this service. + This method can be called in two ways: + + * **List all public locations:** Use the path `GET /v1/locations`. + * **List project-visible locations:** Use the path + `GET /v1/projects/{project_id}/locations`. This may include public + locations as well as private or other locations specifically visible + to the project. * * The async variant is {@see AutokeyClient::listLocationsAsync()} . * diff --git a/Kms/src/V1/Client/EkmServiceClient.php b/Kms/src/V1/Client/EkmServiceClient.php index ef775c076d74..254627f4dbc5 100644 --- a/Kms/src/V1/Client/EkmServiceClient.php +++ b/Kms/src/V1/Client/EkmServiceClient.php @@ -538,6 +538,13 @@ public function getLocation(GetLocationRequest $request, array $callOptions = [] /** * Lists information about the supported locations for this service. + This method can be called in two ways: + + * **List all public locations:** Use the path `GET /v1/locations`. + * **List project-visible locations:** Use the path + `GET /v1/projects/{project_id}/locations`. This may include public + locations as well as private or other locations specifically visible + to the project. * * The async variant is {@see EkmServiceClient::listLocationsAsync()} . * diff --git a/Kms/src/V1/Client/HsmManagementClient.php b/Kms/src/V1/Client/HsmManagementClient.php index 48f4796abea6..ef0643373d50 100644 --- a/Kms/src/V1/Client/HsmManagementClient.php +++ b/Kms/src/V1/Client/HsmManagementClient.php @@ -679,6 +679,13 @@ public function getLocation(GetLocationRequest $request, array $callOptions = [] /** * Lists information about the supported locations for this service. + This method can be called in two ways: + + * **List all public locations:** Use the path `GET /v1/locations`. + * **List project-visible locations:** Use the path + `GET /v1/projects/{project_id}/locations`. This may include public + locations as well as private or other locations specifically visible + to the project. * * The async variant is {@see HsmManagementClient::listLocationsAsync()} . * diff --git a/Kms/src/V1/Client/KeyManagementServiceClient.php b/Kms/src/V1/Client/KeyManagementServiceClient.php index 2e4ddb531312..661c4d2b899a 100644 --- a/Kms/src/V1/Client/KeyManagementServiceClient.php +++ b/Kms/src/V1/Client/KeyManagementServiceClient.php @@ -1543,6 +1543,13 @@ public function getLocation(GetLocationRequest $request, array $callOptions = [] /** * Lists information about the supported locations for this service. + This method can be called in two ways: + + * **List all public locations:** Use the path `GET /v1/locations`. + * **List project-visible locations:** Use the path + `GET /v1/projects/{project_id}/locations`. This may include public + locations as well as private or other locations specifically visible + to the project. * * The async variant is {@see KeyManagementServiceClient::listLocationsAsync()} . * diff --git a/Kms/src/V1/CryptoKeyVersion/CryptoKeyVersionAlgorithm.php b/Kms/src/V1/CryptoKeyVersion/CryptoKeyVersionAlgorithm.php index 9c57752a752b..385b15e9be4f 100644 --- a/Kms/src/V1/CryptoKeyVersion/CryptoKeyVersionAlgorithm.php +++ b/Kms/src/V1/CryptoKeyVersion/CryptoKeyVersionAlgorithm.php @@ -289,6 +289,13 @@ class CryptoKeyVersionAlgorithm * Generated from protobuf enum KEM_XWING = 63; */ const KEM_XWING = 63; + /** + * The post-quantum Module-Lattice-Based Digital Signature Algorithm, at + * security level 1. Randomized version. + * + * Generated from protobuf enum PQ_SIGN_ML_DSA_44 = 68; + */ + const PQ_SIGN_ML_DSA_44 = 68; /** * The post-quantum Module-Lattice-Based Digital Signature Algorithm, at * security level 3. Randomized version. @@ -296,6 +303,13 @@ class CryptoKeyVersionAlgorithm * Generated from protobuf enum PQ_SIGN_ML_DSA_65 = 56; */ const PQ_SIGN_ML_DSA_65 = 56; + /** + * The post-quantum Module-Lattice-Based Digital Signature Algorithm, at + * security level 5. Randomized version. + * + * Generated from protobuf enum PQ_SIGN_ML_DSA_87 = 69; + */ + const PQ_SIGN_ML_DSA_87 = 69; /** * The post-quantum stateless hash-based digital signature algorithm, at * security level 1. Randomized version. @@ -303,6 +317,37 @@ class CryptoKeyVersionAlgorithm * Generated from protobuf enum PQ_SIGN_SLH_DSA_SHA2_128S = 57; */ const PQ_SIGN_SLH_DSA_SHA2_128S = 57; + /** + * The post-quantum stateless hash-based digital signature algorithm, at + * security level 1. Randomized pre-hash version supporting SHA256 digests. + * + * Generated from protobuf enum PQ_SIGN_HASH_SLH_DSA_SHA2_128S_SHA256 = 60; + */ + const PQ_SIGN_HASH_SLH_DSA_SHA2_128S_SHA256 = 60; + /** + * The post-quantum Module-Lattice-Based Digital Signature Algorithm, at + * security level 1. Randomized version supporting externally-computed + * message representatives. + * + * Generated from protobuf enum PQ_SIGN_ML_DSA_44_EXTERNAL_MU = 70; + */ + const PQ_SIGN_ML_DSA_44_EXTERNAL_MU = 70; + /** + * The post-quantum Module-Lattice-Based Digital Signature Algorithm, at + * security level 3. Randomized version supporting externally-computed + * message representatives. + * + * Generated from protobuf enum PQ_SIGN_ML_DSA_65_EXTERNAL_MU = 67; + */ + const PQ_SIGN_ML_DSA_65_EXTERNAL_MU = 67; + /** + * The post-quantum Module-Lattice-Based Digital Signature Algorithm, at + * security level 5. Randomized version supporting externally-computed + * message representatives. + * + * Generated from protobuf enum PQ_SIGN_ML_DSA_87_EXTERNAL_MU = 71; + */ + const PQ_SIGN_ML_DSA_87_EXTERNAL_MU = 71; private static $valueToName = [ self::CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED => 'CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED', @@ -344,8 +389,14 @@ class CryptoKeyVersionAlgorithm self::ML_KEM_768 => 'ML_KEM_768', self::ML_KEM_1024 => 'ML_KEM_1024', self::KEM_XWING => 'KEM_XWING', + self::PQ_SIGN_ML_DSA_44 => 'PQ_SIGN_ML_DSA_44', self::PQ_SIGN_ML_DSA_65 => 'PQ_SIGN_ML_DSA_65', + self::PQ_SIGN_ML_DSA_87 => 'PQ_SIGN_ML_DSA_87', self::PQ_SIGN_SLH_DSA_SHA2_128S => 'PQ_SIGN_SLH_DSA_SHA2_128S', + self::PQ_SIGN_HASH_SLH_DSA_SHA2_128S_SHA256 => 'PQ_SIGN_HASH_SLH_DSA_SHA2_128S_SHA256', + self::PQ_SIGN_ML_DSA_44_EXTERNAL_MU => 'PQ_SIGN_ML_DSA_44_EXTERNAL_MU', + self::PQ_SIGN_ML_DSA_65_EXTERNAL_MU => 'PQ_SIGN_ML_DSA_65_EXTERNAL_MU', + self::PQ_SIGN_ML_DSA_87_EXTERNAL_MU => 'PQ_SIGN_ML_DSA_87_EXTERNAL_MU', ]; public static function name($value) diff --git a/Kms/src/V1/GetAutokeyConfigRequest.php b/Kms/src/V1/GetAutokeyConfigRequest.php index 4bd2c559b37f..7995e8fa2885 100644 --- a/Kms/src/V1/GetAutokeyConfigRequest.php +++ b/Kms/src/V1/GetAutokeyConfigRequest.php @@ -18,7 +18,8 @@ class GetAutokeyConfigRequest extends \Google\Protobuf\Internal\Message { /** * Required. Name of the [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig] - * resource, e.g. `folders/{FOLDER_NUMBER}/autokeyConfig`. + * resource, e.g. `folders/{FOLDER_NUMBER}/autokeyConfig` or + * `projects/{PROJECT_NUMBER}/autokeyConfig`. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ @@ -26,7 +27,8 @@ class GetAutokeyConfigRequest extends \Google\Protobuf\Internal\Message /** * @param string $name Required. Name of the [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig] - * resource, e.g. `folders/{FOLDER_NUMBER}/autokeyConfig`. Please see + * resource, e.g. `folders/{FOLDER_NUMBER}/autokeyConfig` or + * `projects/{PROJECT_NUMBER}/autokeyConfig`. Please see * {@see AutokeyAdminClient::autokeyConfigName()} for help formatting this field. * * @return \Google\Cloud\Kms\V1\GetAutokeyConfigRequest @@ -47,7 +49,8 @@ public static function build(string $name): self * * @type string $name * Required. Name of the [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig] - * resource, e.g. `folders/{FOLDER_NUMBER}/autokeyConfig`. + * resource, e.g. `folders/{FOLDER_NUMBER}/autokeyConfig` or + * `projects/{PROJECT_NUMBER}/autokeyConfig`. * } */ public function __construct($data = NULL) { @@ -57,7 +60,8 @@ public function __construct($data = NULL) { /** * Required. Name of the [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig] - * resource, e.g. `folders/{FOLDER_NUMBER}/autokeyConfig`. + * resource, e.g. `folders/{FOLDER_NUMBER}/autokeyConfig` or + * `projects/{PROJECT_NUMBER}/autokeyConfig`. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @return string @@ -69,7 +73,8 @@ public function getName() /** * Required. Name of the [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig] - * resource, e.g. `folders/{FOLDER_NUMBER}/autokeyConfig`. + * resource, e.g. `folders/{FOLDER_NUMBER}/autokeyConfig` or + * `projects/{PROJECT_NUMBER}/autokeyConfig`. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @param string $var diff --git a/Kms/src/V1/ImportJob.php b/Kms/src/V1/ImportJob.php index 5cd518814331..8d5dafa50967 100644 --- a/Kms/src/V1/ImportJob.php +++ b/Kms/src/V1/ImportJob.php @@ -131,8 +131,7 @@ class ImportJob extends \Google\Protobuf\Internal\Message * 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][google.cloud.kms.v1.ProtectionLevel] - * in the future. - * Supported resources: + * in the future. Supported resources: * * `"projects/*/locations/*/singleTenantHsmInstances/*"` * * Generated from protobuf field string crypto_key_backend = 11 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { @@ -193,8 +192,7 @@ class ImportJob extends \Google\Protobuf\Internal\Message * 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][google.cloud.kms.v1.ProtectionLevel] - * in the future. - * Supported resources: + * in the future. Supported resources: * * `"projects/*/locations/*/singleTenantHsmInstances/*"` * } */ @@ -573,8 +571,7 @@ public function setAttestation($var) * 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][google.cloud.kms.v1.ProtectionLevel] - * in the future. - * Supported resources: + * in the future. Supported resources: * * `"projects/*/locations/*/singleTenantHsmInstances/*"` * * Generated from protobuf field string crypto_key_backend = 11 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { @@ -591,8 +588,7 @@ public function getCryptoKeyBackend() * 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][google.cloud.kms.v1.ProtectionLevel] - * in the future. - * Supported resources: + * in the future. Supported resources: * * `"projects/*/locations/*/singleTenantHsmInstances/*"` * * Generated from protobuf field string crypto_key_backend = 11 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { diff --git a/Kms/src/V1/resources/autokey_admin_descriptor_config.php b/Kms/src/V1/resources/autokey_admin_descriptor_config.php index b349e59725fc..2c6e597d4d50 100644 --- a/Kms/src/V1/resources/autokey_admin_descriptor_config.php +++ b/Kms/src/V1/resources/autokey_admin_descriptor_config.php @@ -135,7 +135,9 @@ ], 'templateMap' => [ 'autokeyConfig' => 'folders/{folder}/autokeyConfig', + 'folderAutokeyConfig' => 'folders/{folder}/autokeyConfig', 'project' => 'projects/{project}', + 'projectAutokeyConfig' => 'projects/{project}/autokeyConfig', ], ], ], diff --git a/Kms/src/V1/resources/autokey_admin_rest_client_config.php b/Kms/src/V1/resources/autokey_admin_rest_client_config.php index 2b0b2021b53c..7b909b221de4 100644 --- a/Kms/src/V1/resources/autokey_admin_rest_client_config.php +++ b/Kms/src/V1/resources/autokey_admin_rest_client_config.php @@ -26,6 +26,12 @@ 'GetAutokeyConfig' => [ 'method' => 'get', 'uriTemplate' => '/v1/{name=folders/*/autokeyConfig}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/autokeyConfig}', + ], + ], 'placeholders' => [ 'name' => [ 'getters' => [ @@ -49,6 +55,16 @@ 'method' => 'patch', 'uriTemplate' => '/v1/{autokey_config.name=folders/*/autokeyConfig}', 'body' => 'autokey_config', + 'additionalBindings' => [ + [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{autokey_config.name=projects/*/autokeyConfig}', + 'body' => 'autokey_config', + 'queryParams' => [ + 'update_mask', + ], + ], + ], 'placeholders' => [ 'autokey_config.name' => [ 'getters' => [ diff --git a/owl-bot-staging/Kms/v1/proto/src/GPBMetadata/Google/Cloud/Kms/V1/Autokey.php b/owl-bot-staging/Kms/v1/proto/src/GPBMetadata/Google/Cloud/Kms/V1/Autokey.php deleted file mode 100644 index ef11d5b06ac3..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/GPBMetadata/Google/Cloud/Kms/V1/Autokey.php +++ /dev/null @@ -1,65 +0,0 @@ -internalAddGeneratedFile( - ' -â -!google/cloud/kms/v1/autokey.protogoogle.cloud.kms.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto#google/longrunning/operations.proto"¨ -CreateKeyHandleRequest9 -parent ( B)àAúA# -!locations.googleapis.com/Location - key_handle_id ( BàA7 - -key_handle ( 2.google.cloud.kms.v1.KeyHandleBàA"N -GetKeyHandleRequest7 -name ( B)àAúA# -!cloudkms.googleapis.com/KeyHandle"ÿ - KeyHandle -name ( BàA: -kms_key ( B)àAúA# -!cloudkms.googleapis.com/CryptoKey# -resource_type_selector ( BàA:~êA{ -!cloudkms.googleapis.com/KeyHandle?projects/{project}/locations/{location}/keyHandles/{key_handle}* -keyHandles2 keyHandle" -CreateKeyHandleMetadata"˜ -ListKeyHandlesRequest9 -parent ( B)àAúA# -!locations.googleapis.com/Location - page_size (BàA - -page_token ( BàA -filter ( BàA"f -ListKeyHandlesResponse3 - key_handles ( 2.google.cloud.kms.v1.KeyHandle -next_page_token ( 2´ -Autokeyë -CreateKeyHandle+.google.cloud.kms.v1.CreateKeyHandleRequest.google.longrunning.Operation"‹ÊA$ - KeyHandleCreateKeyHandleMetadataÚAparent,key_handle,key_handle_id‚Óä“<"./v1/{parent=projects/*/locations/*}/keyHandles: -key_handle— - GetKeyHandle(.google.cloud.kms.v1.GetKeyHandleRequest.google.cloud.kms.v1.KeyHandle"=ÚAname‚Óä“0./v1/{name=projects/*/locations/*/keyHandles/*}ª -ListKeyHandles*.google.cloud.kms.v1.ListKeyHandlesRequest+.google.cloud.kms.v1.ListKeyHandlesResponse"?ÚAparent‚Óä“0./v1/{parent=projects/*/locations/*}/keyHandlestÊAcloudkms.googleapis.comÒAWhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloudkmsBT -com.google.cloud.kms.v1B AutokeyProtoPZ)cloud.google.com/go/kms/apiv1/kmspb;kmspbbproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/GPBMetadata/Google/Cloud/Kms/V1/AutokeyAdmin.php b/owl-bot-staging/Kms/v1/proto/src/GPBMetadata/Google/Cloud/Kms/V1/AutokeyAdmin.php deleted file mode 100644 index 9c621b31bc3123c4ac0c3580d055981d2fd51848..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2989 zcmb7G&r{o05U%(&@CX?Y&EUAx_Ms$$Nx&YQOglB98QB($3fLao(1!7hN0y&$6z2x3g_dQ9*CU$B#fRJ{-{dV8CyYKl6r{$mr zc#l}b)hMas+6AU9f*seUwr-oa)@d||i*>v07$$M!7-#c1moH-_tCm;6)w4UUPExpO z+f9=sbkpwC6Q^x2akiDvI@CTT7gep^Hmo?uM99+G#B(&A;JrfnkWj6zQLVDa-76X9 zUfFMZmE)~#gmhE$JS_V#GDAU^2*Z!lshNh3J*rXo^U(0BhGkGgGmUQ{i5=X~OpgG- z+qR94rBlPUFmuRTI*F}gACuWWbZkg^2ZwwLtPW6vifU2fTAEqO5>IyxhuUrdOjD^Q zp}p#{H?j2~EQ2!|IOcOqrQRaBgQ?pg{n0UY3GKMnHs{R%y1l2$kZQ?}QIRdnW>v5) zFO|B^=^A2`W5zUyMQ`V`YY?-ZCN1sEu-)6a7D=F#u}Su7&!Zk{-s$j&{LD5#H-ZzA z>-FA&?1E-vy%Ms5uAw)JsIoSuTE%7GFwSKi2U*9@wxTP6x8@k2cUDDT+tH8vJ~UXV zsvdAvwecAkve6$rIu;G~eOyRTeZd!M&rQcgQQ=I}Pq79ix>!LI>bN zM%!qLH9O}qm)?XJ|H_p$^oSRe)zT*hW%S}OU=jl$(ht*UVc?CpG=K-3XT=DbX9EVv zeNA-AInOa(g7_Rwv(6)tDahk)G8X31f0Bb$h?kf>^PXg(U@|o$GvFKm67)e|s46=? zv%~tX+P3Q?GRwnkj}c~{T!6G0U)B>o#vwp(-qHn{<~+oEXsJ||%S!bqS1KqObyrog zi|>gD&B&RudaNu8;tE>cS6)^N#rzjard-V`2TB=?CV>9JQBKXNWmP^=^Eq(KG3Y7jdjUm8krSUl*YpDvl~VrTsLTKk^Vyp$@1uKJ*bo`upRM+} z0qOVABJ({eW|WXQFusFkvua6BA2711pM`(qAB8cMB7W4c%{p+`wfZ!_pl&@X&bioZ;t7f=ijd;eiD*f>{@U+XcuQgVkbPq$AgF0O@(I@ zpq^xt$&nzvgZ@7h@pl0&-ke+F#?Z>#G`me%zPgh64CMLmixOx4&U{ZEi4U%=MkXY_ zhHWrfD&i+YQyJ|LCiUs9{d`SInJYQaKhO1<=%13`5HtNx{JZC-V`{WvyX}p!%wY|sU!oOQKf@AFFZFj6G%2+U!pXY7 zL&CKRo2zN_D=*Lic>|3BvX%j-mqEUD7k zG);Zs(Eb7Rf9OoFy>xo%p_dN5wYN;C!!SKD{R=qt?P{e+wgL`t2%7cVr|*65y>FlP zqub7wgD%Mn#3HUnNlmWq$aIUyj%!m}w@ta)tk;Pv>vqF2OyXu`d45G+URjq*^LN)T z!dB02x;iPyo3_1alALbZ&021|;pJM>IkMeQJ>s?uon*O3ge*m5u2cgmhE$Jh`;pSo3|LT_nRlr&%=(UG}I(;lIm4?OhkUav?}aS% zLbf%X9ua#r$ABhb^!qK5z7YAL&Nx=9f@EPZ7BO%Ilj5hK>v(fPspfnK4dAQ8duTxe zQhbBVPZAniGCT@xRTM|FuVKm@qn?&`XEk{$Z`{-QXQ$@lf2=R4lZxd^@kGthR459wIVM42o z9@$@f2OYQF8gbR?&gju_IrFWA(n+X22YP|v8FZRykG>xe;O`qB%x47LSZ=bh*a6^a zi+n}Z2ucQj0AqwG^qc92#E>7&Y@m?^5+^Ur8Q8c)ywOHc~mMyKMx^Cb1e9e0p<4AAd8AneJ|yZy7; z>fJxSfd-r0y~+xmLm$kigUkk%o(-kLN41QG!c5hT&49>Tu`Gr4{qiKi{>*n08jeO8 z^N9q5u*ma2m_Hxji>iXCJh1Yqf4#_lO`*Xeaj8)^peYG{8y$1ChbnXpfAG7PLwojt zLU6YqKnvLvgsg76L}ijQ+Rt;`ouyEu{hhbaDYjFq!yEjK$9mhCMkis^fGI$=nvE(1 zbR6~xI2RE1wzT~FH`TgfZ4%dULG(ulLW9h+qv&L;&G6Y+S@57BIXZ7h9~aYvq_XP> z=pH&NMj(}mx7i}D2V^rb%Dwv~}2F>o+BZAJtUZ=j)VvI7laf#xNXUJ)487QeHfYIo+2i*M}PhMICTT(*$3CIKdjA$d`?CxWwNtE z@DCC?6P}4eaqv_kluok%cn&orOHv#!n?QlrRn9WZn`i4}+KP zL5=%NPR08GCZ&!Q9@Bj0HP|n7Oj-CD#26hYf`lZ;m|%IB7+ZTvIv(3pWTxU#t>qP7 zQ*pEGp%T{>Pd4yK9lxt$YJ l7%YmXcC{Z|Qv1ED;WfyVe`giB;yUnpi(C5FP;Jyk=zq6|?D7Br diff --git a/owl-bot-staging/Kms/v1/proto/src/GPBMetadata/Google/Cloud/Kms/V1/HsmManagement.php b/owl-bot-staging/Kms/v1/proto/src/GPBMetadata/Google/Cloud/Kms/V1/HsmManagement.php deleted file mode 100644 index 4cc28eb6a3e3b5eb30777141c637f97eae28f1dd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10694 zcmc&)Uu+yl8SkFs{Q2yr_N1wu3rRNTv~i4c*SLj{%b#X#pB*=j?VO!NREL)J-T1uC z-tKmHFHRa<1QL~a1_>eYL?r~g^UMQ6ND&eeeL>*`Pr|DH`QLQ^p-J*r6>g>|w9U2%lBQPqnT)r~JTXZpHnn}KOq=7;FUb#=|Ke2N-&k6mlp)xdOYl?g1`RXTb>6*}42bFPDK zUst6;ODqx?h02^AP|r53$~5(>p6LdTw}eBB#X1e5__1F`FND)Fb>^BnDr_tkcNuwI z4ZJ38on2Ku8Z{*o;0^+JsAU&5CB*4vT_g`^DmxPg^SD1g9($)6$vDj7hE9 zBwaTinU2?)Xqkq!lG@05$F6%#+cxcbWzl67+L@D4?xveUHod`-Cq@KDqB5GnUK@=P&&uFD{P8x7rfo8EOpMI)cFbct<{w?k4u#@| zYhs_W+>4gXo@sfo#uBWrh8YeAoM;)~g=q{Qjf9V^ty~qHC|BX2)8QbF0N6~0T9}aV z`N^HnDGPb{P+AuW2Qsc=K<-zEU}za@#G)(IHtYc5V$R0EV{4N^IKc2`SW%VHBa=OU z(+-ojp|9#uL_3`+8qVO8zKLvJm>^W5iTNmdOsa>>KricKI^2Wfk4{X;@vRZg$5@eH zW|BhBUFiFu>3GeCZZw1S;RAg3%N=RE%jGo`XDTzyp>Qbf`C-L+?VaX?t`H^SMrI zy3B~)v;))9Yo>3kT6FjzS9U_$Cv%XO9VMLl8uW((BBqB@nUMVmV9OVB7G4by$SmD( zahgZe)2j{|!&BEQJUs_P9{r$cdT8*DQ7nyoR1c|~hitIn=xat5L0T6ph5nE}(Ouf` zF@Zgz6nb*MP@tFRh8%~%TUwN>o&uCLCi)CHAw{lA_muBadSIRhYabX}s01o2Ax%;Jo9`Z6AnVwtLCg+)w z15Bm(iWBtmZ>9MXpWq-dJXe@(lvy=jZGjMFr&w5GLrPr}hP!?c1wJIB$^jg{1KD0l1uNt&0JrJYL$e0b32neB zkJe2ev!=Iz2Lova9sclPu4kdkcnZxc8_o;|B?jKNQR}S?`JMtf37+x2Hhkm-(m5@_ zJf`i?hVQ~zY;VMSJ;4It7L>aRK#6NlG$35U5)9~j0RyJ_0vT_B0fR=ZCfle%8>`eC z?&lLucjYnCIng(FxGoHG9bWZl0~fX(v%Jh_neA$pGFP}`B34o1!k(1RK|XJ{0Ks`f zY&^4{C@`=SH%P+r&G=ckd|$?G-@0L0)UHz>=~)lbv(s&(GbM)!7V;*HgruO>+QRYc zfA(_)PA6j>xe3Q2tZgw%NpDty*Da*wMzngg%)+S3{yKjkB0t&p;Y2w^yj{4IDpi@i zm=?<&UmP=86;3CkQ1%R*N<;}ZAhCcN308m_lBIBT*~zTIm-sgCuZAA+a_VBrrD*MRM08DH!n0x{W)QHrg^IL0cyG7X?PUgNvT!z_vl+j^Z#cFlM3M2nKUa8e|?-4?`0hZ#hU zw_P7%!iK)RV$;U~7DePBPa(lQm)L^xXt14rZ|;3KJ4@p-AQMp9cFb^@hyPN?+qK+h z7?de~HW6dGobLq^J_e`a@(}tz5JzqvL*($pul-K0BSZ6o;c}ek ziNVeJ4;A=|7oAaU+nkHp8LIS6R4Q$=-`VsmUhFKab(`L5OtuVtEhdsF7>w2+Jiu`A z3|Io_NLzEZFJ;`t>~9pt8)GIW^N@|af8n{vyD%JPZnrM6F-UFqB!PhzHt@u9j9TtZ z$fu3CSdDTY!Nt;JT5SgOOQ~gMaoYJqi&INPVDWDSzM8N!OSp*G$G&0im&HYXtH5|V zheJ-X3g=SbyzH&6fW9-5vI*mfdn1`M*0_u??k~hod~zIK-u9A~`~zVyA*4R}Mq9v1 z5(#b3Ug<(I?1ekewU8)(|I^QYl(|8!vDeg31$Vyg%CqvZmNW9P__J~HCk3+c%PRSL zTSMaoq=Oxi+1%~t8h^#L%_H{CE5@JrqyDi?^7jm!N@NzKee@G$q+h3GJX+or=A-wz zxqm9pw43p7^3pNJ=h{0Wo8$2fn(zqu9FOCBxfiO8VghX@zwFtA{mNz~nhe;s_Z5k; zma-{h{ z9VdwiQaWK7q&-mN_lP3j?vx~vl%z^hq*ln?&!|#CEm>6mi--8}ONDH6a-(g@>@6sx z*%dd*J!lQUyF_&5K9m*tIFooPB;EGO&9;6g(1%D=dfpyf(`g7>?VH=_gbYL?ok#~y zg!9>92m)-LG%F~WCkL_EUv%xcMDCRKw&)S3aAaMO+p|G*B z5gHcVb6~Gy#U+S~u4M#kj@KAZH5^a9CqGtT2ro-WXImH5NwST;VzC6ylJedKF($kk z#4cLY9e%kH4MO6GO5N3~{O_+b$7cBr#{3k!!I-~|cQo!_dM1CZgclq6%|^W1xO$L> h`mOWPC9iRD7qI2(AiHj4R@+<~IFe@Oe?Vs(RM5=HYL)Mtk7{XAPGsd_&@+kvQkZUAP|xelLQ9@ zl_(h4PA zV}FB^?&k>U{#K*Czms~7kXbj{ZAs%S(AP+U|5}}cx@}5r&+y=%`*s`KP201Ly8RVM z|3W%6>TL_CFXJ9|nx3bd1G%PC$!4g0yPG<$Fe>^&@C^ zU8B{q+;%uAy}TzM+5T0@wOVj9>tMC>fi8(=AEJN0K==AES8;|RC8&ESc@MbOBWb*kCTBXJrH5^st} zq{w_M8~v9Y6_?SN>002%m@tkH0AwsZoAgh?rAh|(K&dju_wr}xEoR9dhNxp{aJ11@#9?vnwJ9WVtjLUwEgh&yh}X@@4A@d?;} zl&LU_W^3T$u5*gp=CM`l)U6ukP7t5G=6sCD10LKbCxuT)a1S|Nw^!bVvb65mE**CIzA7H^^%P2R=5 zTt>tZ6fMa)Atv5H(?kHkkX3!VC|3)WvVbyQe=mQD=C1Pn;54HC6TE+sT_-3UV#4{= zo@Hmybl?KqToT_!P(0Yzck{q%KSBcW3J62s{J3tNSao_Ilj-}Rm#hZJMS?5tqL@)X za$MUxZuqg{<50q03C=@?FOtmJ5K|dQd>chK;eZwJWEurz&m*ahh$-r5_|S11h8G_M zdz?&v6uRRT)X6SR>y!)GFe<)P3kwuYuJK|qLc6RM9+1Cw3ba23({n0O0KvmAm=!>#$C0SdZ<-u6K)1Gb^J z$Vj6Eo_LL>FP)dTkX)@QdX*Y2Uax2+x!U7Gar9PB-YIOC@J43c)IX zq`M)5iNDl;_!*bJ0G(@hFCzt1;*LSVK=!Aus3o&4lEBZ8GcFPy67*Xn!vnQQmFiIATHKX(pjVmmLvd;pb&q^&-Vo%p5j$6G@8pdO(u3#JF`uxQys@zy!TXJ{^<=nb#fX%R1N`?>UKs4*!1 zem&u~!brtC5a%ubd{*5)vJdK3T!j5;)euem7NJ|c{u9Jk@iCh3%Ah-nrbFt&a&e=g z6{?%1o}uNHShToI+!=qT^J04R7R1!Xv(rURk9JGkk$y!jwqpb30uG5!4+9iFC1(%6r=lSu~3Ze!=X1~kmF7B%|L@ci@K_>J5a_GjLU}{@m{hFlC(MHYFAvwhye#BHmRDDV zwUFhtXM!T$Mz=ThG z>dFO_TnNhAvkNF2i9ZaW8@%Cy5Wd48oCQi0pq%4_1ixn6v8^w}{fFpY zh;nuc%5G1F7)68Y+r^>~$$S&}Uj9=A&0pL8@Z#_*$c{gD269ywbiVHIa-m7WC#>5) zOKhX5+_7c8Zg(0DtCokcDO}(n8K2TdW}FNZOxJvxHlg}wc>XBm9iFpEZYLwnB#bmy zmv>0}n)uxiim7y@3KbpLN3>-%{1#X1ZkEU_X)^s&%S>?*A=m&jL8;(l={Lzo&Pbw9@^nRC$B0ca9jA1S2U<1z<F`Noudd<#Xx3sKVc~+eu<7X1HFriw{xCicjFhqZ zxti4QIV0&gyXTCv5}Ljw$b~qW_;&=2ciR^!I{btP)4R<|z9#|sH99R~gW?dAri63{ z5nd!xcu*V$@Bv~q=(r&9_W?AeSsnz38h_%0Azk-75yU>2AC7{NO~V-U$cBea zm^H9hS|%v-vRO32m$7%+V#BZV8Ar{kTl|@+zqpn8BjlprN6`MmtIDlj!MFO&Nbq#p zePXy&eD8(LchAgaC)~ma+rm*C^ zsh3!C=7lUIX911#zwnNlgF+fAWI%-Wrc7oPRjA6#Rbgo1yC@p(zELvq*A!WYiO0n^ z0|+9yZM|A4DH<-63)KQN0eP%%tF$POkhajDgLFX^ZKseUE(g%+W8tX9hK8Uv3raLIYr zgurA;fwl&LB<}?R$lDOdwZf;M;@yh2wO*|3Vx4M}^r~ao-$c+&cq|Qb(CjpP(7>Is zP3+52BcDEERi^(kOWs+J9Qx4&yt~486Yvh(I(Sb1|INV62K_uDnIoS^B!OFUC-o1$ xy6=BAK|h;-?BHd3`!W02pzGU&HhGvZL%vI(nC$C;GjxW~{{S^MbBF){ diff --git a/owl-bot-staging/Kms/v1/proto/src/GPBMetadata/Google/Cloud/Kms/V1/Service.php b/owl-bot-staging/Kms/v1/proto/src/GPBMetadata/Google/Cloud/Kms/V1/Service.php deleted file mode 100644 index 6a097024e24b745d3fae6c829e06ee45b0c110c3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 17709 zcmd5^TWlOx8SdCkVjt(`<0N*ROE;6Wae}j(IJb5~8m)70b1`X~&}!T5c=yh zGwalCEpcfD50yZw!~>`jLIR;m6(AK}ctJcM5d?_KlOIrpD)ELYc!BZ&|GCa(&+N{w z9iR`bJNutA|KS&&)f{e3j(NRi|0W-K}}K#bY^-xQlj~ zWZ7;A)vX%w8djNPF3(I~C%#p&e5-hwEi9g=3yV+JyyER+XAmk^Eziq5!#6;0pbY%e zXwFvca>ny5AO3T|_DXi$_HCDi2AWrhk5f)}sWed5-wYViW`%C6n;9d`yu^Z9w=E0xhF6NkiW>2~&9W`gsW z&$lpnHsiZZ5`KFo;}XB=*3U4$=?2T{ucAg#g@#=$)awq_f>ZbM`9P*%i=>6;t2U|o z-L1J~lWJv}ELe-S<94_777_4B&14t`MY+5SA+I_0dAC`w+x7Y4%?1T^cS=&W2hCrs zHTKCTrl{d=JpM@NgE3^a1h_WY;G z(k+0JcZN1EJV%RHSq!7 zfd(7aJSlk)t;YIb^}6Z)j|v7JMTkB3ox7wy*3Y(OAB>>&b9NOX(AdMl!|iCmaVx|v z%`T0tQ;*Gm8)!S__q@9VQ3|+L9G{MHTs+8F-iIDxMxfS?aV%u+p5Ym^aS@;k4p&;V z$vwvQ=Bd2cKLW3;V)Qm&(emIn?0^Fm1hV3=3f2cI_(C7r9Z`YUS!p8Cc1em*Ja(^& zE9l|>feHY%3Jp3`(CQ+#Q#b7Nn@^$P%S7fO=@%!_!?c(dNhozlH*cU3*i7L>Zg)DeoyuuR zKBm^2#UdIHZzzl{_kA+5?@{KwhtWjGeZ@BBcOeVI_A{*Rr+y`}@GAGkH_$LYOHiLG z%{gw(@>xpWJeAd2P;rn|e_dj$SPBfxwaWYLsXMAIF{@RQ{^C4O&>mv2IMEKw&@Tx*&_4T2HL?{ zR8W&l_MXVb(WX!ki*k7y4xB2;3O@BgMKQ$1dlc>Q?%EA`5S6j9RHh1sLWtF91Lk)i z#Kr`Qxk{q)J30%#gmA#T8Hw zC!3%2p*`Gh6w|RctU|HZw2I{=Cj>L&(?S=)4BtV6R(0NSZGWLAg3UQ?u!&33QW_WJ zHXMU+fUs3c49*ID7`&1nYbrF(jSWDhv5_t@u!%-o&nj8OD}^a&kQ)lSzl@u*1`{ z+|X1ihd+Uanrur@h<8_b*|@Z$JaA@J3xIR-9{7KZlNe0(PRtqW!ijNj{C(L#2V(rq zxOUBQmtt&onbH)L0dd>QD#FSj6*aW^GTIA`Hs5uY)VkQ~R~s(i4NzD^8!te_8o%M6 z2HJeF&P0`7F&atOgRBbbN5)}xHmO>)ne!SiKbY_J;lpT;RjEK{(}CV&$!bDFwhkRn z+Mg}amMQZA;mLWlwITO_tW!QdRUX^G;Jm8^l+eyRb>g;FZ4w>@ZlD8g-y`>DGd#BDWriSF`ag3K1i{j`R6_~e9O8Q z1IKU#9IRxbjUs7M7GTy07W6otg3;81r&T1lzUtGnq6pl-3_dtUH78(v3GLR>NTa2M zwD}LN;3Qa zq3s24sa7MtYnPv~=j$>6t}<%lqiB7_o`<+ClD~>XtTq-6>+A(a!Xw*hw27~f_(_X> zKnjbnA!wdNL-di{DWzJ?9~x*ZP)7`qtJO#py|jfS(56LJO5x3KLhib5t*PmxK56Gm zuo%-PWj;kzGCwxZR$va&wLQ0Hjes>{4{t^NHLJ|3Zz1Oigy4yUP0CohrNyZRCLvt}lR) zWw&+sNvL7q$`z6VR6GzV7fF?Q`sOKpKW#=4U!%0<+kI$@N~@wzxG|hpY0EVz1b9xx zr*y?ZXIH`d(9T5)LK~_vm8ZjI9>6Ej5k-=!!lL13K&uBDZqn-EM+VxW0*%naaJZPD z$BB)=U2Dlm5z*cYsqLB`m6;z5n1%E_QzfS5`GbCh!&Q-BJ8Ce__nxFWg29=!)q_OK z+Uh;qxX>XdcJ}7>FyZ#@8YUDB1NaDfRH3VF(S#Ve^aPs62elX*?808(?_>6Qa4=hC zFo1*RxYADG^U^;lG<)z*YVR%-&&+H771|F$1;7iUz$-l{kSv({;7xqymFkh?HicL2 zMLU$Z(UOOHzyOxkr-BdS-Dq1t9V%+Ld^*)rQPTSIFAcOa5ct7Cq`ir`+&WphiAz6) zSPJDv#A;HPG#m}$A)fJh@X1Azedqj{XbBEb9rx5mX)W?!hs8iPi15+nYv5IWtm50QWbkSof`Dv z#7H8BE1iwuK><7=`)!d^X_!P5^W%q7P;$eYXIBcMrT(QqeEe=-7EjW-$~X87(pjjQ zUxBLG%N@?iLL2^G&Ox`IO)cRc!-+0(weR7>i7!`8S6RT1ebr3}fIY+WHFxfr#|DSV={RhDxiTBzY7 z3{yu4?$^Pssh8l#w5$gNlHs=FKIWN~0=p!Q_$eLINbu4y^jR>07b*`-2qs|?$yJA2 zEAvX2FX@!&_==(!|B6pzC?*A%aV|-JaZ1T@y8A2`E(x!DZ zs)3GVohuS4fL`Z{%$y4|{ye_JP`Xx(=NfVxM#4t&EP6a{c9rGxYQhHp7EUd(ITNhU6)`Hwy&l=hkxgf%@Q7f)99-wxmC4}$ zm&A(OCdu5C$>*9`Gs zIP*Y9FH)c;*fT~Y<=rD=b7+`8tG*XuzHz^B6m948-+b~NM(MNcdk;9N01tcEnZw-7 z?L15tqfn%BkbqOsDiy!g*D`R_-n20pW2WsO>Nkx0h0{s0b~puuMZS5M+r0;o1NjB( zObveog!8zY65)DcY4MZ@FEJ25Z$8_(f(lhCfduTFq3kK;$@9>khv9}G6mfoG8a)BJ z++!7$6ht426j?YF@wd{6V3;VG4F0djP{cQ&O1i3YJff*|x$@T!k0Iu3=Oka0C~*pDeEx<=|qkLv&hiz|h3YS&Oo zl~Mz`84{i`Z}eJHF6TL{qP$Uug)=vVeC_xZKCTrvfm#Zh5)AX<==y^BT(6Sp&0FCT zNdXh4zY+vYp#HxS(B<=NRKO1nv_ag1;{95SsasO^ZMJcJO|6K6UdUz!NOjvO;_7s- zrUJJkd`3>PEiMZZ*j85w?budC0oz-+AE`Mq#`h(&&@11|`3fIzqijPf1O+#j30;JM zK!T=tP-~emp%9?V*nQFbe6Q^4J;GHpXdx-2{`I{OU`}b5n;=;VMfkv_5O1PVd<1>Y z;O2>5+9dQjqeRjs`Xf@DRtVHwDGV`O@#{8bBnz4qYilJdGD$^c`~>cF0+yt~j%d-; zLMJ8FpSm^VLfAJ~3R)+sn573LZ^*3RVjILITtZ|}S9I+ngCY__RaXjw+=6fg%Ivr1 zX$Nk|C<>|Feq*3P-~eh47+k{oq^LfZcGCM{h)js$t`s&YQ6}N7Oq^oTT-%;g9(Lve zP>FtFpdql5oKb>rV`@PdB9UV0??@tqLNH$FyktJVwlJ#%Y*R`8!djXw15Al6%@#^2 zn7;kp=1R}3trQ-Umo}5(p{U9DEEF^8lcJ#_mn3wRm*J-=T9^b$$Nl?-QC6$Ae&PG~ zg*ywr-|+Ie+`W7Egelec*Xj5<|5cA8kpF%9Wx2^z4B$f9v$Rz zW{ejO@hV#MA?UZ}=N qh_K%gfgci?T~C$i96zXj7-5qC{zmBMIud`XgHiII)L2H#2>l29qiY!e diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AccessReason.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AccessReason.php deleted file mode 100644 index e0735eb23c58..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AccessReason.php +++ /dev/null @@ -1,159 +0,0 @@ -google.cloud.kms.v1.AccessReason - */ -class AccessReason -{ - /** - * Unspecified access reason. - * - * Generated from protobuf enum REASON_UNSPECIFIED = 0; - */ - const REASON_UNSPECIFIED = 0; - /** - * Customer-initiated support. - * - * Generated from protobuf enum CUSTOMER_INITIATED_SUPPORT = 1; - */ - const CUSTOMER_INITIATED_SUPPORT = 1; - /** - * Google-initiated access for system management and troubleshooting. - * - * Generated from protobuf enum GOOGLE_INITIATED_SERVICE = 2; - */ - const GOOGLE_INITIATED_SERVICE = 2; - /** - * Google-initiated access in response to a legal request or legal process. - * - * Generated from protobuf enum THIRD_PARTY_DATA_REQUEST = 3; - */ - const THIRD_PARTY_DATA_REQUEST = 3; - /** - * Google-initiated access for security, fraud, abuse, or compliance purposes. - * - * Generated from protobuf enum GOOGLE_INITIATED_REVIEW = 4; - */ - const GOOGLE_INITIATED_REVIEW = 4; - /** - * Customer uses their account to perform any access to their own data which - * their IAM policy authorizes. - * - * Generated from protobuf enum CUSTOMER_INITIATED_ACCESS = 5; - */ - const CUSTOMER_INITIATED_ACCESS = 5; - /** - * Google systems access customer data to help optimize the structure of the - * data or quality for future uses by the customer. - * - * Generated from protobuf enum GOOGLE_INITIATED_SYSTEM_OPERATION = 6; - */ - const GOOGLE_INITIATED_SYSTEM_OPERATION = 6; - /** - * No reason is expected for this key request. - * - * Generated from protobuf enum REASON_NOT_EXPECTED = 7; - */ - const REASON_NOT_EXPECTED = 7; - /** - * Deprecated: This code is no longer generated by - * Google Cloud. The GOOGLE_RESPONSE_TO_PRODUCTION_ALERT justification codes - * available in both Key Access Justifications and Access Transparency logs - * provide customer-visible signals of emergency access in more precise - * contexts. - * Customer uses their account to perform any access to their own data which - * their IAM policy authorizes, and one of the following is true: - * * A Google administrator has reset the root-access account associated with - * the user's organization within the past 7 days. - * * A Google-initiated emergency access operation has interacted with a - * resource in the same project or folder as the currently accessed resource - * within the past 7 days. - * - * Generated from protobuf enum MODIFIED_CUSTOMER_INITIATED_ACCESS = 8 [deprecated = true]; - */ - const MODIFIED_CUSTOMER_INITIATED_ACCESS = 8; - /** - * Deprecated: This code is no longer generated by - * Google Cloud. The GOOGLE_RESPONSE_TO_PRODUCTION_ALERT justification codes - * available in both Key Access Justifications and Access Transparency logs - * provide customer-visible signals of emergency access in more precise - * contexts. - * Google systems access customer data to help optimize the structure of the - * data or quality for future uses by the customer, and one of the following - * is true: - * * A Google administrator has reset the root-access account associated with - * the user's organization within the past 7 days. - * * A Google-initiated emergency access operation has interacted with a - * resource in the same project or folder as the currently accessed resource - * within the past 7 days. - * - * Generated from protobuf enum MODIFIED_GOOGLE_INITIATED_SYSTEM_OPERATION = 9 [deprecated = true]; - */ - const MODIFIED_GOOGLE_INITIATED_SYSTEM_OPERATION = 9; - /** - * Google-initiated access to maintain system reliability. - * - * Generated from protobuf enum GOOGLE_RESPONSE_TO_PRODUCTION_ALERT = 10; - */ - const GOOGLE_RESPONSE_TO_PRODUCTION_ALERT = 10; - /** - * One of the following operations is being executed while simultaneously - * encountering an internal technical issue which prevented a more precise - * justification code from being generated: - * * Your account has been used to perform any access to your own data which - * your IAM policy authorizes. - * * An automated Google system operates on encrypted customer data which your - * IAM policy authorizes. - * * Customer-initiated Google support access. - * * Google-initiated support access to protect system reliability. - * - * Generated from protobuf enum CUSTOMER_AUTHORIZED_WORKFLOW_SERVICING = 11; - */ - const CUSTOMER_AUTHORIZED_WORKFLOW_SERVICING = 11; - - private static $valueToName = [ - self::REASON_UNSPECIFIED => 'REASON_UNSPECIFIED', - self::CUSTOMER_INITIATED_SUPPORT => 'CUSTOMER_INITIATED_SUPPORT', - self::GOOGLE_INITIATED_SERVICE => 'GOOGLE_INITIATED_SERVICE', - self::THIRD_PARTY_DATA_REQUEST => 'THIRD_PARTY_DATA_REQUEST', - self::GOOGLE_INITIATED_REVIEW => 'GOOGLE_INITIATED_REVIEW', - self::CUSTOMER_INITIATED_ACCESS => 'CUSTOMER_INITIATED_ACCESS', - self::GOOGLE_INITIATED_SYSTEM_OPERATION => 'GOOGLE_INITIATED_SYSTEM_OPERATION', - self::REASON_NOT_EXPECTED => 'REASON_NOT_EXPECTED', - self::MODIFIED_CUSTOMER_INITIATED_ACCESS => 'MODIFIED_CUSTOMER_INITIATED_ACCESS', - self::MODIFIED_GOOGLE_INITIATED_SYSTEM_OPERATION => 'MODIFIED_GOOGLE_INITIATED_SYSTEM_OPERATION', - self::GOOGLE_RESPONSE_TO_PRODUCTION_ALERT => 'GOOGLE_RESPONSE_TO_PRODUCTION_ALERT', - self::CUSTOMER_AUTHORIZED_WORKFLOW_SERVICING => 'CUSTOMER_AUTHORIZED_WORKFLOW_SERVICING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ApproveSingleTenantHsmInstanceProposalRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ApproveSingleTenantHsmInstanceProposalRequest.php deleted file mode 100644 index 73099685d70c..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ApproveSingleTenantHsmInstanceProposalRequest.php +++ /dev/null @@ -1,188 +0,0 @@ -google.cloud.kms.v1.ApproveSingleTenantHsmInstanceProposalRequest - */ -class ApproveSingleTenantHsmInstanceProposalRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The - * [name][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.name] of the - * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * to approve. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - protected $approval_payload; - - /** - * @param string $name Required. The - * [name][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.name] of the - * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * to approve. Please see - * {@see HsmManagementClient::singleTenantHsmInstanceProposalName()} for help formatting this field. - * @param \Google\Cloud\Kms\V1\ApproveSingleTenantHsmInstanceProposalRequest\QuorumReply $quorumReply Required. The reply to - * [QuorumParameters][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.QuorumParameters] - * for approving the proposal. - * - * @return \Google\Cloud\Kms\V1\ApproveSingleTenantHsmInstanceProposalRequest - * - * @experimental - */ - public static function build(string $name, \Google\Cloud\Kms\V1\ApproveSingleTenantHsmInstanceProposalRequest\QuorumReply $quorumReply): self - { - return (new self()) - ->setName($name) - ->setQuorumReply($quorumReply); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The - * [name][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.name] of the - * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * to approve. - * @type \Google\Cloud\Kms\V1\ApproveSingleTenantHsmInstanceProposalRequest\QuorumReply $quorum_reply - * Required. The reply to - * [QuorumParameters][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.QuorumParameters] - * for approving the proposal. - * @type \Google\Cloud\Kms\V1\ApproveSingleTenantHsmInstanceProposalRequest\RequiredActionQuorumReply $required_action_quorum_reply - * Required. The reply to - * [RequiredActionQuorumParameters][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.RequiredActionQuorumParameters] - * for approving the proposal. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\HsmManagement::initOnce(); - parent::__construct($data); - } - - /** - * Required. The - * [name][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.name] of the - * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * to approve. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The - * [name][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.name] of the - * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * to approve. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. The reply to - * [QuorumParameters][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.QuorumParameters] - * for approving the proposal. - * - * Generated from protobuf field .google.cloud.kms.v1.ApproveSingleTenantHsmInstanceProposalRequest.QuorumReply quorum_reply = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Kms\V1\ApproveSingleTenantHsmInstanceProposalRequest\QuorumReply|null - */ - public function getQuorumReply() - { - return $this->readOneof(2); - } - - public function hasQuorumReply() - { - return $this->hasOneof(2); - } - - /** - * Required. The reply to - * [QuorumParameters][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.QuorumParameters] - * for approving the proposal. - * - * Generated from protobuf field .google.cloud.kms.v1.ApproveSingleTenantHsmInstanceProposalRequest.QuorumReply quorum_reply = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Kms\V1\ApproveSingleTenantHsmInstanceProposalRequest\QuorumReply $var - * @return $this - */ - public function setQuorumReply($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\ApproveSingleTenantHsmInstanceProposalRequest\QuorumReply::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Required. The reply to - * [RequiredActionQuorumParameters][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.RequiredActionQuorumParameters] - * for approving the proposal. - * - * Generated from protobuf field .google.cloud.kms.v1.ApproveSingleTenantHsmInstanceProposalRequest.RequiredActionQuorumReply required_action_quorum_reply = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Kms\V1\ApproveSingleTenantHsmInstanceProposalRequest\RequiredActionQuorumReply|null - */ - public function getRequiredActionQuorumReply() - { - return $this->readOneof(3); - } - - public function hasRequiredActionQuorumReply() - { - return $this->hasOneof(3); - } - - /** - * Required. The reply to - * [RequiredActionQuorumParameters][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.RequiredActionQuorumParameters] - * for approving the proposal. - * - * Generated from protobuf field .google.cloud.kms.v1.ApproveSingleTenantHsmInstanceProposalRequest.RequiredActionQuorumReply required_action_quorum_reply = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Kms\V1\ApproveSingleTenantHsmInstanceProposalRequest\RequiredActionQuorumReply $var - * @return $this - */ - public function setRequiredActionQuorumReply($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\ApproveSingleTenantHsmInstanceProposalRequest\RequiredActionQuorumReply::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getApprovalPayload() - { - return $this->whichOneof("approval_payload"); - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ApproveSingleTenantHsmInstanceProposalRequest/QuorumReply.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ApproveSingleTenantHsmInstanceProposalRequest/QuorumReply.php deleted file mode 100644 index fd5f7095a21a..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ApproveSingleTenantHsmInstanceProposalRequest/QuorumReply.php +++ /dev/null @@ -1,88 +0,0 @@ -google.cloud.kms.v1.ApproveSingleTenantHsmInstanceProposalRequest.QuorumReply - */ -class QuorumReply extends \Google\Protobuf\Internal\Message -{ - /** - * 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][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.QuorumParameters.required_approver_count] - * challenge replies are provided. - * - * Generated from protobuf field repeated .google.cloud.kms.v1.ChallengeReply challenge_replies = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private $challenge_replies; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Kms\V1\ChallengeReply>|\Google\Protobuf\Internal\RepeatedField $challenge_replies - * 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][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.QuorumParameters.required_approver_count] - * challenge replies are provided. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\HsmManagement::initOnce(); - parent::__construct($data); - } - - /** - * 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][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.QuorumParameters.required_approver_count] - * challenge replies are provided. - * - * Generated from protobuf field repeated .google.cloud.kms.v1.ChallengeReply challenge_replies = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getChallengeReplies() - { - return $this->challenge_replies; - } - - /** - * 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][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.QuorumParameters.required_approver_count] - * challenge replies are provided. - * - * Generated from protobuf field repeated .google.cloud.kms.v1.ChallengeReply challenge_replies = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\Kms\V1\ChallengeReply>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setChallengeReplies($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Kms\V1\ChallengeReply::class); - $this->challenge_replies = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(QuorumReply::class, \Google\Cloud\Kms\V1\ApproveSingleTenantHsmInstanceProposalRequest_QuorumReply::class); - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ApproveSingleTenantHsmInstanceProposalRequest/RequiredActionQuorumReply.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ApproveSingleTenantHsmInstanceProposalRequest/RequiredActionQuorumReply.php deleted file mode 100644 index 4ec0401a8c0d..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ApproveSingleTenantHsmInstanceProposalRequest/RequiredActionQuorumReply.php +++ /dev/null @@ -1,126 +0,0 @@ -google.cloud.kms.v1.ApproveSingleTenantHsmInstanceProposalRequest.RequiredActionQuorumReply - */ -class RequiredActionQuorumReply extends \Google\Protobuf\Internal\Message -{ - /** - * Required. All required challenges must be signed for the proposal to be - * approved. These can be sent across multiple requests. - * - * Generated from protobuf field repeated .google.cloud.kms.v1.ChallengeReply required_challenge_replies = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private $required_challenge_replies; - /** - * Required. Quorum members' signed challenge replies. These can be provided - * across multiple requests. The proposal will be approved when - * [required_approver_count][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.RequiredActionQuorumParameters.required_approver_count] - * quorum_challenge_replies are provided and when all - * required_challenge_replies are provided. - * - * Generated from protobuf field repeated .google.cloud.kms.v1.ChallengeReply quorum_challenge_replies = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private $quorum_challenge_replies; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Kms\V1\ChallengeReply>|\Google\Protobuf\Internal\RepeatedField $required_challenge_replies - * Required. All required challenges must be signed for the proposal to be - * approved. These can be sent across multiple requests. - * @type array<\Google\Cloud\Kms\V1\ChallengeReply>|\Google\Protobuf\Internal\RepeatedField $quorum_challenge_replies - * Required. Quorum members' signed challenge replies. These can be provided - * across multiple requests. The proposal will be approved when - * [required_approver_count][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.RequiredActionQuorumParameters.required_approver_count] - * quorum_challenge_replies are provided and when all - * required_challenge_replies are provided. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\HsmManagement::initOnce(); - parent::__construct($data); - } - - /** - * Required. All required challenges must be signed for the proposal to be - * approved. These can be sent across multiple requests. - * - * Generated from protobuf field repeated .google.cloud.kms.v1.ChallengeReply required_challenge_replies = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRequiredChallengeReplies() - { - return $this->required_challenge_replies; - } - - /** - * Required. All required challenges must be signed for the proposal to be - * approved. These can be sent across multiple requests. - * - * Generated from protobuf field repeated .google.cloud.kms.v1.ChallengeReply required_challenge_replies = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\Kms\V1\ChallengeReply>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRequiredChallengeReplies($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Kms\V1\ChallengeReply::class); - $this->required_challenge_replies = $arr; - - return $this; - } - - /** - * Required. Quorum members' signed challenge replies. These can be provided - * across multiple requests. The proposal will be approved when - * [required_approver_count][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.RequiredActionQuorumParameters.required_approver_count] - * quorum_challenge_replies are provided and when all - * required_challenge_replies are provided. - * - * Generated from protobuf field repeated .google.cloud.kms.v1.ChallengeReply quorum_challenge_replies = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getQuorumChallengeReplies() - { - return $this->quorum_challenge_replies; - } - - /** - * Required. Quorum members' signed challenge replies. These can be provided - * across multiple requests. The proposal will be approved when - * [required_approver_count][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.RequiredActionQuorumParameters.required_approver_count] - * quorum_challenge_replies are provided and when all - * required_challenge_replies are provided. - * - * Generated from protobuf field repeated .google.cloud.kms.v1.ChallengeReply quorum_challenge_replies = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\Kms\V1\ChallengeReply>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setQuorumChallengeReplies($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Kms\V1\ChallengeReply::class); - $this->quorum_challenge_replies = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RequiredActionQuorumReply::class, \Google\Cloud\Kms\V1\ApproveSingleTenantHsmInstanceProposalRequest_RequiredActionQuorumReply::class); - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ApproveSingleTenantHsmInstanceProposalResponse.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ApproveSingleTenantHsmInstanceProposalResponse.php deleted file mode 100644 index f4298b3e4991..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ApproveSingleTenantHsmInstanceProposalResponse.php +++ /dev/null @@ -1,34 +0,0 @@ -google.cloud.kms.v1.ApproveSingleTenantHsmInstanceProposalResponse - */ -class ApproveSingleTenantHsmInstanceProposalResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\HsmManagement::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AsymmetricDecryptRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AsymmetricDecryptRequest.php deleted file mode 100644 index d091cf22284b..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AsymmetricDecryptRequest.php +++ /dev/null @@ -1,317 +0,0 @@ -google.cloud.kms.v1.AsymmetricDecryptRequest - */ -class AsymmetricDecryptRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for - * decryption. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. The data encrypted with the named - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s public key using - * OAEP. - * - * Generated from protobuf field bytes ciphertext = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $ciphertext = ''; - /** - * Optional. An optional CRC32C checksum of the - * [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]) - * is equal to - * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $ciphertext_crc32c = null; - - /** - * @param string $name Required. The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for - * decryption. Please see - * {@see KeyManagementServiceClient::cryptoKeyVersionName()} for help formatting this field. - * @param string $ciphertext Required. The data encrypted with the named - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s public key using - * OAEP. - * - * @return \Google\Cloud\Kms\V1\AsymmetricDecryptRequest - * - * @experimental - */ - public static function build(string $name, string $ciphertext): self - { - return (new self()) - ->setName($name) - ->setCiphertext($ciphertext); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for - * decryption. - * @type string $ciphertext - * Required. The data encrypted with the named - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s public key using - * OAEP. - * @type \Google\Protobuf\Int64Value $ciphertext_crc32c - * Optional. An optional CRC32C checksum of the - * [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]) - * is equal to - * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.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. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for - * decryption. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for - * decryption. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. The data encrypted with the named - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s public key using - * OAEP. - * - * Generated from protobuf field bytes ciphertext = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getCiphertext() - { - return $this->ciphertext; - } - - /** - * Required. The data encrypted with the named - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s public key using - * OAEP. - * - * Generated from protobuf field bytes ciphertext = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setCiphertext($var) - { - GPBUtil::checkString($var, False); - $this->ciphertext = $var; - - return $this; - } - - /** - * Optional. An optional CRC32C checksum of the - * [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]) - * is equal to - * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Int64Value|null - */ - public function getCiphertextCrc32C() - { - return $this->ciphertext_crc32c; - } - - public function hasCiphertextCrc32C() - { - return isset($this->ciphertext_crc32c); - } - - public function clearCiphertextCrc32C() - { - unset($this->ciphertext_crc32c); - } - - /** - * Returns the unboxed value from getCiphertextCrc32C() - - * Optional. An optional CRC32C checksum of the - * [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]) - * is equal to - * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return int|string|null - */ - public function getCiphertextCrc32CUnwrapped() - { - return $this->readWrapperValue("ciphertext_crc32c"); - } - - /** - * Optional. An optional CRC32C checksum of the - * [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]) - * is equal to - * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Int64Value $var - * @return $this - */ - public function setCiphertextCrc32C($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); - $this->ciphertext_crc32c = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. - - * Optional. An optional CRC32C checksum of the - * [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]) - * is equal to - * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param int|string|null $var - * @return $this - */ - public function setCiphertextCrc32CUnwrapped($var) - { - $this->writeWrapperValue("ciphertext_crc32c", $var); - return $this;} - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AsymmetricDecryptResponse.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AsymmetricDecryptResponse.php deleted file mode 100644 index a50201e6aac9..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AsymmetricDecryptResponse.php +++ /dev/null @@ -1,339 +0,0 @@ -google.cloud.kms.v1.AsymmetricDecryptResponse - */ -class AsymmetricDecryptResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The decrypted data originally encrypted with the matching public key. - * - * Generated from protobuf field bytes plaintext = 1; - */ - protected $plaintext = ''; - /** - * Integrity verification field. A CRC32C checksum of the returned - * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext]. - * An integrity check of - * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext] - * can be performed by computing the CRC32C checksum of - * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 2; - */ - protected $plaintext_crc32c = null; - /** - * Integrity verification field. A flag indicating whether - * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of the - * [ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]. A - * false value of this field indicates either that - * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * - * Generated from protobuf field bool verified_ciphertext_crc32c = 3; - */ - protected $verified_ciphertext_crc32c = false; - /** - * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in - * decryption. - * - * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 4; - */ - protected $protection_level = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $plaintext - * The decrypted data originally encrypted with the matching public key. - * @type \Google\Protobuf\Int64Value $plaintext_crc32c - * Integrity verification field. A CRC32C checksum of the returned - * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext]. - * An integrity check of - * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext] - * can be performed by computing the CRC32C checksum of - * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.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. - * @type bool $verified_ciphertext_crc32c - * Integrity verification field. A flag indicating whether - * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of the - * [ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]. A - * false value of this field indicates either that - * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * @type int $protection_level - * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in - * decryption. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * The decrypted data originally encrypted with the matching public key. - * - * Generated from protobuf field bytes plaintext = 1; - * @return string - */ - public function getPlaintext() - { - return $this->plaintext; - } - - /** - * The decrypted data originally encrypted with the matching public key. - * - * Generated from protobuf field bytes plaintext = 1; - * @param string $var - * @return $this - */ - public function setPlaintext($var) - { - GPBUtil::checkString($var, False); - $this->plaintext = $var; - - return $this; - } - - /** - * Integrity verification field. A CRC32C checksum of the returned - * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext]. - * An integrity check of - * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext] - * can be performed by computing the CRC32C checksum of - * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 2; - * @return \Google\Protobuf\Int64Value|null - */ - public function getPlaintextCrc32C() - { - return $this->plaintext_crc32c; - } - - public function hasPlaintextCrc32C() - { - return isset($this->plaintext_crc32c); - } - - public function clearPlaintextCrc32C() - { - unset($this->plaintext_crc32c); - } - - /** - * Returns the unboxed value from getPlaintextCrc32C() - - * Integrity verification field. A CRC32C checksum of the returned - * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext]. - * An integrity check of - * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext] - * can be performed by computing the CRC32C checksum of - * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 2; - * @return int|string|null - */ - public function getPlaintextCrc32CUnwrapped() - { - return $this->readWrapperValue("plaintext_crc32c"); - } - - /** - * Integrity verification field. A CRC32C checksum of the returned - * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext]. - * An integrity check of - * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext] - * can be performed by computing the CRC32C checksum of - * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 2; - * @param \Google\Protobuf\Int64Value $var - * @return $this - */ - public function setPlaintextCrc32C($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); - $this->plaintext_crc32c = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. - - * Integrity verification field. A CRC32C checksum of the returned - * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext]. - * An integrity check of - * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext] - * can be performed by computing the CRC32C checksum of - * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 2; - * @param int|string|null $var - * @return $this - */ - public function setPlaintextCrc32CUnwrapped($var) - { - $this->writeWrapperValue("plaintext_crc32c", $var); - return $this;} - - /** - * Integrity verification field. A flag indicating whether - * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of the - * [ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]. A - * false value of this field indicates either that - * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * - * Generated from protobuf field bool verified_ciphertext_crc32c = 3; - * @return bool - */ - public function getVerifiedCiphertextCrc32C() - { - return $this->verified_ciphertext_crc32c; - } - - /** - * Integrity verification field. A flag indicating whether - * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of the - * [ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]. A - * false value of this field indicates either that - * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * - * Generated from protobuf field bool verified_ciphertext_crc32c = 3; - * @param bool $var - * @return $this - */ - public function setVerifiedCiphertextCrc32C($var) - { - GPBUtil::checkBool($var); - $this->verified_ciphertext_crc32c = $var; - - return $this; - } - - /** - * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in - * decryption. - * - * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 4; - * @return int - */ - public function getProtectionLevel() - { - return $this->protection_level; - } - - /** - * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in - * decryption. - * - * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 4; - * @param int $var - * @return $this - */ - public function setProtectionLevel($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\ProtectionLevel::class); - $this->protection_level = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AsymmetricSignRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AsymmetricSignRequest.php deleted file mode 100644 index 2dae2bd9fd19..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AsymmetricSignRequest.php +++ /dev/null @@ -1,568 +0,0 @@ -google.cloud.kms.v1.AsymmetricSignRequest - */ -class AsymmetricSignRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for - * signing. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * 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][google.cloud.kms.v1.CryptoKeyVersion.algorithm]. - * This field may not be supplied if - * [AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data] - * is supplied. - * - * Generated from protobuf field .google.cloud.kms.v1.Digest digest = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $digest = null; - /** - * Optional. An optional CRC32C checksum of the - * [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]) - * is equal to - * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value digest_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $digest_crc32c = null; - /** - * Optional. The data to sign. - * It can't be supplied if - * [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest] - * is supplied. - * - * Generated from protobuf field bytes data = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $data = ''; - /** - * Optional. An optional CRC32C checksum of the - * [AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data]) - * is equal to - * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $data_crc32c = null; - - /** - * @param string $name Required. The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for - * signing. Please see - * {@see KeyManagementServiceClient::cryptoKeyVersionName()} for help formatting this field. - * @param \Google\Cloud\Kms\V1\Digest $digest 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][google.cloud.kms.v1.CryptoKeyVersion.algorithm]. - * - * This field may not be supplied if - * [AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data] - * is supplied. - * - * @return \Google\Cloud\Kms\V1\AsymmetricSignRequest - * - * @experimental - */ - public static function build(string $name, \Google\Cloud\Kms\V1\Digest $digest): self - { - return (new self()) - ->setName($name) - ->setDigest($digest); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for - * signing. - * @type \Google\Cloud\Kms\V1\Digest $digest - * 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][google.cloud.kms.v1.CryptoKeyVersion.algorithm]. - * This field may not be supplied if - * [AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data] - * is supplied. - * @type \Google\Protobuf\Int64Value $digest_crc32c - * Optional. An optional CRC32C checksum of the - * [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]) - * is equal to - * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.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. - * @type string $data - * Optional. The data to sign. - * It can't be supplied if - * [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest] - * is supplied. - * @type \Google\Protobuf\Int64Value $data_crc32c - * Optional. An optional CRC32C checksum of the - * [AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data]) - * is equal to - * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.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. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for - * signing. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for - * signing. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * 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][google.cloud.kms.v1.CryptoKeyVersion.algorithm]. - * This field may not be supplied if - * [AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data] - * is supplied. - * - * Generated from protobuf field .google.cloud.kms.v1.Digest digest = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Kms\V1\Digest|null - */ - public function getDigest() - { - return $this->digest; - } - - public function hasDigest() - { - return isset($this->digest); - } - - public function clearDigest() - { - unset($this->digest); - } - - /** - * 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][google.cloud.kms.v1.CryptoKeyVersion.algorithm]. - * This field may not be supplied if - * [AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data] - * is supplied. - * - * Generated from protobuf field .google.cloud.kms.v1.Digest digest = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Kms\V1\Digest $var - * @return $this - */ - public function setDigest($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\Digest::class); - $this->digest = $var; - - return $this; - } - - /** - * Optional. An optional CRC32C checksum of the - * [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]) - * is equal to - * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value digest_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Int64Value|null - */ - public function getDigestCrc32C() - { - return $this->digest_crc32c; - } - - public function hasDigestCrc32C() - { - return isset($this->digest_crc32c); - } - - public function clearDigestCrc32C() - { - unset($this->digest_crc32c); - } - - /** - * Returns the unboxed value from getDigestCrc32C() - - * Optional. An optional CRC32C checksum of the - * [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]) - * is equal to - * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value digest_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return int|string|null - */ - public function getDigestCrc32CUnwrapped() - { - return $this->readWrapperValue("digest_crc32c"); - } - - /** - * Optional. An optional CRC32C checksum of the - * [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]) - * is equal to - * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value digest_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Int64Value $var - * @return $this - */ - public function setDigestCrc32C($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); - $this->digest_crc32c = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. - - * Optional. An optional CRC32C checksum of the - * [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]) - * is equal to - * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value digest_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param int|string|null $var - * @return $this - */ - public function setDigestCrc32CUnwrapped($var) - { - $this->writeWrapperValue("digest_crc32c", $var); - return $this;} - - /** - * Optional. The data to sign. - * It can't be supplied if - * [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest] - * is supplied. - * - * Generated from protobuf field bytes data = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getData() - { - return $this->data; - } - - /** - * Optional. The data to sign. - * It can't be supplied if - * [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest] - * is supplied. - * - * Generated from protobuf field bytes data = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setData($var) - { - GPBUtil::checkString($var, False); - $this->data = $var; - - return $this; - } - - /** - * Optional. An optional CRC32C checksum of the - * [AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data]) - * is equal to - * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Int64Value|null - */ - public function getDataCrc32C() - { - return $this->data_crc32c; - } - - public function hasDataCrc32C() - { - return isset($this->data_crc32c); - } - - public function clearDataCrc32C() - { - unset($this->data_crc32c); - } - - /** - * Returns the unboxed value from getDataCrc32C() - - * Optional. An optional CRC32C checksum of the - * [AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data]) - * is equal to - * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return int|string|null - */ - public function getDataCrc32CUnwrapped() - { - return $this->readWrapperValue("data_crc32c"); - } - - /** - * Optional. An optional CRC32C checksum of the - * [AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data]) - * is equal to - * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Int64Value $var - * @return $this - */ - public function setDataCrc32C($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); - $this->data_crc32c = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. - - * Optional. An optional CRC32C checksum of the - * [AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data]) - * is equal to - * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param int|string|null $var - * @return $this - */ - public function setDataCrc32CUnwrapped($var) - { - $this->writeWrapperValue("data_crc32c", $var); - return $this;} - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AsymmetricSignResponse.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AsymmetricSignResponse.php deleted file mode 100644 index efec99a14768..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AsymmetricSignResponse.php +++ /dev/null @@ -1,463 +0,0 @@ -google.cloud.kms.v1.AsymmetricSignResponse - */ -class AsymmetricSignResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The created signature. - * - * Generated from protobuf field bytes signature = 1; - */ - protected $signature = ''; - /** - * Integrity verification field. A CRC32C checksum of the returned - * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature]. - * An integrity check of - * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] - * can be performed by computing the CRC32C checksum of - * [AsymmetricSignResponse.signature][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value signature_crc32c = 2; - */ - protected $signature_crc32c = null; - /** - * Integrity verification field. A flag indicating whether - * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of the - * [digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]. A false value - * of this field indicates either that - * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * - * Generated from protobuf field bool verified_digest_crc32c = 3; - */ - protected $verified_digest_crc32c = false; - /** - * The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. - * Check this field to verify that the intended resource was used for signing. - * - * Generated from protobuf field string name = 4; - */ - protected $name = ''; - /** - * Integrity verification field. A flag indicating whether - * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of the - * [data][google.cloud.kms.v1.AsymmetricSignRequest.data]. A false value of - * this field indicates either that - * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * - * Generated from protobuf field bool verified_data_crc32c = 5; - */ - protected $verified_data_crc32c = false; - /** - * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. - * - * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 6; - */ - protected $protection_level = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $signature - * The created signature. - * @type \Google\Protobuf\Int64Value $signature_crc32c - * Integrity verification field. A CRC32C checksum of the returned - * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature]. - * An integrity check of - * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] - * can be performed by computing the CRC32C checksum of - * [AsymmetricSignResponse.signature][google.cloud.kms.v1.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. - * @type bool $verified_digest_crc32c - * Integrity verification field. A flag indicating whether - * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of the - * [digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]. A false value - * of this field indicates either that - * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * @type string $name - * The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. - * Check this field to verify that the intended resource was used for signing. - * @type bool $verified_data_crc32c - * Integrity verification field. A flag indicating whether - * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of the - * [data][google.cloud.kms.v1.AsymmetricSignRequest.data]. A false value of - * this field indicates either that - * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * @type int $protection_level - * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * The created signature. - * - * Generated from protobuf field bytes signature = 1; - * @return string - */ - public function getSignature() - { - return $this->signature; - } - - /** - * The created signature. - * - * Generated from protobuf field bytes signature = 1; - * @param string $var - * @return $this - */ - public function setSignature($var) - { - GPBUtil::checkString($var, False); - $this->signature = $var; - - return $this; - } - - /** - * Integrity verification field. A CRC32C checksum of the returned - * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature]. - * An integrity check of - * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] - * can be performed by computing the CRC32C checksum of - * [AsymmetricSignResponse.signature][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value signature_crc32c = 2; - * @return \Google\Protobuf\Int64Value|null - */ - public function getSignatureCrc32C() - { - return $this->signature_crc32c; - } - - public function hasSignatureCrc32C() - { - return isset($this->signature_crc32c); - } - - public function clearSignatureCrc32C() - { - unset($this->signature_crc32c); - } - - /** - * Returns the unboxed value from getSignatureCrc32C() - - * Integrity verification field. A CRC32C checksum of the returned - * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature]. - * An integrity check of - * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] - * can be performed by computing the CRC32C checksum of - * [AsymmetricSignResponse.signature][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value signature_crc32c = 2; - * @return int|string|null - */ - public function getSignatureCrc32CUnwrapped() - { - return $this->readWrapperValue("signature_crc32c"); - } - - /** - * Integrity verification field. A CRC32C checksum of the returned - * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature]. - * An integrity check of - * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] - * can be performed by computing the CRC32C checksum of - * [AsymmetricSignResponse.signature][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value signature_crc32c = 2; - * @param \Google\Protobuf\Int64Value $var - * @return $this - */ - public function setSignatureCrc32C($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); - $this->signature_crc32c = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. - - * Integrity verification field. A CRC32C checksum of the returned - * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature]. - * An integrity check of - * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] - * can be performed by computing the CRC32C checksum of - * [AsymmetricSignResponse.signature][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value signature_crc32c = 2; - * @param int|string|null $var - * @return $this - */ - public function setSignatureCrc32CUnwrapped($var) - { - $this->writeWrapperValue("signature_crc32c", $var); - return $this;} - - /** - * Integrity verification field. A flag indicating whether - * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of the - * [digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]. A false value - * of this field indicates either that - * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * - * Generated from protobuf field bool verified_digest_crc32c = 3; - * @return bool - */ - public function getVerifiedDigestCrc32C() - { - return $this->verified_digest_crc32c; - } - - /** - * Integrity verification field. A flag indicating whether - * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of the - * [digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]. A false value - * of this field indicates either that - * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * - * Generated from protobuf field bool verified_digest_crc32c = 3; - * @param bool $var - * @return $this - */ - public function setVerifiedDigestCrc32C($var) - { - GPBUtil::checkBool($var); - $this->verified_digest_crc32c = $var; - - return $this; - } - - /** - * The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. - * Check this field to verify that the intended resource was used for signing. - * - * Generated from protobuf field string name = 4; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. - * Check this field to verify that the intended resource was used for signing. - * - * Generated from protobuf field string name = 4; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Integrity verification field. A flag indicating whether - * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of the - * [data][google.cloud.kms.v1.AsymmetricSignRequest.data]. A false value of - * this field indicates either that - * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * - * Generated from protobuf field bool verified_data_crc32c = 5; - * @return bool - */ - public function getVerifiedDataCrc32C() - { - return $this->verified_data_crc32c; - } - - /** - * Integrity verification field. A flag indicating whether - * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of the - * [data][google.cloud.kms.v1.AsymmetricSignRequest.data]. A false value of - * this field indicates either that - * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * - * Generated from protobuf field bool verified_data_crc32c = 5; - * @param bool $var - * @return $this - */ - public function setVerifiedDataCrc32C($var) - { - GPBUtil::checkBool($var); - $this->verified_data_crc32c = $var; - - return $this; - } - - /** - * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. - * - * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 6; - * @return int - */ - public function getProtectionLevel() - { - return $this->protection_level; - } - - /** - * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. - * - * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 6; - * @param int $var - * @return $this - */ - public function setProtectionLevel($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\ProtectionLevel::class); - $this->protection_level = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AutokeyConfig.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AutokeyConfig.php deleted file mode 100644 index cc493fef83be..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AutokeyConfig.php +++ /dev/null @@ -1,271 +0,0 @@ -google.cloud.kms.v1.AutokeyConfig - */ -class AutokeyConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. Name of the [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig] - * resource, e.g. `folders/{FOLDER_NUMBER}/autokeyConfig` or - * `projects/{PROJECT_NUMBER}/autokeyConfig`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Optional. Name of the key project, e.g. `projects/{PROJECT_ID}` or - * `projects/{PROJECT_NUMBER}`, where Cloud KMS Autokey will provision a new - * [CryptoKey][google.cloud.kms.v1.CryptoKey] when a - * [KeyHandle][google.cloud.kms.v1.KeyHandle] is created. On - * [UpdateAutokeyConfig][google.cloud.kms.v1.AutokeyAdmin.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. - * - * Generated from protobuf field string key_project = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $key_project = ''; - /** - * Output only. The state for the AutokeyConfig. - * - * Generated from protobuf field .google.cloud.kms.v1.AutokeyConfig.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * 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. - * - * Generated from protobuf field string etag = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $etag = ''; - /** - * Optional. KeyProjectResolutionMode for the AutokeyConfig. - * Valid values are `DEDICATED_KEY_PROJECT`, `RESOURCE_PROJECT`, or - * `DISABLED`. - * - * Generated from protobuf field .google.cloud.kms.v1.AutokeyConfig.KeyProjectResolutionMode key_project_resolution_mode = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $key_project_resolution_mode = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. Name of the [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig] - * resource, e.g. `folders/{FOLDER_NUMBER}/autokeyConfig` or - * `projects/{PROJECT_NUMBER}/autokeyConfig`. - * @type string $key_project - * Optional. Name of the key project, e.g. `projects/{PROJECT_ID}` or - * `projects/{PROJECT_NUMBER}`, where Cloud KMS Autokey will provision a new - * [CryptoKey][google.cloud.kms.v1.CryptoKey] when a - * [KeyHandle][google.cloud.kms.v1.KeyHandle] is created. On - * [UpdateAutokeyConfig][google.cloud.kms.v1.AutokeyAdmin.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. - * @type int $state - * Output only. The state for the AutokeyConfig. - * @type string $etag - * 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. - * @type int $key_project_resolution_mode - * Optional. KeyProjectResolutionMode for the AutokeyConfig. - * Valid values are `DEDICATED_KEY_PROJECT`, `RESOURCE_PROJECT`, or - * `DISABLED`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\AutokeyAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. Name of the [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig] - * resource, e.g. `folders/{FOLDER_NUMBER}/autokeyConfig` or - * `projects/{PROJECT_NUMBER}/autokeyConfig`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. Name of the [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig] - * resource, e.g. `folders/{FOLDER_NUMBER}/autokeyConfig` or - * `projects/{PROJECT_NUMBER}/autokeyConfig`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. Name of the key project, e.g. `projects/{PROJECT_ID}` or - * `projects/{PROJECT_NUMBER}`, where Cloud KMS Autokey will provision a new - * [CryptoKey][google.cloud.kms.v1.CryptoKey] when a - * [KeyHandle][google.cloud.kms.v1.KeyHandle] is created. On - * [UpdateAutokeyConfig][google.cloud.kms.v1.AutokeyAdmin.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. - * - * Generated from protobuf field string key_project = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getKeyProject() - { - return $this->key_project; - } - - /** - * Optional. Name of the key project, e.g. `projects/{PROJECT_ID}` or - * `projects/{PROJECT_NUMBER}`, where Cloud KMS Autokey will provision a new - * [CryptoKey][google.cloud.kms.v1.CryptoKey] when a - * [KeyHandle][google.cloud.kms.v1.KeyHandle] is created. On - * [UpdateAutokeyConfig][google.cloud.kms.v1.AutokeyAdmin.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. - * - * Generated from protobuf field string key_project = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setKeyProject($var) - { - GPBUtil::checkString($var, True); - $this->key_project = $var; - - return $this; - } - - /** - * Output only. The state for the AutokeyConfig. - * - * Generated from protobuf field .google.cloud.kms.v1.AutokeyConfig.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The state for the AutokeyConfig. - * - * Generated from protobuf field .google.cloud.kms.v1.AutokeyConfig.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\AutokeyConfig\State::class); - $this->state = $var; - - return $this; - } - - /** - * 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. - * - * Generated from protobuf field string etag = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * 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. - * - * Generated from protobuf field string etag = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - - /** - * Optional. KeyProjectResolutionMode for the AutokeyConfig. - * Valid values are `DEDICATED_KEY_PROJECT`, `RESOURCE_PROJECT`, or - * `DISABLED`. - * - * Generated from protobuf field .google.cloud.kms.v1.AutokeyConfig.KeyProjectResolutionMode key_project_resolution_mode = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getKeyProjectResolutionMode() - { - return $this->key_project_resolution_mode; - } - - /** - * Optional. KeyProjectResolutionMode for the AutokeyConfig. - * Valid values are `DEDICATED_KEY_PROJECT`, `RESOURCE_PROJECT`, or - * `DISABLED`. - * - * Generated from protobuf field .google.cloud.kms.v1.AutokeyConfig.KeyProjectResolutionMode key_project_resolution_mode = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setKeyProjectResolutionMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\AutokeyConfig\KeyProjectResolutionMode::class); - $this->key_project_resolution_mode = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AutokeyConfig/State.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AutokeyConfig/State.php deleted file mode 100644 index a53708d6b0ca..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AutokeyConfig/State.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.kms.v1.AutokeyConfig.State - */ -class State -{ - /** - * The state of the AutokeyConfig is unspecified. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The AutokeyConfig is currently active. - * - * Generated from protobuf enum ACTIVE = 1; - */ - const ACTIVE = 1; - /** - * A previously configured key project has been deleted and the current - * AutokeyConfig is unusable. - * - * Generated from protobuf enum KEY_PROJECT_DELETED = 2; - */ - const KEY_PROJECT_DELETED = 2; - /** - * The AutokeyConfig is not yet initialized or has been reset to its default - * uninitialized state. - * - * Generated from protobuf enum UNINITIALIZED = 3; - */ - const UNINITIALIZED = 3; - /** - * The service account lacks the necessary permissions in the key project to - * configure Autokey. - * - * Generated from protobuf enum KEY_PROJECT_PERMISSION_DENIED = 4; - */ - const KEY_PROJECT_PERMISSION_DENIED = 4; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::ACTIVE => 'ACTIVE', - self::KEY_PROJECT_DELETED => 'KEY_PROJECT_DELETED', - self::UNINITIALIZED => 'UNINITIALIZED', - self::KEY_PROJECT_PERMISSION_DENIED => 'KEY_PROJECT_PERMISSION_DENIED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\Kms\V1\AutokeyConfig_State::class); - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/Certificate.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/Certificate.php deleted file mode 100644 index db653c93c4a9..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/Certificate.php +++ /dev/null @@ -1,388 +0,0 @@ -google.cloud.kms.v1.Certificate - */ -class Certificate extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The raw certificate bytes in DER format. - * - * Generated from protobuf field bytes raw_der = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $raw_der = ''; - /** - * Output only. True if the certificate was parsed successfully. - * - * Generated from protobuf field bool parsed = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $parsed = false; - /** - * Output only. The issuer distinguished name in RFC 2253 format. Only present - * if [parsed][google.cloud.kms.v1.Certificate.parsed] is true. - * - * Generated from protobuf field string issuer = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $issuer = ''; - /** - * Output only. The subject distinguished name in RFC 2253 format. Only - * present if [parsed][google.cloud.kms.v1.Certificate.parsed] is true. - * - * Generated from protobuf field string subject = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $subject = ''; - /** - * Output only. The subject Alternative DNS names. Only present if - * [parsed][google.cloud.kms.v1.Certificate.parsed] is true. - * - * Generated from protobuf field repeated string subject_alternative_dns_names = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $subject_alternative_dns_names; - /** - * Output only. The certificate is not valid before this time. Only present if - * [parsed][google.cloud.kms.v1.Certificate.parsed] is true. - * - * Generated from protobuf field .google.protobuf.Timestamp not_before_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $not_before_time = null; - /** - * Output only. The certificate is not valid after this time. Only present if - * [parsed][google.cloud.kms.v1.Certificate.parsed] is true. - * - * Generated from protobuf field .google.protobuf.Timestamp not_after_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $not_after_time = null; - /** - * Output only. The certificate serial number as a hex string. Only present if - * [parsed][google.cloud.kms.v1.Certificate.parsed] is true. - * - * Generated from protobuf field string serial_number = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $serial_number = ''; - /** - * Output only. The SHA-256 certificate fingerprint as a hex string. Only - * present if [parsed][google.cloud.kms.v1.Certificate.parsed] is true. - * - * Generated from protobuf field string sha256_fingerprint = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $sha256_fingerprint = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $raw_der - * Required. The raw certificate bytes in DER format. - * @type bool $parsed - * Output only. True if the certificate was parsed successfully. - * @type string $issuer - * Output only. The issuer distinguished name in RFC 2253 format. Only present - * if [parsed][google.cloud.kms.v1.Certificate.parsed] is true. - * @type string $subject - * Output only. The subject distinguished name in RFC 2253 format. Only - * present if [parsed][google.cloud.kms.v1.Certificate.parsed] is true. - * @type array|\Google\Protobuf\Internal\RepeatedField $subject_alternative_dns_names - * Output only. The subject Alternative DNS names. Only present if - * [parsed][google.cloud.kms.v1.Certificate.parsed] is true. - * @type \Google\Protobuf\Timestamp $not_before_time - * Output only. The certificate is not valid before this time. Only present if - * [parsed][google.cloud.kms.v1.Certificate.parsed] is true. - * @type \Google\Protobuf\Timestamp $not_after_time - * Output only. The certificate is not valid after this time. Only present if - * [parsed][google.cloud.kms.v1.Certificate.parsed] is true. - * @type string $serial_number - * Output only. The certificate serial number as a hex string. Only present if - * [parsed][google.cloud.kms.v1.Certificate.parsed] is true. - * @type string $sha256_fingerprint - * Output only. The SHA-256 certificate fingerprint as a hex string. Only - * present if [parsed][google.cloud.kms.v1.Certificate.parsed] is true. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\EkmService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The raw certificate bytes in DER format. - * - * Generated from protobuf field bytes raw_der = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getRawDer() - { - return $this->raw_der; - } - - /** - * Required. The raw certificate bytes in DER format. - * - * Generated from protobuf field bytes raw_der = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setRawDer($var) - { - GPBUtil::checkString($var, False); - $this->raw_der = $var; - - return $this; - } - - /** - * Output only. True if the certificate was parsed successfully. - * - * Generated from protobuf field bool parsed = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getParsed() - { - return $this->parsed; - } - - /** - * Output only. True if the certificate was parsed successfully. - * - * Generated from protobuf field bool parsed = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setParsed($var) - { - GPBUtil::checkBool($var); - $this->parsed = $var; - - return $this; - } - - /** - * Output only. The issuer distinguished name in RFC 2253 format. Only present - * if [parsed][google.cloud.kms.v1.Certificate.parsed] is true. - * - * Generated from protobuf field string issuer = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getIssuer() - { - return $this->issuer; - } - - /** - * Output only. The issuer distinguished name in RFC 2253 format. Only present - * if [parsed][google.cloud.kms.v1.Certificate.parsed] is true. - * - * Generated from protobuf field string issuer = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setIssuer($var) - { - GPBUtil::checkString($var, True); - $this->issuer = $var; - - return $this; - } - - /** - * Output only. The subject distinguished name in RFC 2253 format. Only - * present if [parsed][google.cloud.kms.v1.Certificate.parsed] is true. - * - * Generated from protobuf field string subject = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getSubject() - { - return $this->subject; - } - - /** - * Output only. The subject distinguished name in RFC 2253 format. Only - * present if [parsed][google.cloud.kms.v1.Certificate.parsed] is true. - * - * Generated from protobuf field string subject = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setSubject($var) - { - GPBUtil::checkString($var, True); - $this->subject = $var; - - return $this; - } - - /** - * Output only. The subject Alternative DNS names. Only present if - * [parsed][google.cloud.kms.v1.Certificate.parsed] is true. - * - * Generated from protobuf field repeated string subject_alternative_dns_names = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSubjectAlternativeDnsNames() - { - return $this->subject_alternative_dns_names; - } - - /** - * Output only. The subject Alternative DNS names. Only present if - * [parsed][google.cloud.kms.v1.Certificate.parsed] is true. - * - * Generated from protobuf field repeated string subject_alternative_dns_names = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSubjectAlternativeDnsNames($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->subject_alternative_dns_names = $arr; - - return $this; - } - - /** - * Output only. The certificate is not valid before this time. Only present if - * [parsed][google.cloud.kms.v1.Certificate.parsed] is true. - * - * Generated from protobuf field .google.protobuf.Timestamp not_before_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getNotBeforeTime() - { - return $this->not_before_time; - } - - public function hasNotBeforeTime() - { - return isset($this->not_before_time); - } - - public function clearNotBeforeTime() - { - unset($this->not_before_time); - } - - /** - * Output only. The certificate is not valid before this time. Only present if - * [parsed][google.cloud.kms.v1.Certificate.parsed] is true. - * - * Generated from protobuf field .google.protobuf.Timestamp not_before_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setNotBeforeTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->not_before_time = $var; - - return $this; - } - - /** - * Output only. The certificate is not valid after this time. Only present if - * [parsed][google.cloud.kms.v1.Certificate.parsed] is true. - * - * Generated from protobuf field .google.protobuf.Timestamp not_after_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getNotAfterTime() - { - return $this->not_after_time; - } - - public function hasNotAfterTime() - { - return isset($this->not_after_time); - } - - public function clearNotAfterTime() - { - unset($this->not_after_time); - } - - /** - * Output only. The certificate is not valid after this time. Only present if - * [parsed][google.cloud.kms.v1.Certificate.parsed] is true. - * - * Generated from protobuf field .google.protobuf.Timestamp not_after_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setNotAfterTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->not_after_time = $var; - - return $this; - } - - /** - * Output only. The certificate serial number as a hex string. Only present if - * [parsed][google.cloud.kms.v1.Certificate.parsed] is true. - * - * Generated from protobuf field string serial_number = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getSerialNumber() - { - return $this->serial_number; - } - - /** - * Output only. The certificate serial number as a hex string. Only present if - * [parsed][google.cloud.kms.v1.Certificate.parsed] is true. - * - * Generated from protobuf field string serial_number = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setSerialNumber($var) - { - GPBUtil::checkString($var, True); - $this->serial_number = $var; - - return $this; - } - - /** - * Output only. The SHA-256 certificate fingerprint as a hex string. Only - * present if [parsed][google.cloud.kms.v1.Certificate.parsed] is true. - * - * Generated from protobuf field string sha256_fingerprint = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getSha256Fingerprint() - { - return $this->sha256_fingerprint; - } - - /** - * Output only. The SHA-256 certificate fingerprint as a hex string. Only - * present if [parsed][google.cloud.kms.v1.Certificate.parsed] is true. - * - * Generated from protobuf field string sha256_fingerprint = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setSha256Fingerprint($var) - { - GPBUtil::checkString($var, True); - $this->sha256_fingerprint = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/Challenge.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/Challenge.php deleted file mode 100644 index 792814caa3de..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/Challenge.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.kms.v1.Challenge - */ -class Challenge extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The challenge to be signed by the 2FA key indicated by the - * public key. - * - * Generated from protobuf field bytes challenge = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $challenge = ''; - /** - * Output only. The public key associated with the 2FA key that should sign - * the challenge. - * - * Generated from protobuf field string public_key_pem = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $public_key_pem = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $challenge - * Output only. The challenge to be signed by the 2FA key indicated by the - * public key. - * @type string $public_key_pem - * Output only. The public key associated with the 2FA key that should sign - * the challenge. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\HsmManagement::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The challenge to be signed by the 2FA key indicated by the - * public key. - * - * Generated from protobuf field bytes challenge = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getChallenge() - { - return $this->challenge; - } - - /** - * Output only. The challenge to be signed by the 2FA key indicated by the - * public key. - * - * Generated from protobuf field bytes challenge = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setChallenge($var) - { - GPBUtil::checkString($var, False); - $this->challenge = $var; - - return $this; - } - - /** - * Output only. The public key associated with the 2FA key that should sign - * the challenge. - * - * Generated from protobuf field string public_key_pem = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getPublicKeyPem() - { - return $this->public_key_pem; - } - - /** - * Output only. The public key associated with the 2FA key that should sign - * the challenge. - * - * Generated from protobuf field string public_key_pem = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setPublicKeyPem($var) - { - GPBUtil::checkString($var, True); - $this->public_key_pem = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ChallengeReply.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ChallengeReply.php deleted file mode 100644 index 7aba6f546ba8..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ChallengeReply.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.kms.v1.ChallengeReply - */ -class ChallengeReply extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The signed challenge associated with the 2FA key. - * The signature must be RSASSA-PKCS1 v1.5 with a SHA256 digest. - * - * Generated from protobuf field bytes signed_challenge = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $signed_challenge = ''; - /** - * Required. The public key associated with the 2FA key. - * - * Generated from protobuf field string public_key_pem = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $public_key_pem = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $signed_challenge - * Required. The signed challenge associated with the 2FA key. - * The signature must be RSASSA-PKCS1 v1.5 with a SHA256 digest. - * @type string $public_key_pem - * Required. The public key associated with the 2FA key. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\HsmManagement::initOnce(); - parent::__construct($data); - } - - /** - * Required. The signed challenge associated with the 2FA key. - * The signature must be RSASSA-PKCS1 v1.5 with a SHA256 digest. - * - * Generated from protobuf field bytes signed_challenge = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getSignedChallenge() - { - return $this->signed_challenge; - } - - /** - * Required. The signed challenge associated with the 2FA key. - * The signature must be RSASSA-PKCS1 v1.5 with a SHA256 digest. - * - * Generated from protobuf field bytes signed_challenge = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setSignedChallenge($var) - { - GPBUtil::checkString($var, False); - $this->signed_challenge = $var; - - return $this; - } - - /** - * Required. The public key associated with the 2FA key. - * - * Generated from protobuf field string public_key_pem = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getPublicKeyPem() - { - return $this->public_key_pem; - } - - /** - * Required. The public key associated with the 2FA key. - * - * Generated from protobuf field string public_key_pem = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setPublicKeyPem($var) - { - GPBUtil::checkString($var, True); - $this->public_key_pem = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ChecksummedData.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ChecksummedData.php deleted file mode 100644 index 871655706ae9..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ChecksummedData.php +++ /dev/null @@ -1,216 +0,0 @@ -google.cloud.kms.v1.ChecksummedData - */ -class ChecksummedData extends \Google\Protobuf\Internal\Message -{ - /** - * Raw Data. - * - * Generated from protobuf field bytes data = 3; - */ - protected $data = ''; - /** - * Integrity verification field. A CRC32C - * checksum of the returned - * [ChecksummedData.data][google.cloud.kms.v1.ChecksummedData.data]. An - * integrity check of - * [ChecksummedData.data][google.cloud.kms.v1.ChecksummedData.data] can be - * performed by computing the CRC32C checksum of - * [ChecksummedData.data][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value crc32c_checksum = 2; - */ - protected $crc32c_checksum = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $data - * Raw Data. - * @type \Google\Protobuf\Int64Value $crc32c_checksum - * Integrity verification field. A CRC32C - * checksum of the returned - * [ChecksummedData.data][google.cloud.kms.v1.ChecksummedData.data]. An - * integrity check of - * [ChecksummedData.data][google.cloud.kms.v1.ChecksummedData.data] can be - * performed by computing the CRC32C checksum of - * [ChecksummedData.data][google.cloud.kms.v1.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. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Raw Data. - * - * Generated from protobuf field bytes data = 3; - * @return string - */ - public function getData() - { - return $this->data; - } - - /** - * Raw Data. - * - * Generated from protobuf field bytes data = 3; - * @param string $var - * @return $this - */ - public function setData($var) - { - GPBUtil::checkString($var, False); - $this->data = $var; - - return $this; - } - - /** - * Integrity verification field. A CRC32C - * checksum of the returned - * [ChecksummedData.data][google.cloud.kms.v1.ChecksummedData.data]. An - * integrity check of - * [ChecksummedData.data][google.cloud.kms.v1.ChecksummedData.data] can be - * performed by computing the CRC32C checksum of - * [ChecksummedData.data][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value crc32c_checksum = 2; - * @return \Google\Protobuf\Int64Value|null - */ - public function getCrc32CChecksum() - { - return $this->crc32c_checksum; - } - - public function hasCrc32CChecksum() - { - return isset($this->crc32c_checksum); - } - - public function clearCrc32CChecksum() - { - unset($this->crc32c_checksum); - } - - /** - * Returns the unboxed value from getCrc32CChecksum() - - * Integrity verification field. A CRC32C - * checksum of the returned - * [ChecksummedData.data][google.cloud.kms.v1.ChecksummedData.data]. An - * integrity check of - * [ChecksummedData.data][google.cloud.kms.v1.ChecksummedData.data] can be - * performed by computing the CRC32C checksum of - * [ChecksummedData.data][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value crc32c_checksum = 2; - * @return int|string|null - */ - public function getCrc32CChecksumUnwrapped() - { - return $this->readWrapperValue("crc32c_checksum"); - } - - /** - * Integrity verification field. A CRC32C - * checksum of the returned - * [ChecksummedData.data][google.cloud.kms.v1.ChecksummedData.data]. An - * integrity check of - * [ChecksummedData.data][google.cloud.kms.v1.ChecksummedData.data] can be - * performed by computing the CRC32C checksum of - * [ChecksummedData.data][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value crc32c_checksum = 2; - * @param \Google\Protobuf\Int64Value $var - * @return $this - */ - public function setCrc32CChecksum($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); - $this->crc32c_checksum = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. - - * Integrity verification field. A CRC32C - * checksum of the returned - * [ChecksummedData.data][google.cloud.kms.v1.ChecksummedData.data]. An - * integrity check of - * [ChecksummedData.data][google.cloud.kms.v1.ChecksummedData.data] can be - * performed by computing the CRC32C checksum of - * [ChecksummedData.data][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value crc32c_checksum = 2; - * @param int|string|null $var - * @return $this - */ - public function setCrc32CChecksumUnwrapped($var) - { - $this->writeWrapperValue("crc32c_checksum", $var); - return $this;} - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateCryptoKeyRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateCryptoKeyRequest.php deleted file mode 100644 index 2eefa5ea5baa..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateCryptoKeyRequest.php +++ /dev/null @@ -1,241 +0,0 @@ -google.cloud.kms.v1.CreateCryptoKeyRequest - */ -class CreateCryptoKeyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The [name][google.cloud.kms.v1.KeyRing.name] of the KeyRing - * associated with the [CryptoKeys][google.cloud.kms.v1.CryptoKey]. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. It must be unique within a KeyRing and match the regular - * expression `[a-zA-Z0-9_-]{1,63}` - * - * Generated from protobuf field string crypto_key_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $crypto_key_id = ''; - /** - * Required. A [CryptoKey][google.cloud.kms.v1.CryptoKey] with initial field - * values. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKey crypto_key = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $crypto_key = null; - /** - * If set to true, the request will create a - * [CryptoKey][google.cloud.kms.v1.CryptoKey] without any - * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. You must - * manually call - * [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion] - * or - * [ImportCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.ImportCryptoKeyVersion] - * before you can use this [CryptoKey][google.cloud.kms.v1.CryptoKey]. - * - * Generated from protobuf field bool skip_initial_version_creation = 5; - */ - protected $skip_initial_version_creation = false; - - /** - * @param string $parent Required. The [name][google.cloud.kms.v1.KeyRing.name] of the KeyRing - * associated with the [CryptoKeys][google.cloud.kms.v1.CryptoKey]. Please see - * {@see KeyManagementServiceClient::keyRingName()} for help formatting this field. - * @param string $cryptoKeyId Required. It must be unique within a KeyRing and match the regular - * expression `[a-zA-Z0-9_-]{1,63}` - * @param \Google\Cloud\Kms\V1\CryptoKey $cryptoKey Required. A [CryptoKey][google.cloud.kms.v1.CryptoKey] with initial field - * values. - * - * @return \Google\Cloud\Kms\V1\CreateCryptoKeyRequest - * - * @experimental - */ - public static function build(string $parent, string $cryptoKeyId, \Google\Cloud\Kms\V1\CryptoKey $cryptoKey): self - { - return (new self()) - ->setParent($parent) - ->setCryptoKeyId($cryptoKeyId) - ->setCryptoKey($cryptoKey); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The [name][google.cloud.kms.v1.KeyRing.name] of the KeyRing - * associated with the [CryptoKeys][google.cloud.kms.v1.CryptoKey]. - * @type string $crypto_key_id - * Required. It must be unique within a KeyRing and match the regular - * expression `[a-zA-Z0-9_-]{1,63}` - * @type \Google\Cloud\Kms\V1\CryptoKey $crypto_key - * Required. A [CryptoKey][google.cloud.kms.v1.CryptoKey] with initial field - * values. - * @type bool $skip_initial_version_creation - * If set to true, the request will create a - * [CryptoKey][google.cloud.kms.v1.CryptoKey] without any - * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. You must - * manually call - * [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion] - * or - * [ImportCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.ImportCryptoKeyVersion] - * before you can use this [CryptoKey][google.cloud.kms.v1.CryptoKey]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The [name][google.cloud.kms.v1.KeyRing.name] of the KeyRing - * associated with the [CryptoKeys][google.cloud.kms.v1.CryptoKey]. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The [name][google.cloud.kms.v1.KeyRing.name] of the KeyRing - * associated with the [CryptoKeys][google.cloud.kms.v1.CryptoKey]. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. It must be unique within a KeyRing and match the regular - * expression `[a-zA-Z0-9_-]{1,63}` - * - * Generated from protobuf field string crypto_key_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getCryptoKeyId() - { - return $this->crypto_key_id; - } - - /** - * Required. It must be unique within a KeyRing and match the regular - * expression `[a-zA-Z0-9_-]{1,63}` - * - * Generated from protobuf field string crypto_key_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setCryptoKeyId($var) - { - GPBUtil::checkString($var, True); - $this->crypto_key_id = $var; - - return $this; - } - - /** - * Required. A [CryptoKey][google.cloud.kms.v1.CryptoKey] with initial field - * values. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKey crypto_key = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Kms\V1\CryptoKey|null - */ - public function getCryptoKey() - { - return $this->crypto_key; - } - - public function hasCryptoKey() - { - return isset($this->crypto_key); - } - - public function clearCryptoKey() - { - unset($this->crypto_key); - } - - /** - * Required. A [CryptoKey][google.cloud.kms.v1.CryptoKey] with initial field - * values. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKey crypto_key = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Kms\V1\CryptoKey $var - * @return $this - */ - public function setCryptoKey($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\CryptoKey::class); - $this->crypto_key = $var; - - return $this; - } - - /** - * If set to true, the request will create a - * [CryptoKey][google.cloud.kms.v1.CryptoKey] without any - * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. You must - * manually call - * [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion] - * or - * [ImportCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.ImportCryptoKeyVersion] - * before you can use this [CryptoKey][google.cloud.kms.v1.CryptoKey]. - * - * Generated from protobuf field bool skip_initial_version_creation = 5; - * @return bool - */ - public function getSkipInitialVersionCreation() - { - return $this->skip_initial_version_creation; - } - - /** - * If set to true, the request will create a - * [CryptoKey][google.cloud.kms.v1.CryptoKey] without any - * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. You must - * manually call - * [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion] - * or - * [ImportCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.ImportCryptoKeyVersion] - * before you can use this [CryptoKey][google.cloud.kms.v1.CryptoKey]. - * - * Generated from protobuf field bool skip_initial_version_creation = 5; - * @param bool $var - * @return $this - */ - public function setSkipInitialVersionCreation($var) - { - GPBUtil::checkBool($var); - $this->skip_initial_version_creation = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateCryptoKeyVersionRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateCryptoKeyVersionRequest.php deleted file mode 100644 index ed1c2af7bf26..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateCryptoKeyVersionRequest.php +++ /dev/null @@ -1,143 +0,0 @@ -google.cloud.kms.v1.CreateCryptoKeyVersionRequest - */ -class CreateCryptoKeyVersionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The [name][google.cloud.kms.v1.CryptoKey.name] of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] associated with the - * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. A [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with - * initial field values. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion crypto_key_version = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $crypto_key_version = null; - - /** - * @param string $parent Required. The [name][google.cloud.kms.v1.CryptoKey.name] of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] associated with the - * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. Please see - * {@see KeyManagementServiceClient::cryptoKeyName()} for help formatting this field. - * @param \Google\Cloud\Kms\V1\CryptoKeyVersion $cryptoKeyVersion Required. A [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with - * initial field values. - * - * @return \Google\Cloud\Kms\V1\CreateCryptoKeyVersionRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Kms\V1\CryptoKeyVersion $cryptoKeyVersion): self - { - return (new self()) - ->setParent($parent) - ->setCryptoKeyVersion($cryptoKeyVersion); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The [name][google.cloud.kms.v1.CryptoKey.name] of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] associated with the - * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. - * @type \Google\Cloud\Kms\V1\CryptoKeyVersion $crypto_key_version - * Required. A [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with - * initial field values. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The [name][google.cloud.kms.v1.CryptoKey.name] of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] associated with the - * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The [name][google.cloud.kms.v1.CryptoKey.name] of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] associated with the - * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. A [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with - * initial field values. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion crypto_key_version = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Kms\V1\CryptoKeyVersion|null - */ - public function getCryptoKeyVersion() - { - return $this->crypto_key_version; - } - - public function hasCryptoKeyVersion() - { - return isset($this->crypto_key_version); - } - - public function clearCryptoKeyVersion() - { - unset($this->crypto_key_version); - } - - /** - * Required. A [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with - * initial field values. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion crypto_key_version = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Kms\V1\CryptoKeyVersion $var - * @return $this - */ - public function setCryptoKeyVersion($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\CryptoKeyVersion::class); - $this->crypto_key_version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateEkmConnectionRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateEkmConnectionRequest.php deleted file mode 100644 index 0b087b989419..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateEkmConnectionRequest.php +++ /dev/null @@ -1,184 +0,0 @@ -google.cloud.kms.v1.CreateEkmConnectionRequest - */ -class CreateEkmConnectionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the location associated with the - * [EkmConnection][google.cloud.kms.v1.EkmConnection], in the format - * `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. It must be unique within a location and match the regular - * expression `[a-zA-Z0-9_-]{1,63}`. - * - * Generated from protobuf field string ekm_connection_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $ekm_connection_id = ''; - /** - * Required. An [EkmConnection][google.cloud.kms.v1.EkmConnection] with - * initial field values. - * - * Generated from protobuf field .google.cloud.kms.v1.EkmConnection ekm_connection = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $ekm_connection = null; - - /** - * @param string $parent Required. The resource name of the location associated with the - * [EkmConnection][google.cloud.kms.v1.EkmConnection], in the format - * `projects/*/locations/*`. Please see - * {@see EkmServiceClient::locationName()} for help formatting this field. - * @param string $ekmConnectionId Required. It must be unique within a location and match the regular - * expression `[a-zA-Z0-9_-]{1,63}`. - * @param \Google\Cloud\Kms\V1\EkmConnection $ekmConnection Required. An [EkmConnection][google.cloud.kms.v1.EkmConnection] with - * initial field values. - * - * @return \Google\Cloud\Kms\V1\CreateEkmConnectionRequest - * - * @experimental - */ - public static function build(string $parent, string $ekmConnectionId, \Google\Cloud\Kms\V1\EkmConnection $ekmConnection): self - { - return (new self()) - ->setParent($parent) - ->setEkmConnectionId($ekmConnectionId) - ->setEkmConnection($ekmConnection); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the location associated with the - * [EkmConnection][google.cloud.kms.v1.EkmConnection], in the format - * `projects/*/locations/*`. - * @type string $ekm_connection_id - * Required. It must be unique within a location and match the regular - * expression `[a-zA-Z0-9_-]{1,63}`. - * @type \Google\Cloud\Kms\V1\EkmConnection $ekm_connection - * Required. An [EkmConnection][google.cloud.kms.v1.EkmConnection] with - * initial field values. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\EkmService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the location associated with the - * [EkmConnection][google.cloud.kms.v1.EkmConnection], in the format - * `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource name of the location associated with the - * [EkmConnection][google.cloud.kms.v1.EkmConnection], in the format - * `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. It must be unique within a location and match the regular - * expression `[a-zA-Z0-9_-]{1,63}`. - * - * Generated from protobuf field string ekm_connection_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getEkmConnectionId() - { - return $this->ekm_connection_id; - } - - /** - * Required. It must be unique within a location and match the regular - * expression `[a-zA-Z0-9_-]{1,63}`. - * - * Generated from protobuf field string ekm_connection_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setEkmConnectionId($var) - { - GPBUtil::checkString($var, True); - $this->ekm_connection_id = $var; - - return $this; - } - - /** - * Required. An [EkmConnection][google.cloud.kms.v1.EkmConnection] with - * initial field values. - * - * Generated from protobuf field .google.cloud.kms.v1.EkmConnection ekm_connection = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Kms\V1\EkmConnection|null - */ - public function getEkmConnection() - { - return $this->ekm_connection; - } - - public function hasEkmConnection() - { - return isset($this->ekm_connection); - } - - public function clearEkmConnection() - { - unset($this->ekm_connection); - } - - /** - * Required. An [EkmConnection][google.cloud.kms.v1.EkmConnection] with - * initial field values. - * - * Generated from protobuf field .google.cloud.kms.v1.EkmConnection ekm_connection = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Kms\V1\EkmConnection $var - * @return $this - */ - public function setEkmConnection($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\EkmConnection::class); - $this->ekm_connection = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateImportJobRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateImportJobRequest.php deleted file mode 100644 index cf82ffb0e04a..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateImportJobRequest.php +++ /dev/null @@ -1,184 +0,0 @@ -google.cloud.kms.v1.CreateImportJobRequest - */ -class CreateImportJobRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The [name][google.cloud.kms.v1.KeyRing.name] of the - * [KeyRing][google.cloud.kms.v1.KeyRing] associated with the - * [ImportJobs][google.cloud.kms.v1.ImportJob]. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. It must be unique within a KeyRing and match the regular - * expression `[a-zA-Z0-9_-]{1,63}` - * - * Generated from protobuf field string import_job_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $import_job_id = ''; - /** - * Required. An [ImportJob][google.cloud.kms.v1.ImportJob] with initial field - * values. - * - * Generated from protobuf field .google.cloud.kms.v1.ImportJob import_job = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $import_job = null; - - /** - * @param string $parent Required. The [name][google.cloud.kms.v1.KeyRing.name] of the - * [KeyRing][google.cloud.kms.v1.KeyRing] associated with the - * [ImportJobs][google.cloud.kms.v1.ImportJob]. Please see - * {@see KeyManagementServiceClient::keyRingName()} for help formatting this field. - * @param string $importJobId Required. It must be unique within a KeyRing and match the regular - * expression `[a-zA-Z0-9_-]{1,63}` - * @param \Google\Cloud\Kms\V1\ImportJob $importJob Required. An [ImportJob][google.cloud.kms.v1.ImportJob] with initial field - * values. - * - * @return \Google\Cloud\Kms\V1\CreateImportJobRequest - * - * @experimental - */ - public static function build(string $parent, string $importJobId, \Google\Cloud\Kms\V1\ImportJob $importJob): self - { - return (new self()) - ->setParent($parent) - ->setImportJobId($importJobId) - ->setImportJob($importJob); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The [name][google.cloud.kms.v1.KeyRing.name] of the - * [KeyRing][google.cloud.kms.v1.KeyRing] associated with the - * [ImportJobs][google.cloud.kms.v1.ImportJob]. - * @type string $import_job_id - * Required. It must be unique within a KeyRing and match the regular - * expression `[a-zA-Z0-9_-]{1,63}` - * @type \Google\Cloud\Kms\V1\ImportJob $import_job - * Required. An [ImportJob][google.cloud.kms.v1.ImportJob] with initial field - * values. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The [name][google.cloud.kms.v1.KeyRing.name] of the - * [KeyRing][google.cloud.kms.v1.KeyRing] associated with the - * [ImportJobs][google.cloud.kms.v1.ImportJob]. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The [name][google.cloud.kms.v1.KeyRing.name] of the - * [KeyRing][google.cloud.kms.v1.KeyRing] associated with the - * [ImportJobs][google.cloud.kms.v1.ImportJob]. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. It must be unique within a KeyRing and match the regular - * expression `[a-zA-Z0-9_-]{1,63}` - * - * Generated from protobuf field string import_job_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getImportJobId() - { - return $this->import_job_id; - } - - /** - * Required. It must be unique within a KeyRing and match the regular - * expression `[a-zA-Z0-9_-]{1,63}` - * - * Generated from protobuf field string import_job_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setImportJobId($var) - { - GPBUtil::checkString($var, True); - $this->import_job_id = $var; - - return $this; - } - - /** - * Required. An [ImportJob][google.cloud.kms.v1.ImportJob] with initial field - * values. - * - * Generated from protobuf field .google.cloud.kms.v1.ImportJob import_job = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Kms\V1\ImportJob|null - */ - public function getImportJob() - { - return $this->import_job; - } - - public function hasImportJob() - { - return isset($this->import_job); - } - - public function clearImportJob() - { - unset($this->import_job); - } - - /** - * Required. An [ImportJob][google.cloud.kms.v1.ImportJob] with initial field - * values. - * - * Generated from protobuf field .google.cloud.kms.v1.ImportJob import_job = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Kms\V1\ImportJob $var - * @return $this - */ - public function setImportJob($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\ImportJob::class); - $this->import_job = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateKeyHandleMetadata.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateKeyHandleMetadata.php deleted file mode 100644 index c55a5d085cd8..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateKeyHandleMetadata.php +++ /dev/null @@ -1,35 +0,0 @@ -google.cloud.kms.v1.CreateKeyHandleMetadata - */ -class CreateKeyHandleMetadata extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Autokey::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateKeyHandleRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateKeyHandleRequest.php deleted file mode 100644 index b8cdd62f5531..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateKeyHandleRequest.php +++ /dev/null @@ -1,184 +0,0 @@ -google.cloud.kms.v1.CreateKeyHandleRequest - */ -class CreateKeyHandleRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the resource project and location to create the - * [KeyHandle][google.cloud.kms.v1.KeyHandle] in, e.g. - * `projects/{PROJECT_ID}/locations/{LOCATION}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Id of the [KeyHandle][google.cloud.kms.v1.KeyHandle]. Must be - * unique to the resource project and location. If not provided by the caller, - * a new UUID is used. - * - * Generated from protobuf field string key_handle_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $key_handle_id = ''; - /** - * Required. [KeyHandle][google.cloud.kms.v1.KeyHandle] to create. - * - * Generated from protobuf field .google.cloud.kms.v1.KeyHandle key_handle = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $key_handle = null; - - /** - * @param string $parent Required. Name of the resource project and location to create the - * [KeyHandle][google.cloud.kms.v1.KeyHandle] in, e.g. - * `projects/{PROJECT_ID}/locations/{LOCATION}`. Please see - * {@see AutokeyClient::locationName()} for help formatting this field. - * @param \Google\Cloud\Kms\V1\KeyHandle $keyHandle Required. [KeyHandle][google.cloud.kms.v1.KeyHandle] to create. - * @param string $keyHandleId Optional. Id of the [KeyHandle][google.cloud.kms.v1.KeyHandle]. Must be - * unique to the resource project and location. If not provided by the caller, - * a new UUID is used. - * - * @return \Google\Cloud\Kms\V1\CreateKeyHandleRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Kms\V1\KeyHandle $keyHandle, string $keyHandleId): self - { - return (new self()) - ->setParent($parent) - ->setKeyHandle($keyHandle) - ->setKeyHandleId($keyHandleId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Name of the resource project and location to create the - * [KeyHandle][google.cloud.kms.v1.KeyHandle] in, e.g. - * `projects/{PROJECT_ID}/locations/{LOCATION}`. - * @type string $key_handle_id - * Optional. Id of the [KeyHandle][google.cloud.kms.v1.KeyHandle]. Must be - * unique to the resource project and location. If not provided by the caller, - * a new UUID is used. - * @type \Google\Cloud\Kms\V1\KeyHandle $key_handle - * Required. [KeyHandle][google.cloud.kms.v1.KeyHandle] to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Autokey::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the resource project and location to create the - * [KeyHandle][google.cloud.kms.v1.KeyHandle] in, e.g. - * `projects/{PROJECT_ID}/locations/{LOCATION}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Name of the resource project and location to create the - * [KeyHandle][google.cloud.kms.v1.KeyHandle] in, e.g. - * `projects/{PROJECT_ID}/locations/{LOCATION}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. Id of the [KeyHandle][google.cloud.kms.v1.KeyHandle]. Must be - * unique to the resource project and location. If not provided by the caller, - * a new UUID is used. - * - * Generated from protobuf field string key_handle_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getKeyHandleId() - { - return $this->key_handle_id; - } - - /** - * Optional. Id of the [KeyHandle][google.cloud.kms.v1.KeyHandle]. Must be - * unique to the resource project and location. If not provided by the caller, - * a new UUID is used. - * - * Generated from protobuf field string key_handle_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setKeyHandleId($var) - { - GPBUtil::checkString($var, True); - $this->key_handle_id = $var; - - return $this; - } - - /** - * Required. [KeyHandle][google.cloud.kms.v1.KeyHandle] to create. - * - * Generated from protobuf field .google.cloud.kms.v1.KeyHandle key_handle = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Kms\V1\KeyHandle|null - */ - public function getKeyHandle() - { - return $this->key_handle; - } - - public function hasKeyHandle() - { - return isset($this->key_handle); - } - - public function clearKeyHandle() - { - unset($this->key_handle); - } - - /** - * Required. [KeyHandle][google.cloud.kms.v1.KeyHandle] to create. - * - * Generated from protobuf field .google.cloud.kms.v1.KeyHandle key_handle = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Kms\V1\KeyHandle $var - * @return $this - */ - public function setKeyHandle($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\KeyHandle::class); - $this->key_handle = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateKeyRingRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateKeyRingRequest.php deleted file mode 100644 index 22c6f3b3054f..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateKeyRingRequest.php +++ /dev/null @@ -1,184 +0,0 @@ -google.cloud.kms.v1.CreateKeyRingRequest - */ -class CreateKeyRingRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the location associated with the - * [KeyRings][google.cloud.kms.v1.KeyRing], in the format - * `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. It must be unique within a location and match the regular - * expression `[a-zA-Z0-9_-]{1,63}` - * - * Generated from protobuf field string key_ring_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $key_ring_id = ''; - /** - * Required. A [KeyRing][google.cloud.kms.v1.KeyRing] with initial field - * values. - * - * Generated from protobuf field .google.cloud.kms.v1.KeyRing key_ring = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $key_ring = null; - - /** - * @param string $parent Required. The resource name of the location associated with the - * [KeyRings][google.cloud.kms.v1.KeyRing], in the format - * `projects/*/locations/*`. Please see - * {@see KeyManagementServiceClient::locationName()} for help formatting this field. - * @param string $keyRingId Required. It must be unique within a location and match the regular - * expression `[a-zA-Z0-9_-]{1,63}` - * @param \Google\Cloud\Kms\V1\KeyRing $keyRing Required. A [KeyRing][google.cloud.kms.v1.KeyRing] with initial field - * values. - * - * @return \Google\Cloud\Kms\V1\CreateKeyRingRequest - * - * @experimental - */ - public static function build(string $parent, string $keyRingId, \Google\Cloud\Kms\V1\KeyRing $keyRing): self - { - return (new self()) - ->setParent($parent) - ->setKeyRingId($keyRingId) - ->setKeyRing($keyRing); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the location associated with the - * [KeyRings][google.cloud.kms.v1.KeyRing], in the format - * `projects/*/locations/*`. - * @type string $key_ring_id - * Required. It must be unique within a location and match the regular - * expression `[a-zA-Z0-9_-]{1,63}` - * @type \Google\Cloud\Kms\V1\KeyRing $key_ring - * Required. A [KeyRing][google.cloud.kms.v1.KeyRing] with initial field - * values. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the location associated with the - * [KeyRings][google.cloud.kms.v1.KeyRing], in the format - * `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource name of the location associated with the - * [KeyRings][google.cloud.kms.v1.KeyRing], in the format - * `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. It must be unique within a location and match the regular - * expression `[a-zA-Z0-9_-]{1,63}` - * - * Generated from protobuf field string key_ring_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getKeyRingId() - { - return $this->key_ring_id; - } - - /** - * Required. It must be unique within a location and match the regular - * expression `[a-zA-Z0-9_-]{1,63}` - * - * Generated from protobuf field string key_ring_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setKeyRingId($var) - { - GPBUtil::checkString($var, True); - $this->key_ring_id = $var; - - return $this; - } - - /** - * Required. A [KeyRing][google.cloud.kms.v1.KeyRing] with initial field - * values. - * - * Generated from protobuf field .google.cloud.kms.v1.KeyRing key_ring = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Kms\V1\KeyRing|null - */ - public function getKeyRing() - { - return $this->key_ring; - } - - public function hasKeyRing() - { - return isset($this->key_ring); - } - - public function clearKeyRing() - { - unset($this->key_ring); - } - - /** - * Required. A [KeyRing][google.cloud.kms.v1.KeyRing] with initial field - * values. - * - * Generated from protobuf field .google.cloud.kms.v1.KeyRing key_ring = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Kms\V1\KeyRing $var - * @return $this - */ - public function setKeyRing($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\KeyRing::class); - $this->key_ring = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateSingleTenantHsmInstanceMetadata.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateSingleTenantHsmInstanceMetadata.php deleted file mode 100644 index 61554c8f30b5..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateSingleTenantHsmInstanceMetadata.php +++ /dev/null @@ -1,35 +0,0 @@ -google.cloud.kms.v1.CreateSingleTenantHsmInstanceMetadata - */ -class CreateSingleTenantHsmInstanceMetadata extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\HsmManagement::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateSingleTenantHsmInstanceProposalMetadata.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateSingleTenantHsmInstanceProposalMetadata.php deleted file mode 100644 index c1b37ac76396..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateSingleTenantHsmInstanceProposalMetadata.php +++ /dev/null @@ -1,35 +0,0 @@ -google.cloud.kms.v1.CreateSingleTenantHsmInstanceProposalMetadata - */ -class CreateSingleTenantHsmInstanceProposalMetadata extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\HsmManagement::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateSingleTenantHsmInstanceProposalRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateSingleTenantHsmInstanceProposalRequest.php deleted file mode 100644 index a5136abe38c2..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateSingleTenantHsmInstanceProposalRequest.php +++ /dev/null @@ -1,194 +0,0 @@ -google.cloud.kms.v1.CreateSingleTenantHsmInstanceProposalRequest - */ -class CreateSingleTenantHsmInstanceProposalRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The [name][google.cloud.kms.v1.SingleTenantHsmInstance.name] of - * the [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] - * associated with the - * [SingleTenantHsmInstanceProposals][google.cloud.kms.v1.SingleTenantHsmInstanceProposal]. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. It must be unique within a location and match the regular - * expression `[a-zA-Z0-9_-]{1,63}`. - * - * Generated from protobuf field string single_tenant_hsm_instance_proposal_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $single_tenant_hsm_instance_proposal_id = ''; - /** - * Required. The - * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * to create. - * - * Generated from protobuf field .google.cloud.kms.v1.SingleTenantHsmInstanceProposal single_tenant_hsm_instance_proposal = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $single_tenant_hsm_instance_proposal = null; - - /** - * @param string $parent Required. The [name][google.cloud.kms.v1.SingleTenantHsmInstance.name] of - * the [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] - * associated with the - * [SingleTenantHsmInstanceProposals][google.cloud.kms.v1.SingleTenantHsmInstanceProposal]. Please see - * {@see HsmManagementClient::singleTenantHsmInstanceName()} for help formatting this field. - * @param \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal $singleTenantHsmInstanceProposal Required. The - * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * to create. - * @param string $singleTenantHsmInstanceProposalId Optional. It must be unique within a location and match the regular - * expression `[a-zA-Z0-9_-]{1,63}`. - * - * @return \Google\Cloud\Kms\V1\CreateSingleTenantHsmInstanceProposalRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal $singleTenantHsmInstanceProposal, string $singleTenantHsmInstanceProposalId): self - { - return (new self()) - ->setParent($parent) - ->setSingleTenantHsmInstanceProposal($singleTenantHsmInstanceProposal) - ->setSingleTenantHsmInstanceProposalId($singleTenantHsmInstanceProposalId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The [name][google.cloud.kms.v1.SingleTenantHsmInstance.name] of - * the [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] - * associated with the - * [SingleTenantHsmInstanceProposals][google.cloud.kms.v1.SingleTenantHsmInstanceProposal]. - * @type string $single_tenant_hsm_instance_proposal_id - * Optional. It must be unique within a location and match the regular - * expression `[a-zA-Z0-9_-]{1,63}`. - * @type \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal $single_tenant_hsm_instance_proposal - * Required. The - * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\HsmManagement::initOnce(); - parent::__construct($data); - } - - /** - * Required. The [name][google.cloud.kms.v1.SingleTenantHsmInstance.name] of - * the [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] - * associated with the - * [SingleTenantHsmInstanceProposals][google.cloud.kms.v1.SingleTenantHsmInstanceProposal]. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The [name][google.cloud.kms.v1.SingleTenantHsmInstance.name] of - * the [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] - * associated with the - * [SingleTenantHsmInstanceProposals][google.cloud.kms.v1.SingleTenantHsmInstanceProposal]. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. It must be unique within a location and match the regular - * expression `[a-zA-Z0-9_-]{1,63}`. - * - * Generated from protobuf field string single_tenant_hsm_instance_proposal_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getSingleTenantHsmInstanceProposalId() - { - return $this->single_tenant_hsm_instance_proposal_id; - } - - /** - * Optional. It must be unique within a location and match the regular - * expression `[a-zA-Z0-9_-]{1,63}`. - * - * Generated from protobuf field string single_tenant_hsm_instance_proposal_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setSingleTenantHsmInstanceProposalId($var) - { - GPBUtil::checkString($var, True); - $this->single_tenant_hsm_instance_proposal_id = $var; - - return $this; - } - - /** - * Required. The - * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * to create. - * - * Generated from protobuf field .google.cloud.kms.v1.SingleTenantHsmInstanceProposal single_tenant_hsm_instance_proposal = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal|null - */ - public function getSingleTenantHsmInstanceProposal() - { - return $this->single_tenant_hsm_instance_proposal; - } - - public function hasSingleTenantHsmInstanceProposal() - { - return isset($this->single_tenant_hsm_instance_proposal); - } - - public function clearSingleTenantHsmInstanceProposal() - { - unset($this->single_tenant_hsm_instance_proposal); - } - - /** - * Required. The - * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * to create. - * - * Generated from protobuf field .google.cloud.kms.v1.SingleTenantHsmInstanceProposal single_tenant_hsm_instance_proposal = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal $var - * @return $this - */ - public function setSingleTenantHsmInstanceProposal($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal::class); - $this->single_tenant_hsm_instance_proposal = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateSingleTenantHsmInstanceRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateSingleTenantHsmInstanceRequest.php deleted file mode 100644 index 9863f85180c3..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateSingleTenantHsmInstanceRequest.php +++ /dev/null @@ -1,189 +0,0 @@ -google.cloud.kms.v1.CreateSingleTenantHsmInstanceRequest - */ -class CreateSingleTenantHsmInstanceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the location associated with the - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance], in - * the format `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. It must be unique within a location and match the regular - * expression `[a-zA-Z0-9_-]{1,63}`. - * - * Generated from protobuf field string single_tenant_hsm_instance_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $single_tenant_hsm_instance_id = ''; - /** - * Required. An - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] with - * initial field values. - * - * Generated from protobuf field .google.cloud.kms.v1.SingleTenantHsmInstance single_tenant_hsm_instance = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $single_tenant_hsm_instance = null; - - /** - * @param string $parent Required. The resource name of the location associated with the - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance], in - * the format `projects/*/locations/*`. Please see - * {@see HsmManagementClient::locationName()} for help formatting this field. - * @param \Google\Cloud\Kms\V1\SingleTenantHsmInstance $singleTenantHsmInstance Required. An - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] with - * initial field values. - * @param string $singleTenantHsmInstanceId Optional. It must be unique within a location and match the regular - * expression `[a-zA-Z0-9_-]{1,63}`. - * - * @return \Google\Cloud\Kms\V1\CreateSingleTenantHsmInstanceRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Kms\V1\SingleTenantHsmInstance $singleTenantHsmInstance, string $singleTenantHsmInstanceId): self - { - return (new self()) - ->setParent($parent) - ->setSingleTenantHsmInstance($singleTenantHsmInstance) - ->setSingleTenantHsmInstanceId($singleTenantHsmInstanceId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the location associated with the - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance], in - * the format `projects/*/locations/*`. - * @type string $single_tenant_hsm_instance_id - * Optional. It must be unique within a location and match the regular - * expression `[a-zA-Z0-9_-]{1,63}`. - * @type \Google\Cloud\Kms\V1\SingleTenantHsmInstance $single_tenant_hsm_instance - * Required. An - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] with - * initial field values. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\HsmManagement::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the location associated with the - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance], in - * the format `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource name of the location associated with the - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance], in - * the format `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. It must be unique within a location and match the regular - * expression `[a-zA-Z0-9_-]{1,63}`. - * - * Generated from protobuf field string single_tenant_hsm_instance_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getSingleTenantHsmInstanceId() - { - return $this->single_tenant_hsm_instance_id; - } - - /** - * Optional. It must be unique within a location and match the regular - * expression `[a-zA-Z0-9_-]{1,63}`. - * - * Generated from protobuf field string single_tenant_hsm_instance_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setSingleTenantHsmInstanceId($var) - { - GPBUtil::checkString($var, True); - $this->single_tenant_hsm_instance_id = $var; - - return $this; - } - - /** - * Required. An - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] with - * initial field values. - * - * Generated from protobuf field .google.cloud.kms.v1.SingleTenantHsmInstance single_tenant_hsm_instance = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Kms\V1\SingleTenantHsmInstance|null - */ - public function getSingleTenantHsmInstance() - { - return $this->single_tenant_hsm_instance; - } - - public function hasSingleTenantHsmInstance() - { - return isset($this->single_tenant_hsm_instance); - } - - public function clearSingleTenantHsmInstance() - { - unset($this->single_tenant_hsm_instance); - } - - /** - * Required. An - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] with - * initial field values. - * - * Generated from protobuf field .google.cloud.kms.v1.SingleTenantHsmInstance single_tenant_hsm_instance = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Kms\V1\SingleTenantHsmInstance $var - * @return $this - */ - public function setSingleTenantHsmInstance($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\SingleTenantHsmInstance::class); - $this->single_tenant_hsm_instance = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKey.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKey.php deleted file mode 100644 index e57c9615ea60..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKey.php +++ /dev/null @@ -1,768 +0,0 @@ -google.cloud.kms.v1.CryptoKey - */ -class CryptoKey extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The resource name for this - * [CryptoKey][google.cloud.kms.v1.CryptoKey] in the format - * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. A copy of the "primary" - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that will be used - * by [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt] when this - * [CryptoKey][google.cloud.kms.v1.CryptoKey] is given in - * [EncryptRequest.name][google.cloud.kms.v1.EncryptRequest.name]. - * The [CryptoKey][google.cloud.kms.v1.CryptoKey]'s primary version can be - * updated via - * [UpdateCryptoKeyPrimaryVersion][google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyPrimaryVersion]. - * Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose] - * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT] - * may have a primary. For other keys, this field will be omitted. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion primary = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $primary = null; - /** - * Immutable. The immutable purpose of this - * [CryptoKey][google.cloud.kms.v1.CryptoKey]. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose purpose = 3 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $purpose = 0; - /** - * Output only. The time at which this - * [CryptoKey][google.cloud.kms.v1.CryptoKey] was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * At [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time], - * the Key Management Service will automatically: - * 1. Create a new version of this [CryptoKey][google.cloud.kms.v1.CryptoKey]. - * 2. Mark the new version as primary. - * Key rotations performed manually via - * [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion] - * and - * [UpdateCryptoKeyPrimaryVersion][google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyPrimaryVersion] - * do not affect - * [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time]. - * Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose] - * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT] - * support automatic rotation. For other keys, this field must be omitted. - * - * Generated from protobuf field .google.protobuf.Timestamp next_rotation_time = 7; - */ - protected $next_rotation_time = null; - /** - * A template describing settings for new - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] instances. The - * properties of new [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] - * instances created by either - * [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion] - * or auto-rotation are controlled by this template. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersionTemplate version_template = 11; - */ - protected $version_template = null; - /** - * Labels with user-defined metadata. For more information, see - * [Labeling Keys](https://cloud.google.com/kms/docs/labeling-keys). - * - * Generated from protobuf field map labels = 10; - */ - private $labels; - /** - * Immutable. Whether this key may contain imported versions only. - * - * Generated from protobuf field bool import_only = 13 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $import_only = false; - /** - * Immutable. The period of time that versions of this key spend in the - * [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED] - * state before transitioning to - * [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED]. - * If not specified at creation time, the default duration is 30 days. - * - * Generated from protobuf field .google.protobuf.Duration destroy_scheduled_duration = 14 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $destroy_scheduled_duration = null; - /** - * Immutable. The resource name of the backend environment where the key - * material for all [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] - * associated with this [CryptoKey][google.cloud.kms.v1.CryptoKey] reside and - * where all related cryptographic operations are performed. Only applicable - * if [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] have a - * [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of - * [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC], with the - * resource name in the format `projects/*/locations/*/ekmConnections/*`. Only - * applicable if [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] - * have a [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of - * [HSM_SINGLE_TENANT][google.cloud.kms.v1.ProtectionLevel.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][google.cloud.kms.v1.ProtectionLevel] in the future. - * - * Generated from protobuf field string crypto_key_backend = 15 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { - */ - protected $crypto_key_backend = ''; - /** - * 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. - * - * Generated from protobuf field .google.cloud.kms.v1.KeyAccessJustificationsPolicy key_access_justifications_policy = 17 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $key_access_justifications_policy = null; - protected $rotation_schedule; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The resource name for this - * [CryptoKey][google.cloud.kms.v1.CryptoKey] in the format - * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. - * @type \Google\Cloud\Kms\V1\CryptoKeyVersion $primary - * Output only. A copy of the "primary" - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that will be used - * by [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt] when this - * [CryptoKey][google.cloud.kms.v1.CryptoKey] is given in - * [EncryptRequest.name][google.cloud.kms.v1.EncryptRequest.name]. - * The [CryptoKey][google.cloud.kms.v1.CryptoKey]'s primary version can be - * updated via - * [UpdateCryptoKeyPrimaryVersion][google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyPrimaryVersion]. - * Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose] - * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT] - * may have a primary. For other keys, this field will be omitted. - * @type int $purpose - * Immutable. The immutable purpose of this - * [CryptoKey][google.cloud.kms.v1.CryptoKey]. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time at which this - * [CryptoKey][google.cloud.kms.v1.CryptoKey] was created. - * @type \Google\Protobuf\Timestamp $next_rotation_time - * At [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time], - * the Key Management Service will automatically: - * 1. Create a new version of this [CryptoKey][google.cloud.kms.v1.CryptoKey]. - * 2. Mark the new version as primary. - * Key rotations performed manually via - * [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion] - * and - * [UpdateCryptoKeyPrimaryVersion][google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyPrimaryVersion] - * do not affect - * [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time]. - * Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose] - * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT] - * support automatic rotation. For other keys, this field must be omitted. - * @type \Google\Protobuf\Duration $rotation_period - * [next_rotation_time][google.cloud.kms.v1.CryptoKey.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][google.cloud.kms.v1.CryptoKey.rotation_period] is - * set, - * [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time] - * must also be set. - * Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose] - * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT] - * support automatic rotation. For other keys, this field must be omitted. - * @type \Google\Cloud\Kms\V1\CryptoKeyVersionTemplate $version_template - * A template describing settings for new - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] instances. The - * properties of new [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] - * instances created by either - * [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion] - * or auto-rotation are controlled by this template. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Labels with user-defined metadata. For more information, see - * [Labeling Keys](https://cloud.google.com/kms/docs/labeling-keys). - * @type bool $import_only - * Immutable. Whether this key may contain imported versions only. - * @type \Google\Protobuf\Duration $destroy_scheduled_duration - * Immutable. The period of time that versions of this key spend in the - * [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED] - * state before transitioning to - * [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED]. - * If not specified at creation time, the default duration is 30 days. - * @type string $crypto_key_backend - * Immutable. The resource name of the backend environment where the key - * material for all [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] - * associated with this [CryptoKey][google.cloud.kms.v1.CryptoKey] reside and - * where all related cryptographic operations are performed. Only applicable - * if [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] have a - * [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of - * [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC], with the - * resource name in the format `projects/*/locations/*/ekmConnections/*`. Only - * applicable if [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] - * have a [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of - * [HSM_SINGLE_TENANT][google.cloud.kms.v1.ProtectionLevel.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][google.cloud.kms.v1.ProtectionLevel] in the future. - * @type \Google\Cloud\Kms\V1\KeyAccessJustificationsPolicy $key_access_justifications_policy - * 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. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The resource name for this - * [CryptoKey][google.cloud.kms.v1.CryptoKey] in the format - * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The resource name for this - * [CryptoKey][google.cloud.kms.v1.CryptoKey] in the format - * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. A copy of the "primary" - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that will be used - * by [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt] when this - * [CryptoKey][google.cloud.kms.v1.CryptoKey] is given in - * [EncryptRequest.name][google.cloud.kms.v1.EncryptRequest.name]. - * The [CryptoKey][google.cloud.kms.v1.CryptoKey]'s primary version can be - * updated via - * [UpdateCryptoKeyPrimaryVersion][google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyPrimaryVersion]. - * Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose] - * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT] - * may have a primary. For other keys, this field will be omitted. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion primary = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Kms\V1\CryptoKeyVersion|null - */ - public function getPrimary() - { - return $this->primary; - } - - public function hasPrimary() - { - return isset($this->primary); - } - - public function clearPrimary() - { - unset($this->primary); - } - - /** - * Output only. A copy of the "primary" - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that will be used - * by [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt] when this - * [CryptoKey][google.cloud.kms.v1.CryptoKey] is given in - * [EncryptRequest.name][google.cloud.kms.v1.EncryptRequest.name]. - * The [CryptoKey][google.cloud.kms.v1.CryptoKey]'s primary version can be - * updated via - * [UpdateCryptoKeyPrimaryVersion][google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyPrimaryVersion]. - * Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose] - * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT] - * may have a primary. For other keys, this field will be omitted. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion primary = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Kms\V1\CryptoKeyVersion $var - * @return $this - */ - public function setPrimary($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\CryptoKeyVersion::class); - $this->primary = $var; - - return $this; - } - - /** - * Immutable. The immutable purpose of this - * [CryptoKey][google.cloud.kms.v1.CryptoKey]. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose purpose = 3 [(.google.api.field_behavior) = IMMUTABLE]; - * @return int - */ - public function getPurpose() - { - return $this->purpose; - } - - /** - * Immutable. The immutable purpose of this - * [CryptoKey][google.cloud.kms.v1.CryptoKey]. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose purpose = 3 [(.google.api.field_behavior) = IMMUTABLE]; - * @param int $var - * @return $this - */ - public function setPurpose($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\CryptoKey\CryptoKeyPurpose::class); - $this->purpose = $var; - - return $this; - } - - /** - * Output only. The time at which this - * [CryptoKey][google.cloud.kms.v1.CryptoKey] was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time at which this - * [CryptoKey][google.cloud.kms.v1.CryptoKey] was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * At [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time], - * the Key Management Service will automatically: - * 1. Create a new version of this [CryptoKey][google.cloud.kms.v1.CryptoKey]. - * 2. Mark the new version as primary. - * Key rotations performed manually via - * [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion] - * and - * [UpdateCryptoKeyPrimaryVersion][google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyPrimaryVersion] - * do not affect - * [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time]. - * Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose] - * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT] - * support automatic rotation. For other keys, this field must be omitted. - * - * Generated from protobuf field .google.protobuf.Timestamp next_rotation_time = 7; - * @return \Google\Protobuf\Timestamp|null - */ - public function getNextRotationTime() - { - return $this->next_rotation_time; - } - - public function hasNextRotationTime() - { - return isset($this->next_rotation_time); - } - - public function clearNextRotationTime() - { - unset($this->next_rotation_time); - } - - /** - * At [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time], - * the Key Management Service will automatically: - * 1. Create a new version of this [CryptoKey][google.cloud.kms.v1.CryptoKey]. - * 2. Mark the new version as primary. - * Key rotations performed manually via - * [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion] - * and - * [UpdateCryptoKeyPrimaryVersion][google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyPrimaryVersion] - * do not affect - * [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time]. - * Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose] - * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT] - * support automatic rotation. For other keys, this field must be omitted. - * - * Generated from protobuf field .google.protobuf.Timestamp next_rotation_time = 7; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setNextRotationTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->next_rotation_time = $var; - - return $this; - } - - /** - * [next_rotation_time][google.cloud.kms.v1.CryptoKey.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][google.cloud.kms.v1.CryptoKey.rotation_period] is - * set, - * [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time] - * must also be set. - * Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose] - * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT] - * support automatic rotation. For other keys, this field must be omitted. - * - * Generated from protobuf field .google.protobuf.Duration rotation_period = 8; - * @return \Google\Protobuf\Duration|null - */ - public function getRotationPeriod() - { - return $this->readOneof(8); - } - - public function hasRotationPeriod() - { - return $this->hasOneof(8); - } - - /** - * [next_rotation_time][google.cloud.kms.v1.CryptoKey.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][google.cloud.kms.v1.CryptoKey.rotation_period] is - * set, - * [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time] - * must also be set. - * Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose] - * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT] - * support automatic rotation. For other keys, this field must be omitted. - * - * Generated from protobuf field .google.protobuf.Duration rotation_period = 8; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setRotationPeriod($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->writeOneof(8, $var); - - return $this; - } - - /** - * A template describing settings for new - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] instances. The - * properties of new [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] - * instances created by either - * [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion] - * or auto-rotation are controlled by this template. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersionTemplate version_template = 11; - * @return \Google\Cloud\Kms\V1\CryptoKeyVersionTemplate|null - */ - public function getVersionTemplate() - { - return $this->version_template; - } - - public function hasVersionTemplate() - { - return isset($this->version_template); - } - - public function clearVersionTemplate() - { - unset($this->version_template); - } - - /** - * A template describing settings for new - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] instances. The - * properties of new [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] - * instances created by either - * [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion] - * or auto-rotation are controlled by this template. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersionTemplate version_template = 11; - * @param \Google\Cloud\Kms\V1\CryptoKeyVersionTemplate $var - * @return $this - */ - public function setVersionTemplate($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\CryptoKeyVersionTemplate::class); - $this->version_template = $var; - - return $this; - } - - /** - * Labels with user-defined metadata. For more information, see - * [Labeling Keys](https://cloud.google.com/kms/docs/labeling-keys). - * - * Generated from protobuf field map labels = 10; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Labels with user-defined metadata. For more information, see - * [Labeling Keys](https://cloud.google.com/kms/docs/labeling-keys). - * - * Generated from protobuf field map labels = 10; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Immutable. Whether this key may contain imported versions only. - * - * Generated from protobuf field bool import_only = 13 [(.google.api.field_behavior) = IMMUTABLE]; - * @return bool - */ - public function getImportOnly() - { - return $this->import_only; - } - - /** - * Immutable. Whether this key may contain imported versions only. - * - * Generated from protobuf field bool import_only = 13 [(.google.api.field_behavior) = IMMUTABLE]; - * @param bool $var - * @return $this - */ - public function setImportOnly($var) - { - GPBUtil::checkBool($var); - $this->import_only = $var; - - return $this; - } - - /** - * Immutable. The period of time that versions of this key spend in the - * [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED] - * state before transitioning to - * [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED]. - * If not specified at creation time, the default duration is 30 days. - * - * Generated from protobuf field .google.protobuf.Duration destroy_scheduled_duration = 14 [(.google.api.field_behavior) = IMMUTABLE]; - * @return \Google\Protobuf\Duration|null - */ - public function getDestroyScheduledDuration() - { - return $this->destroy_scheduled_duration; - } - - public function hasDestroyScheduledDuration() - { - return isset($this->destroy_scheduled_duration); - } - - public function clearDestroyScheduledDuration() - { - unset($this->destroy_scheduled_duration); - } - - /** - * Immutable. The period of time that versions of this key spend in the - * [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED] - * state before transitioning to - * [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED]. - * If not specified at creation time, the default duration is 30 days. - * - * Generated from protobuf field .google.protobuf.Duration destroy_scheduled_duration = 14 [(.google.api.field_behavior) = IMMUTABLE]; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setDestroyScheduledDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->destroy_scheduled_duration = $var; - - return $this; - } - - /** - * Immutable. The resource name of the backend environment where the key - * material for all [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] - * associated with this [CryptoKey][google.cloud.kms.v1.CryptoKey] reside and - * where all related cryptographic operations are performed. Only applicable - * if [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] have a - * [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of - * [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC], with the - * resource name in the format `projects/*/locations/*/ekmConnections/*`. Only - * applicable if [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] - * have a [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of - * [HSM_SINGLE_TENANT][google.cloud.kms.v1.ProtectionLevel.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][google.cloud.kms.v1.ProtectionLevel] in the future. - * - * Generated from protobuf field string crypto_key_backend = 15 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { - * @return string - */ - public function getCryptoKeyBackend() - { - return $this->crypto_key_backend; - } - - /** - * Immutable. The resource name of the backend environment where the key - * material for all [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] - * associated with this [CryptoKey][google.cloud.kms.v1.CryptoKey] reside and - * where all related cryptographic operations are performed. Only applicable - * if [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] have a - * [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of - * [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC], with the - * resource name in the format `projects/*/locations/*/ekmConnections/*`. Only - * applicable if [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] - * have a [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of - * [HSM_SINGLE_TENANT][google.cloud.kms.v1.ProtectionLevel.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][google.cloud.kms.v1.ProtectionLevel] in the future. - * - * Generated from protobuf field string crypto_key_backend = 15 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setCryptoKeyBackend($var) - { - GPBUtil::checkString($var, True); - $this->crypto_key_backend = $var; - - return $this; - } - - /** - * 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. - * - * Generated from protobuf field .google.cloud.kms.v1.KeyAccessJustificationsPolicy key_access_justifications_policy = 17 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Kms\V1\KeyAccessJustificationsPolicy|null - */ - public function getKeyAccessJustificationsPolicy() - { - return $this->key_access_justifications_policy; - } - - public function hasKeyAccessJustificationsPolicy() - { - return isset($this->key_access_justifications_policy); - } - - public function clearKeyAccessJustificationsPolicy() - { - unset($this->key_access_justifications_policy); - } - - /** - * 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. - * - * Generated from protobuf field .google.cloud.kms.v1.KeyAccessJustificationsPolicy key_access_justifications_policy = 17 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Kms\V1\KeyAccessJustificationsPolicy $var - * @return $this - */ - public function setKeyAccessJustificationsPolicy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\KeyAccessJustificationsPolicy::class); - $this->key_access_justifications_policy = $var; - - return $this; - } - - /** - * @return string - */ - public function getRotationSchedule() - { - return $this->whichOneof("rotation_schedule"); - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKey/CryptoKeyPurpose.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKey/CryptoKeyPurpose.php deleted file mode 100644 index b0f4767bbd60..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKey/CryptoKeyPurpose.php +++ /dev/null @@ -1,114 +0,0 @@ -google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose - */ -class CryptoKeyPurpose -{ - /** - * Not specified. - * - * Generated from protobuf enum CRYPTO_KEY_PURPOSE_UNSPECIFIED = 0; - */ - const CRYPTO_KEY_PURPOSE_UNSPECIFIED = 0; - /** - * [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used - * with [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt] and - * [Decrypt][google.cloud.kms.v1.KeyManagementService.Decrypt]. - * - * Generated from protobuf enum ENCRYPT_DECRYPT = 1; - */ - const ENCRYPT_DECRYPT = 1; - /** - * [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used - * with - * [AsymmetricSign][google.cloud.kms.v1.KeyManagementService.AsymmetricSign] - * and - * [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey]. - * - * Generated from protobuf enum ASYMMETRIC_SIGN = 5; - */ - const ASYMMETRIC_SIGN = 5; - /** - * [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used - * with - * [AsymmetricDecrypt][google.cloud.kms.v1.KeyManagementService.AsymmetricDecrypt] - * and - * [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey]. - * - * Generated from protobuf enum ASYMMETRIC_DECRYPT = 6; - */ - const ASYMMETRIC_DECRYPT = 6; - /** - * [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used - * with [RawEncrypt][google.cloud.kms.v1.KeyManagementService.RawEncrypt] - * and [RawDecrypt][google.cloud.kms.v1.KeyManagementService.RawDecrypt]. - * This purpose is meant to be used for interoperable symmetric - * encryption and does not support automatic CryptoKey rotation. - * - * Generated from protobuf enum RAW_ENCRYPT_DECRYPT = 7; - */ - const RAW_ENCRYPT_DECRYPT = 7; - /** - * [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used - * with [MacSign][google.cloud.kms.v1.KeyManagementService.MacSign]. - * - * Generated from protobuf enum MAC = 9; - */ - const MAC = 9; - /** - * [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used - * with - * [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey] - * and [Decapsulate][google.cloud.kms.v1.KeyManagementService.Decapsulate]. - * - * Generated from protobuf enum KEY_ENCAPSULATION = 10; - */ - const KEY_ENCAPSULATION = 10; - - private static $valueToName = [ - self::CRYPTO_KEY_PURPOSE_UNSPECIFIED => 'CRYPTO_KEY_PURPOSE_UNSPECIFIED', - self::ENCRYPT_DECRYPT => 'ENCRYPT_DECRYPT', - self::ASYMMETRIC_SIGN => 'ASYMMETRIC_SIGN', - self::ASYMMETRIC_DECRYPT => 'ASYMMETRIC_DECRYPT', - self::RAW_ENCRYPT_DECRYPT => 'RAW_ENCRYPT_DECRYPT', - self::MAC => 'MAC', - self::KEY_ENCAPSULATION => 'KEY_ENCAPSULATION', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CryptoKeyPurpose::class, \Google\Cloud\Kms\V1\CryptoKey_CryptoKeyPurpose::class); - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersion.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersion.php deleted file mode 100644 index b88345be44c3..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersion.php +++ /dev/null @@ -1,819 +0,0 @@ -google.cloud.kms.v1.CryptoKeyVersion - */ -class CryptoKeyVersion extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The resource name for this - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in the format - * `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * The current state of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState state = 3; - */ - protected $state = 0; - /** - * Output only. The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] - * describing how crypto operations are performed with this - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. - * - * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $protection_level = 0; - /** - * Output only. The - * [CryptoKeyVersionAlgorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] - * that this [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] - * supports. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $algorithm = 0; - /** - * 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][google.cloud.kms.v1.CryptoKeyVersion.protection_level] - * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM]. - * - * Generated from protobuf field .google.cloud.kms.v1.KeyOperationAttestation attestation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $attestation = null; - /** - * Output only. The time at which this - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time this - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material was - * generated. - * - * Generated from protobuf field .google.protobuf.Timestamp generate_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $generate_time = null; - /** - * Output only. The time this - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material is - * scheduled for destruction. Only present if - * [state][google.cloud.kms.v1.CryptoKeyVersion.state] is - * [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED]. - * - * Generated from protobuf field .google.protobuf.Timestamp destroy_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $destroy_time = null; - /** - * Output only. The time this CryptoKeyVersion's key material was - * destroyed. Only present if - * [state][google.cloud.kms.v1.CryptoKeyVersion.state] is - * [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED]. - * - * Generated from protobuf field .google.protobuf.Timestamp destroy_event_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $destroy_event_time = null; - /** - * Output only. The name of the [ImportJob][google.cloud.kms.v1.ImportJob] - * used in the most recent import of this - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. Only present if - * the underlying key material was imported. - * - * Generated from protobuf field string import_job = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $import_job = ''; - /** - * Output only. The time at which this - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material was - * most recently imported. - * - * Generated from protobuf field .google.protobuf.Timestamp import_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $import_time = null; - /** - * Output only. The root cause of the most recent import failure. Only present - * if [state][google.cloud.kms.v1.CryptoKeyVersion.state] is - * [IMPORT_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.IMPORT_FAILED]. - * - * Generated from protobuf field string import_failure_reason = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $import_failure_reason = ''; - /** - * Output only. The root cause of the most recent generation failure. Only - * present if [state][google.cloud.kms.v1.CryptoKeyVersion.state] is - * [GENERATION_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.GENERATION_FAILED]. - * - * Generated from protobuf field string generation_failure_reason = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $generation_failure_reason = ''; - /** - * Output only. The root cause of the most recent external destruction - * failure. Only present if - * [state][google.cloud.kms.v1.CryptoKeyVersion.state] is - * [EXTERNAL_DESTRUCTION_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.EXTERNAL_DESTRUCTION_FAILED]. - * - * Generated from protobuf field string external_destruction_failure_reason = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $external_destruction_failure_reason = ''; - /** - * ExternalProtectionLevelOptions stores a group of additional fields for - * configuring a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that - * are specific to the - * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] protection level - * and [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC] - * protection levels. - * - * Generated from protobuf field .google.cloud.kms.v1.ExternalProtectionLevelOptions external_protection_level_options = 17; - */ - protected $external_protection_level_options = null; - /** - * Output only. Whether or not this key version is eligible for reimport, by - * being specified as a target in - * [ImportCryptoKeyVersionRequest.crypto_key_version][google.cloud.kms.v1.ImportCryptoKeyVersionRequest.crypto_key_version]. - * - * Generated from protobuf field bool reimport_eligible = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $reimport_eligible = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The resource name for this - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in the format - * `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`. - * @type int $state - * The current state of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. - * @type int $protection_level - * Output only. The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] - * describing how crypto operations are performed with this - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. - * @type int $algorithm - * Output only. The - * [CryptoKeyVersionAlgorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] - * that this [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] - * supports. - * @type \Google\Cloud\Kms\V1\KeyOperationAttestation $attestation - * 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][google.cloud.kms.v1.CryptoKeyVersion.protection_level] - * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM]. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time at which this - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] was created. - * @type \Google\Protobuf\Timestamp $generate_time - * Output only. The time this - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material was - * generated. - * @type \Google\Protobuf\Timestamp $destroy_time - * Output only. The time this - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material is - * scheduled for destruction. Only present if - * [state][google.cloud.kms.v1.CryptoKeyVersion.state] is - * [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED]. - * @type \Google\Protobuf\Timestamp $destroy_event_time - * Output only. The time this CryptoKeyVersion's key material was - * destroyed. Only present if - * [state][google.cloud.kms.v1.CryptoKeyVersion.state] is - * [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED]. - * @type string $import_job - * Output only. The name of the [ImportJob][google.cloud.kms.v1.ImportJob] - * used in the most recent import of this - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. Only present if - * the underlying key material was imported. - * @type \Google\Protobuf\Timestamp $import_time - * Output only. The time at which this - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material was - * most recently imported. - * @type string $import_failure_reason - * Output only. The root cause of the most recent import failure. Only present - * if [state][google.cloud.kms.v1.CryptoKeyVersion.state] is - * [IMPORT_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.IMPORT_FAILED]. - * @type string $generation_failure_reason - * Output only. The root cause of the most recent generation failure. Only - * present if [state][google.cloud.kms.v1.CryptoKeyVersion.state] is - * [GENERATION_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.GENERATION_FAILED]. - * @type string $external_destruction_failure_reason - * Output only. The root cause of the most recent external destruction - * failure. Only present if - * [state][google.cloud.kms.v1.CryptoKeyVersion.state] is - * [EXTERNAL_DESTRUCTION_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.EXTERNAL_DESTRUCTION_FAILED]. - * @type \Google\Cloud\Kms\V1\ExternalProtectionLevelOptions $external_protection_level_options - * ExternalProtectionLevelOptions stores a group of additional fields for - * configuring a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that - * are specific to the - * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] protection level - * and [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC] - * protection levels. - * @type bool $reimport_eligible - * Output only. Whether or not this key version is eligible for reimport, by - * being specified as a target in - * [ImportCryptoKeyVersionRequest.crypto_key_version][google.cloud.kms.v1.ImportCryptoKeyVersionRequest.crypto_key_version]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The resource name for this - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in the format - * `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The resource name for this - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in the format - * `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The current state of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState state = 3; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * The current state of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState state = 3; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\CryptoKeyVersion\CryptoKeyVersionState::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] - * describing how crypto operations are performed with this - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. - * - * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getProtectionLevel() - { - return $this->protection_level; - } - - /** - * Output only. The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] - * describing how crypto operations are performed with this - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. - * - * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setProtectionLevel($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\ProtectionLevel::class); - $this->protection_level = $var; - - return $this; - } - - /** - * Output only. The - * [CryptoKeyVersionAlgorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] - * that this [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] - * supports. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getAlgorithm() - { - return $this->algorithm; - } - - /** - * Output only. The - * [CryptoKeyVersionAlgorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] - * that this [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] - * supports. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setAlgorithm($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\CryptoKeyVersion\CryptoKeyVersionAlgorithm::class); - $this->algorithm = $var; - - return $this; - } - - /** - * 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][google.cloud.kms.v1.CryptoKeyVersion.protection_level] - * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM]. - * - * Generated from protobuf field .google.cloud.kms.v1.KeyOperationAttestation attestation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Kms\V1\KeyOperationAttestation|null - */ - public function getAttestation() - { - return $this->attestation; - } - - public function hasAttestation() - { - return isset($this->attestation); - } - - public function clearAttestation() - { - unset($this->attestation); - } - - /** - * 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][google.cloud.kms.v1.CryptoKeyVersion.protection_level] - * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM]. - * - * Generated from protobuf field .google.cloud.kms.v1.KeyOperationAttestation attestation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Kms\V1\KeyOperationAttestation $var - * @return $this - */ - public function setAttestation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\KeyOperationAttestation::class); - $this->attestation = $var; - - return $this; - } - - /** - * Output only. The time at which this - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time at which this - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The time this - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material was - * generated. - * - * Generated from protobuf field .google.protobuf.Timestamp generate_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getGenerateTime() - { - return $this->generate_time; - } - - public function hasGenerateTime() - { - return isset($this->generate_time); - } - - public function clearGenerateTime() - { - unset($this->generate_time); - } - - /** - * Output only. The time this - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material was - * generated. - * - * Generated from protobuf field .google.protobuf.Timestamp generate_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setGenerateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->generate_time = $var; - - return $this; - } - - /** - * Output only. The time this - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material is - * scheduled for destruction. Only present if - * [state][google.cloud.kms.v1.CryptoKeyVersion.state] is - * [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED]. - * - * Generated from protobuf field .google.protobuf.Timestamp destroy_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getDestroyTime() - { - return $this->destroy_time; - } - - public function hasDestroyTime() - { - return isset($this->destroy_time); - } - - public function clearDestroyTime() - { - unset($this->destroy_time); - } - - /** - * Output only. The time this - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material is - * scheduled for destruction. Only present if - * [state][google.cloud.kms.v1.CryptoKeyVersion.state] is - * [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED]. - * - * Generated from protobuf field .google.protobuf.Timestamp destroy_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setDestroyTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->destroy_time = $var; - - return $this; - } - - /** - * Output only. The time this CryptoKeyVersion's key material was - * destroyed. Only present if - * [state][google.cloud.kms.v1.CryptoKeyVersion.state] is - * [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED]. - * - * Generated from protobuf field .google.protobuf.Timestamp destroy_event_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getDestroyEventTime() - { - return $this->destroy_event_time; - } - - public function hasDestroyEventTime() - { - return isset($this->destroy_event_time); - } - - public function clearDestroyEventTime() - { - unset($this->destroy_event_time); - } - - /** - * Output only. The time this CryptoKeyVersion's key material was - * destroyed. Only present if - * [state][google.cloud.kms.v1.CryptoKeyVersion.state] is - * [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED]. - * - * Generated from protobuf field .google.protobuf.Timestamp destroy_event_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setDestroyEventTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->destroy_event_time = $var; - - return $this; - } - - /** - * Output only. The name of the [ImportJob][google.cloud.kms.v1.ImportJob] - * used in the most recent import of this - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. Only present if - * the underlying key material was imported. - * - * Generated from protobuf field string import_job = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getImportJob() - { - return $this->import_job; - } - - /** - * Output only. The name of the [ImportJob][google.cloud.kms.v1.ImportJob] - * used in the most recent import of this - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. Only present if - * the underlying key material was imported. - * - * Generated from protobuf field string import_job = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setImportJob($var) - { - GPBUtil::checkString($var, True); - $this->import_job = $var; - - return $this; - } - - /** - * Output only. The time at which this - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material was - * most recently imported. - * - * Generated from protobuf field .google.protobuf.Timestamp import_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getImportTime() - { - return $this->import_time; - } - - public function hasImportTime() - { - return isset($this->import_time); - } - - public function clearImportTime() - { - unset($this->import_time); - } - - /** - * Output only. The time at which this - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material was - * most recently imported. - * - * Generated from protobuf field .google.protobuf.Timestamp import_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setImportTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->import_time = $var; - - return $this; - } - - /** - * Output only. The root cause of the most recent import failure. Only present - * if [state][google.cloud.kms.v1.CryptoKeyVersion.state] is - * [IMPORT_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.IMPORT_FAILED]. - * - * Generated from protobuf field string import_failure_reason = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getImportFailureReason() - { - return $this->import_failure_reason; - } - - /** - * Output only. The root cause of the most recent import failure. Only present - * if [state][google.cloud.kms.v1.CryptoKeyVersion.state] is - * [IMPORT_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.IMPORT_FAILED]. - * - * Generated from protobuf field string import_failure_reason = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setImportFailureReason($var) - { - GPBUtil::checkString($var, True); - $this->import_failure_reason = $var; - - return $this; - } - - /** - * Output only. The root cause of the most recent generation failure. Only - * present if [state][google.cloud.kms.v1.CryptoKeyVersion.state] is - * [GENERATION_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.GENERATION_FAILED]. - * - * Generated from protobuf field string generation_failure_reason = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getGenerationFailureReason() - { - return $this->generation_failure_reason; - } - - /** - * Output only. The root cause of the most recent generation failure. Only - * present if [state][google.cloud.kms.v1.CryptoKeyVersion.state] is - * [GENERATION_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.GENERATION_FAILED]. - * - * Generated from protobuf field string generation_failure_reason = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setGenerationFailureReason($var) - { - GPBUtil::checkString($var, True); - $this->generation_failure_reason = $var; - - return $this; - } - - /** - * Output only. The root cause of the most recent external destruction - * failure. Only present if - * [state][google.cloud.kms.v1.CryptoKeyVersion.state] is - * [EXTERNAL_DESTRUCTION_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.EXTERNAL_DESTRUCTION_FAILED]. - * - * Generated from protobuf field string external_destruction_failure_reason = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getExternalDestructionFailureReason() - { - return $this->external_destruction_failure_reason; - } - - /** - * Output only. The root cause of the most recent external destruction - * failure. Only present if - * [state][google.cloud.kms.v1.CryptoKeyVersion.state] is - * [EXTERNAL_DESTRUCTION_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.EXTERNAL_DESTRUCTION_FAILED]. - * - * Generated from protobuf field string external_destruction_failure_reason = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setExternalDestructionFailureReason($var) - { - GPBUtil::checkString($var, True); - $this->external_destruction_failure_reason = $var; - - return $this; - } - - /** - * ExternalProtectionLevelOptions stores a group of additional fields for - * configuring a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that - * are specific to the - * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] protection level - * and [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC] - * protection levels. - * - * Generated from protobuf field .google.cloud.kms.v1.ExternalProtectionLevelOptions external_protection_level_options = 17; - * @return \Google\Cloud\Kms\V1\ExternalProtectionLevelOptions|null - */ - public function getExternalProtectionLevelOptions() - { - return $this->external_protection_level_options; - } - - public function hasExternalProtectionLevelOptions() - { - return isset($this->external_protection_level_options); - } - - public function clearExternalProtectionLevelOptions() - { - unset($this->external_protection_level_options); - } - - /** - * ExternalProtectionLevelOptions stores a group of additional fields for - * configuring a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that - * are specific to the - * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] protection level - * and [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC] - * protection levels. - * - * Generated from protobuf field .google.cloud.kms.v1.ExternalProtectionLevelOptions external_protection_level_options = 17; - * @param \Google\Cloud\Kms\V1\ExternalProtectionLevelOptions $var - * @return $this - */ - public function setExternalProtectionLevelOptions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\ExternalProtectionLevelOptions::class); - $this->external_protection_level_options = $var; - - return $this; - } - - /** - * Output only. Whether or not this key version is eligible for reimport, by - * being specified as a target in - * [ImportCryptoKeyVersionRequest.crypto_key_version][google.cloud.kms.v1.ImportCryptoKeyVersionRequest.crypto_key_version]. - * - * Generated from protobuf field bool reimport_eligible = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getReimportEligible() - { - return $this->reimport_eligible; - } - - /** - * Output only. Whether or not this key version is eligible for reimport, by - * being specified as a target in - * [ImportCryptoKeyVersionRequest.crypto_key_version][google.cloud.kms.v1.ImportCryptoKeyVersionRequest.crypto_key_version]. - * - * Generated from protobuf field bool reimport_eligible = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setReimportEligible($var) - { - GPBUtil::checkBool($var); - $this->reimport_eligible = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersion/CryptoKeyVersionAlgorithm.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersion/CryptoKeyVersionAlgorithm.php deleted file mode 100644 index b4180f508dca..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersion/CryptoKeyVersionAlgorithm.php +++ /dev/null @@ -1,425 +0,0 @@ -google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm - */ -class CryptoKeyVersionAlgorithm -{ - /** - * Not specified. - * - * Generated from protobuf enum CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED = 0; - */ - const CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED = 0; - /** - * Creates symmetric encryption keys. - * - * Generated from protobuf enum GOOGLE_SYMMETRIC_ENCRYPTION = 1; - */ - const GOOGLE_SYMMETRIC_ENCRYPTION = 1; - /** - * AES-GCM (Galois Counter Mode) using 128-bit keys. - * - * Generated from protobuf enum AES_128_GCM = 41; - */ - const AES_128_GCM = 41; - /** - * AES-GCM (Galois Counter Mode) using 256-bit keys. - * - * Generated from protobuf enum AES_256_GCM = 19; - */ - const AES_256_GCM = 19; - /** - * AES-CBC (Cipher Block Chaining Mode) using 128-bit keys. - * - * Generated from protobuf enum AES_128_CBC = 42; - */ - const AES_128_CBC = 42; - /** - * AES-CBC (Cipher Block Chaining Mode) using 256-bit keys. - * - * Generated from protobuf enum AES_256_CBC = 43; - */ - const AES_256_CBC = 43; - /** - * AES-CTR (Counter Mode) using 128-bit keys. - * - * Generated from protobuf enum AES_128_CTR = 44; - */ - const AES_128_CTR = 44; - /** - * AES-CTR (Counter Mode) using 256-bit keys. - * - * Generated from protobuf enum AES_256_CTR = 45; - */ - const AES_256_CTR = 45; - /** - * RSASSA-PSS 2048 bit key with a SHA256 digest. - * - * Generated from protobuf enum RSA_SIGN_PSS_2048_SHA256 = 2; - */ - const RSA_SIGN_PSS_2048_SHA256 = 2; - /** - * RSASSA-PSS 3072 bit key with a SHA256 digest. - * - * Generated from protobuf enum RSA_SIGN_PSS_3072_SHA256 = 3; - */ - const RSA_SIGN_PSS_3072_SHA256 = 3; - /** - * RSASSA-PSS 4096 bit key with a SHA256 digest. - * - * Generated from protobuf enum RSA_SIGN_PSS_4096_SHA256 = 4; - */ - const RSA_SIGN_PSS_4096_SHA256 = 4; - /** - * RSASSA-PSS 4096 bit key with a SHA512 digest. - * - * Generated from protobuf enum RSA_SIGN_PSS_4096_SHA512 = 15; - */ - const RSA_SIGN_PSS_4096_SHA512 = 15; - /** - * RSASSA-PKCS1-v1_5 with a 2048 bit key and a SHA256 digest. - * - * Generated from protobuf enum RSA_SIGN_PKCS1_2048_SHA256 = 5; - */ - const RSA_SIGN_PKCS1_2048_SHA256 = 5; - /** - * RSASSA-PKCS1-v1_5 with a 3072 bit key and a SHA256 digest. - * - * Generated from protobuf enum RSA_SIGN_PKCS1_3072_SHA256 = 6; - */ - const RSA_SIGN_PKCS1_3072_SHA256 = 6; - /** - * RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA256 digest. - * - * Generated from protobuf enum RSA_SIGN_PKCS1_4096_SHA256 = 7; - */ - const RSA_SIGN_PKCS1_4096_SHA256 = 7; - /** - * RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA512 digest. - * - * Generated from protobuf enum RSA_SIGN_PKCS1_4096_SHA512 = 16; - */ - const RSA_SIGN_PKCS1_4096_SHA512 = 16; - /** - * RSASSA-PKCS1-v1_5 signing without encoding, with a 2048 bit key. - * - * Generated from protobuf enum RSA_SIGN_RAW_PKCS1_2048 = 28; - */ - const RSA_SIGN_RAW_PKCS1_2048 = 28; - /** - * RSASSA-PKCS1-v1_5 signing without encoding, with a 3072 bit key. - * - * Generated from protobuf enum RSA_SIGN_RAW_PKCS1_3072 = 29; - */ - const RSA_SIGN_RAW_PKCS1_3072 = 29; - /** - * RSASSA-PKCS1-v1_5 signing without encoding, with a 4096 bit key. - * - * Generated from protobuf enum RSA_SIGN_RAW_PKCS1_4096 = 30; - */ - const RSA_SIGN_RAW_PKCS1_4096 = 30; - /** - * RSAES-OAEP 2048 bit key with a SHA256 digest. - * - * Generated from protobuf enum RSA_DECRYPT_OAEP_2048_SHA256 = 8; - */ - const RSA_DECRYPT_OAEP_2048_SHA256 = 8; - /** - * RSAES-OAEP 3072 bit key with a SHA256 digest. - * - * Generated from protobuf enum RSA_DECRYPT_OAEP_3072_SHA256 = 9; - */ - const RSA_DECRYPT_OAEP_3072_SHA256 = 9; - /** - * RSAES-OAEP 4096 bit key with a SHA256 digest. - * - * Generated from protobuf enum RSA_DECRYPT_OAEP_4096_SHA256 = 10; - */ - const RSA_DECRYPT_OAEP_4096_SHA256 = 10; - /** - * RSAES-OAEP 4096 bit key with a SHA512 digest. - * - * Generated from protobuf enum RSA_DECRYPT_OAEP_4096_SHA512 = 17; - */ - const RSA_DECRYPT_OAEP_4096_SHA512 = 17; - /** - * RSAES-OAEP 2048 bit key with a SHA1 digest. - * - * Generated from protobuf enum RSA_DECRYPT_OAEP_2048_SHA1 = 37; - */ - const RSA_DECRYPT_OAEP_2048_SHA1 = 37; - /** - * RSAES-OAEP 3072 bit key with a SHA1 digest. - * - * Generated from protobuf enum RSA_DECRYPT_OAEP_3072_SHA1 = 38; - */ - const RSA_DECRYPT_OAEP_3072_SHA1 = 38; - /** - * RSAES-OAEP 4096 bit key with a SHA1 digest. - * - * Generated from protobuf enum RSA_DECRYPT_OAEP_4096_SHA1 = 39; - */ - const RSA_DECRYPT_OAEP_4096_SHA1 = 39; - /** - * 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 - * - * Generated from protobuf enum EC_SIGN_P256_SHA256 = 12; - */ - const EC_SIGN_P256_SHA256 = 12; - /** - * 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 - * - * Generated from protobuf enum EC_SIGN_P384_SHA384 = 13; - */ - const EC_SIGN_P384_SHA384 = 13; - /** - * 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 - * - * Generated from protobuf enum EC_SIGN_SECP256K1_SHA256 = 31; - */ - const EC_SIGN_SECP256K1_SHA256 = 31; - /** - * EdDSA on the Curve25519 in pure mode (taking data as input). - * - * Generated from protobuf enum EC_SIGN_ED25519 = 40; - */ - const EC_SIGN_ED25519 = 40; - /** - * HMAC-SHA256 signing with a 256 bit key. - * - * Generated from protobuf enum HMAC_SHA256 = 32; - */ - const HMAC_SHA256 = 32; - /** - * HMAC-SHA1 signing with a 160 bit key. - * - * Generated from protobuf enum HMAC_SHA1 = 33; - */ - const HMAC_SHA1 = 33; - /** - * HMAC-SHA384 signing with a 384 bit key. - * - * Generated from protobuf enum HMAC_SHA384 = 34; - */ - const HMAC_SHA384 = 34; - /** - * HMAC-SHA512 signing with a 512 bit key. - * - * Generated from protobuf enum HMAC_SHA512 = 35; - */ - const HMAC_SHA512 = 35; - /** - * HMAC-SHA224 signing with a 224 bit key. - * - * Generated from protobuf enum HMAC_SHA224 = 36; - */ - const HMAC_SHA224 = 36; - /** - * Algorithm representing symmetric encryption by an external key manager. - * - * Generated from protobuf enum EXTERNAL_SYMMETRIC_ENCRYPTION = 18; - */ - const EXTERNAL_SYMMETRIC_ENCRYPTION = 18; - /** - * ML-KEM-768 (FIPS 203) - * - * Generated from protobuf enum ML_KEM_768 = 47; - */ - const ML_KEM_768 = 47; - /** - * ML-KEM-1024 (FIPS 203) - * - * Generated from protobuf enum ML_KEM_1024 = 48; - */ - const ML_KEM_1024 = 48; - /** - * X-Wing hybrid KEM combining ML-KEM-768 with X25519 following - * datatracker.ietf.org/doc/draft-connolly-cfrg-xwing-kem/. - * - * Generated from protobuf enum KEM_XWING = 63; - */ - const KEM_XWING = 63; - /** - * The post-quantum Module-Lattice-Based Digital Signature Algorithm, at - * security level 1. Randomized version. - * - * Generated from protobuf enum PQ_SIGN_ML_DSA_44 = 68; - */ - const PQ_SIGN_ML_DSA_44 = 68; - /** - * The post-quantum Module-Lattice-Based Digital Signature Algorithm, at - * security level 3. Randomized version. - * - * Generated from protobuf enum PQ_SIGN_ML_DSA_65 = 56; - */ - const PQ_SIGN_ML_DSA_65 = 56; - /** - * The post-quantum Module-Lattice-Based Digital Signature Algorithm, at - * security level 5. Randomized version. - * - * Generated from protobuf enum PQ_SIGN_ML_DSA_87 = 69; - */ - const PQ_SIGN_ML_DSA_87 = 69; - /** - * The post-quantum stateless hash-based digital signature algorithm, at - * security level 1. Randomized version. - * - * Generated from protobuf enum PQ_SIGN_SLH_DSA_SHA2_128S = 57; - */ - const PQ_SIGN_SLH_DSA_SHA2_128S = 57; - /** - * The post-quantum stateless hash-based digital signature algorithm, at - * security level 1. Randomized pre-hash version supporting SHA256 digests. - * - * Generated from protobuf enum PQ_SIGN_HASH_SLH_DSA_SHA2_128S_SHA256 = 60; - */ - const PQ_SIGN_HASH_SLH_DSA_SHA2_128S_SHA256 = 60; - /** - * The post-quantum Module-Lattice-Based Digital Signature Algorithm, at - * security level 1. Randomized version supporting externally-computed - * message representatives. - * - * Generated from protobuf enum PQ_SIGN_ML_DSA_44_EXTERNAL_MU = 70; - */ - const PQ_SIGN_ML_DSA_44_EXTERNAL_MU = 70; - /** - * The post-quantum Module-Lattice-Based Digital Signature Algorithm, at - * security level 3. Randomized version supporting externally-computed - * message representatives. - * - * Generated from protobuf enum PQ_SIGN_ML_DSA_65_EXTERNAL_MU = 67; - */ - const PQ_SIGN_ML_DSA_65_EXTERNAL_MU = 67; - /** - * The post-quantum Module-Lattice-Based Digital Signature Algorithm, at - * security level 5. Randomized version supporting externally-computed - * message representatives. - * - * Generated from protobuf enum PQ_SIGN_ML_DSA_87_EXTERNAL_MU = 71; - */ - const PQ_SIGN_ML_DSA_87_EXTERNAL_MU = 71; - - private static $valueToName = [ - self::CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED => 'CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED', - self::GOOGLE_SYMMETRIC_ENCRYPTION => 'GOOGLE_SYMMETRIC_ENCRYPTION', - self::AES_128_GCM => 'AES_128_GCM', - self::AES_256_GCM => 'AES_256_GCM', - self::AES_128_CBC => 'AES_128_CBC', - self::AES_256_CBC => 'AES_256_CBC', - self::AES_128_CTR => 'AES_128_CTR', - self::AES_256_CTR => 'AES_256_CTR', - self::RSA_SIGN_PSS_2048_SHA256 => 'RSA_SIGN_PSS_2048_SHA256', - self::RSA_SIGN_PSS_3072_SHA256 => 'RSA_SIGN_PSS_3072_SHA256', - self::RSA_SIGN_PSS_4096_SHA256 => 'RSA_SIGN_PSS_4096_SHA256', - self::RSA_SIGN_PSS_4096_SHA512 => 'RSA_SIGN_PSS_4096_SHA512', - self::RSA_SIGN_PKCS1_2048_SHA256 => 'RSA_SIGN_PKCS1_2048_SHA256', - self::RSA_SIGN_PKCS1_3072_SHA256 => 'RSA_SIGN_PKCS1_3072_SHA256', - self::RSA_SIGN_PKCS1_4096_SHA256 => 'RSA_SIGN_PKCS1_4096_SHA256', - self::RSA_SIGN_PKCS1_4096_SHA512 => 'RSA_SIGN_PKCS1_4096_SHA512', - self::RSA_SIGN_RAW_PKCS1_2048 => 'RSA_SIGN_RAW_PKCS1_2048', - self::RSA_SIGN_RAW_PKCS1_3072 => 'RSA_SIGN_RAW_PKCS1_3072', - self::RSA_SIGN_RAW_PKCS1_4096 => 'RSA_SIGN_RAW_PKCS1_4096', - self::RSA_DECRYPT_OAEP_2048_SHA256 => 'RSA_DECRYPT_OAEP_2048_SHA256', - self::RSA_DECRYPT_OAEP_3072_SHA256 => 'RSA_DECRYPT_OAEP_3072_SHA256', - self::RSA_DECRYPT_OAEP_4096_SHA256 => 'RSA_DECRYPT_OAEP_4096_SHA256', - self::RSA_DECRYPT_OAEP_4096_SHA512 => 'RSA_DECRYPT_OAEP_4096_SHA512', - self::RSA_DECRYPT_OAEP_2048_SHA1 => 'RSA_DECRYPT_OAEP_2048_SHA1', - self::RSA_DECRYPT_OAEP_3072_SHA1 => 'RSA_DECRYPT_OAEP_3072_SHA1', - self::RSA_DECRYPT_OAEP_4096_SHA1 => 'RSA_DECRYPT_OAEP_4096_SHA1', - self::EC_SIGN_P256_SHA256 => 'EC_SIGN_P256_SHA256', - self::EC_SIGN_P384_SHA384 => 'EC_SIGN_P384_SHA384', - self::EC_SIGN_SECP256K1_SHA256 => 'EC_SIGN_SECP256K1_SHA256', - self::EC_SIGN_ED25519 => 'EC_SIGN_ED25519', - self::HMAC_SHA256 => 'HMAC_SHA256', - self::HMAC_SHA1 => 'HMAC_SHA1', - self::HMAC_SHA384 => 'HMAC_SHA384', - self::HMAC_SHA512 => 'HMAC_SHA512', - self::HMAC_SHA224 => 'HMAC_SHA224', - self::EXTERNAL_SYMMETRIC_ENCRYPTION => 'EXTERNAL_SYMMETRIC_ENCRYPTION', - self::ML_KEM_768 => 'ML_KEM_768', - self::ML_KEM_1024 => 'ML_KEM_1024', - self::KEM_XWING => 'KEM_XWING', - self::PQ_SIGN_ML_DSA_44 => 'PQ_SIGN_ML_DSA_44', - self::PQ_SIGN_ML_DSA_65 => 'PQ_SIGN_ML_DSA_65', - self::PQ_SIGN_ML_DSA_87 => 'PQ_SIGN_ML_DSA_87', - self::PQ_SIGN_SLH_DSA_SHA2_128S => 'PQ_SIGN_SLH_DSA_SHA2_128S', - self::PQ_SIGN_HASH_SLH_DSA_SHA2_128S_SHA256 => 'PQ_SIGN_HASH_SLH_DSA_SHA2_128S_SHA256', - self::PQ_SIGN_ML_DSA_44_EXTERNAL_MU => 'PQ_SIGN_ML_DSA_44_EXTERNAL_MU', - self::PQ_SIGN_ML_DSA_65_EXTERNAL_MU => 'PQ_SIGN_ML_DSA_65_EXTERNAL_MU', - self::PQ_SIGN_ML_DSA_87_EXTERNAL_MU => 'PQ_SIGN_ML_DSA_87_EXTERNAL_MU', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CryptoKeyVersionAlgorithm::class, \Google\Cloud\Kms\V1\CryptoKeyVersion_CryptoKeyVersionAlgorithm::class); - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersion/CryptoKeyVersionState.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersion/CryptoKeyVersionState.php deleted file mode 100644 index 50c11d918474..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersion/CryptoKeyVersionState.php +++ /dev/null @@ -1,154 +0,0 @@ -google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState - */ -class CryptoKeyVersionState -{ - /** - * Not specified. - * - * Generated from protobuf enum CRYPTO_KEY_VERSION_STATE_UNSPECIFIED = 0; - */ - const CRYPTO_KEY_VERSION_STATE_UNSPECIFIED = 0; - /** - * This version is still being generated. It may not be used, enabled, - * disabled, or destroyed yet. Cloud KMS will automatically mark this - * version - * [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED] - * as soon as the version is ready. - * - * Generated from protobuf enum PENDING_GENERATION = 5; - */ - const PENDING_GENERATION = 5; - /** - * This version may be used for cryptographic operations. - * - * Generated from protobuf enum ENABLED = 1; - */ - const ENABLED = 1; - /** - * This version may not be used, but the key material is still available, - * and the version can be placed back into the - * [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED] - * state. - * - * Generated from protobuf enum DISABLED = 2; - */ - const DISABLED = 2; - /** - * The key material of this version is destroyed and no longer stored. - * This version may only become - * [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED] - * again if this version is - * [reimport_eligible][google.cloud.kms.v1.CryptoKeyVersion.reimport_eligible] - * and the original key material is reimported with a call to - * [KeyManagementService.ImportCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.ImportCryptoKeyVersion]. - * - * Generated from protobuf enum DESTROYED = 3; - */ - const DESTROYED = 3; - /** - * This version is scheduled for destruction, and will be destroyed soon. - * Call - * [RestoreCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.RestoreCryptoKeyVersion] - * to put it back into the - * [DISABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DISABLED] - * state. - * - * Generated from protobuf enum DESTROY_SCHEDULED = 4; - */ - const DESTROY_SCHEDULED = 4; - /** - * This version is still being imported. It may not be used, enabled, - * disabled, or destroyed yet. Cloud KMS will automatically mark this - * version - * [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED] - * as soon as the version is ready. - * - * Generated from protobuf enum PENDING_IMPORT = 6; - */ - const PENDING_IMPORT = 6; - /** - * 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][google.cloud.kms.v1.CryptoKeyVersion.import_failure_reason]. - * - * Generated from protobuf enum IMPORT_FAILED = 7; - */ - const IMPORT_FAILED = 7; - /** - * 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][google.cloud.kms.v1.CryptoKeyVersion.generation_failure_reason]. - * - * Generated from protobuf enum GENERATION_FAILED = 8; - */ - const GENERATION_FAILED = 8; - /** - * 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. - * - * Generated from protobuf enum PENDING_EXTERNAL_DESTRUCTION = 9; - */ - const PENDING_EXTERNAL_DESTRUCTION = 9; - /** - * 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][google.cloud.kms.v1.CryptoKeyVersion.external_destruction_failure_reason]. - * - * Generated from protobuf enum EXTERNAL_DESTRUCTION_FAILED = 10; - */ - const EXTERNAL_DESTRUCTION_FAILED = 10; - - private static $valueToName = [ - self::CRYPTO_KEY_VERSION_STATE_UNSPECIFIED => 'CRYPTO_KEY_VERSION_STATE_UNSPECIFIED', - self::PENDING_GENERATION => 'PENDING_GENERATION', - self::ENABLED => 'ENABLED', - self::DISABLED => 'DISABLED', - self::DESTROYED => 'DESTROYED', - self::DESTROY_SCHEDULED => 'DESTROY_SCHEDULED', - self::PENDING_IMPORT => 'PENDING_IMPORT', - self::IMPORT_FAILED => 'IMPORT_FAILED', - self::GENERATION_FAILED => 'GENERATION_FAILED', - self::PENDING_EXTERNAL_DESTRUCTION => 'PENDING_EXTERNAL_DESTRUCTION', - self::EXTERNAL_DESTRUCTION_FAILED => 'EXTERNAL_DESTRUCTION_FAILED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CryptoKeyVersionState::class, \Google\Cloud\Kms\V1\CryptoKeyVersion_CryptoKeyVersionState::class); - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersion/CryptoKeyVersionView.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersion/CryptoKeyVersionView.php deleted file mode 100644 index 33a471de9ad7..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersion/CryptoKeyVersionView.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionView - */ -class CryptoKeyVersionView -{ - /** - * Default view for each - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. Does not - * include the - * [attestation][google.cloud.kms.v1.CryptoKeyVersion.attestation] field. - * - * Generated from protobuf enum CRYPTO_KEY_VERSION_VIEW_UNSPECIFIED = 0; - */ - const CRYPTO_KEY_VERSION_VIEW_UNSPECIFIED = 0; - /** - * Provides all fields in each - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion], including the - * [attestation][google.cloud.kms.v1.CryptoKeyVersion.attestation]. - * - * Generated from protobuf enum FULL = 1; - */ - const FULL = 1; - - private static $valueToName = [ - self::CRYPTO_KEY_VERSION_VIEW_UNSPECIFIED => 'CRYPTO_KEY_VERSION_VIEW_UNSPECIFIED', - self::FULL => 'FULL', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CryptoKeyVersionView::class, \Google\Cloud\Kms\V1\CryptoKeyVersion_CryptoKeyVersionView::class); - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersionTemplate.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersionTemplate.php deleted file mode 100644 index 6f88091103eb..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersionTemplate.php +++ /dev/null @@ -1,150 +0,0 @@ -google.cloud.kms.v1.CryptoKeyVersionTemplate - */ -class CryptoKeyVersionTemplate extends \Google\Protobuf\Internal\Message -{ - /** - * [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] to use when creating - * a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] based on this - * template. Immutable. Defaults to - * [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE]. - * - * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 1; - */ - protected $protection_level = 0; - /** - * Required. - * [Algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] - * to use when creating a - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] based on this - * template. - * For backwards compatibility, GOOGLE_SYMMETRIC_ENCRYPTION is implied if both - * this field is omitted and - * [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] is - * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $algorithm = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $protection_level - * [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] to use when creating - * a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] based on this - * template. Immutable. Defaults to - * [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE]. - * @type int $algorithm - * Required. - * [Algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] - * to use when creating a - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] based on this - * template. - * For backwards compatibility, GOOGLE_SYMMETRIC_ENCRYPTION is implied if both - * this field is omitted and - * [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] is - * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] to use when creating - * a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] based on this - * template. Immutable. Defaults to - * [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE]. - * - * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 1; - * @return int - */ - public function getProtectionLevel() - { - return $this->protection_level; - } - - /** - * [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] to use when creating - * a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] based on this - * template. Immutable. Defaults to - * [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE]. - * - * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 1; - * @param int $var - * @return $this - */ - public function setProtectionLevel($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\ProtectionLevel::class); - $this->protection_level = $var; - - return $this; - } - - /** - * Required. - * [Algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] - * to use when creating a - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] based on this - * template. - * For backwards compatibility, GOOGLE_SYMMETRIC_ENCRYPTION is implied if both - * this field is omitted and - * [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] is - * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getAlgorithm() - { - return $this->algorithm; - } - - /** - * Required. - * [Algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] - * to use when creating a - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] based on this - * template. - * For backwards compatibility, GOOGLE_SYMMETRIC_ENCRYPTION is implied if both - * this field is omitted and - * [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] is - * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setAlgorithm($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\CryptoKeyVersion\CryptoKeyVersionAlgorithm::class); - $this->algorithm = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DecapsulateRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DecapsulateRequest.php deleted file mode 100644 index 22782c6d33d5..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DecapsulateRequest.php +++ /dev/null @@ -1,297 +0,0 @@ -google.cloud.kms.v1.DecapsulateRequest - */ -class DecapsulateRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for - * decapsulation. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. The ciphertext produced from encapsulation with the - * named [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public - * key(s). - * - * Generated from protobuf field bytes ciphertext = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $ciphertext = ''; - /** - * Optional. A CRC32C checksum of the - * [DecapsulateRequest.ciphertext][google.cloud.kms.v1.DecapsulateRequest.ciphertext]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [DecapsulateRequest.ciphertext][google.cloud.kms.v1.DecapsulateRequest.ciphertext] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([DecapsulateRequest.ciphertext][google.cloud.kms.v1.DecapsulateRequest.ciphertext]) - * is equal to - * [DecapsulateRequest.ciphertext_crc32c][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $ciphertext_crc32c = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for - * decapsulation. - * @type string $ciphertext - * Required. The ciphertext produced from encapsulation with the - * named [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public - * key(s). - * @type \Google\Protobuf\Int64Value $ciphertext_crc32c - * Optional. A CRC32C checksum of the - * [DecapsulateRequest.ciphertext][google.cloud.kms.v1.DecapsulateRequest.ciphertext]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [DecapsulateRequest.ciphertext][google.cloud.kms.v1.DecapsulateRequest.ciphertext] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([DecapsulateRequest.ciphertext][google.cloud.kms.v1.DecapsulateRequest.ciphertext]) - * is equal to - * [DecapsulateRequest.ciphertext_crc32c][google.cloud.kms.v1.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. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for - * decapsulation. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for - * decapsulation. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. The ciphertext produced from encapsulation with the - * named [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public - * key(s). - * - * Generated from protobuf field bytes ciphertext = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getCiphertext() - { - return $this->ciphertext; - } - - /** - * Required. The ciphertext produced from encapsulation with the - * named [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public - * key(s). - * - * Generated from protobuf field bytes ciphertext = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setCiphertext($var) - { - GPBUtil::checkString($var, False); - $this->ciphertext = $var; - - return $this; - } - - /** - * Optional. A CRC32C checksum of the - * [DecapsulateRequest.ciphertext][google.cloud.kms.v1.DecapsulateRequest.ciphertext]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [DecapsulateRequest.ciphertext][google.cloud.kms.v1.DecapsulateRequest.ciphertext] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([DecapsulateRequest.ciphertext][google.cloud.kms.v1.DecapsulateRequest.ciphertext]) - * is equal to - * [DecapsulateRequest.ciphertext_crc32c][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Int64Value|null - */ - public function getCiphertextCrc32C() - { - return $this->ciphertext_crc32c; - } - - public function hasCiphertextCrc32C() - { - return isset($this->ciphertext_crc32c); - } - - public function clearCiphertextCrc32C() - { - unset($this->ciphertext_crc32c); - } - - /** - * Returns the unboxed value from getCiphertextCrc32C() - - * Optional. A CRC32C checksum of the - * [DecapsulateRequest.ciphertext][google.cloud.kms.v1.DecapsulateRequest.ciphertext]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [DecapsulateRequest.ciphertext][google.cloud.kms.v1.DecapsulateRequest.ciphertext] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([DecapsulateRequest.ciphertext][google.cloud.kms.v1.DecapsulateRequest.ciphertext]) - * is equal to - * [DecapsulateRequest.ciphertext_crc32c][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int|string|null - */ - public function getCiphertextCrc32CUnwrapped() - { - return $this->readWrapperValue("ciphertext_crc32c"); - } - - /** - * Optional. A CRC32C checksum of the - * [DecapsulateRequest.ciphertext][google.cloud.kms.v1.DecapsulateRequest.ciphertext]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [DecapsulateRequest.ciphertext][google.cloud.kms.v1.DecapsulateRequest.ciphertext] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([DecapsulateRequest.ciphertext][google.cloud.kms.v1.DecapsulateRequest.ciphertext]) - * is equal to - * [DecapsulateRequest.ciphertext_crc32c][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Int64Value $var - * @return $this - */ - public function setCiphertextCrc32C($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); - $this->ciphertext_crc32c = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. - - * Optional. A CRC32C checksum of the - * [DecapsulateRequest.ciphertext][google.cloud.kms.v1.DecapsulateRequest.ciphertext]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [DecapsulateRequest.ciphertext][google.cloud.kms.v1.DecapsulateRequest.ciphertext] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([DecapsulateRequest.ciphertext][google.cloud.kms.v1.DecapsulateRequest.ciphertext]) - * is equal to - * [DecapsulateRequest.ciphertext_crc32c][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param int|string|null $var - * @return $this - */ - public function setCiphertextCrc32CUnwrapped($var) - { - $this->writeWrapperValue("ciphertext_crc32c", $var); - return $this;} - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DecapsulateResponse.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DecapsulateResponse.php deleted file mode 100644 index 508782e5932c..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DecapsulateResponse.php +++ /dev/null @@ -1,354 +0,0 @@ -google.cloud.kms.v1.DecapsulateResponse - */ -class DecapsulateResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for - * decapsulation. Check this field to verify that the intended resource was - * used for decapsulation. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The decapsulated shared_secret originally encapsulated with the matching - * public key. - * - * Generated from protobuf field bytes shared_secret = 2; - */ - protected $shared_secret = ''; - /** - * Integrity verification field. A CRC32C checksum of the returned - * [DecapsulateResponse.shared_secret][google.cloud.kms.v1.DecapsulateResponse.shared_secret]. - * An integrity check of - * [DecapsulateResponse.shared_secret][google.cloud.kms.v1.DecapsulateResponse.shared_secret] - * can be performed by computing the CRC32C checksum of - * [DecapsulateResponse.shared_secret][google.cloud.kms.v1.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][google.cloud.kms.v1.KeyManagementService] is able to - * successfully decrypt the - * [ciphertext][google.cloud.kms.v1.DecapsulateRequest.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. - * - * Generated from protobuf field optional int64 shared_secret_crc32c = 3; - */ - protected $shared_secret_crc32c = null; - /** - * Integrity verification field. A flag indicating whether - * [DecapsulateRequest.ciphertext_crc32c][google.cloud.kms.v1.DecapsulateRequest.ciphertext_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of the - * [ciphertext][google.cloud.kms.v1.DecapsulateRequest.ciphertext]. A false - * value of this field indicates either that - * [DecapsulateRequest.ciphertext_crc32c][google.cloud.kms.v1.DecapsulateRequest.ciphertext_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [DecapsulateRequest.ciphertext_crc32c][google.cloud.kms.v1.DecapsulateRequest.ciphertext_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * - * Generated from protobuf field bool verified_ciphertext_crc32c = 4; - */ - protected $verified_ciphertext_crc32c = false; - /** - * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in - * decapsulation. - * - * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 5; - */ - protected $protection_level = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for - * decapsulation. Check this field to verify that the intended resource was - * used for decapsulation. - * @type string $shared_secret - * The decapsulated shared_secret originally encapsulated with the matching - * public key. - * @type int|string $shared_secret_crc32c - * Integrity verification field. A CRC32C checksum of the returned - * [DecapsulateResponse.shared_secret][google.cloud.kms.v1.DecapsulateResponse.shared_secret]. - * An integrity check of - * [DecapsulateResponse.shared_secret][google.cloud.kms.v1.DecapsulateResponse.shared_secret] - * can be performed by computing the CRC32C checksum of - * [DecapsulateResponse.shared_secret][google.cloud.kms.v1.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][google.cloud.kms.v1.KeyManagementService] is able to - * successfully decrypt the - * [ciphertext][google.cloud.kms.v1.DecapsulateRequest.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. - * @type bool $verified_ciphertext_crc32c - * Integrity verification field. A flag indicating whether - * [DecapsulateRequest.ciphertext_crc32c][google.cloud.kms.v1.DecapsulateRequest.ciphertext_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of the - * [ciphertext][google.cloud.kms.v1.DecapsulateRequest.ciphertext]. A false - * value of this field indicates either that - * [DecapsulateRequest.ciphertext_crc32c][google.cloud.kms.v1.DecapsulateRequest.ciphertext_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [DecapsulateRequest.ciphertext_crc32c][google.cloud.kms.v1.DecapsulateRequest.ciphertext_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * @type int $protection_level - * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in - * decapsulation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for - * decapsulation. Check this field to verify that the intended resource was - * used for decapsulation. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for - * decapsulation. Check this field to verify that the intended resource was - * used for decapsulation. - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The decapsulated shared_secret originally encapsulated with the matching - * public key. - * - * Generated from protobuf field bytes shared_secret = 2; - * @return string - */ - public function getSharedSecret() - { - return $this->shared_secret; - } - - /** - * The decapsulated shared_secret originally encapsulated with the matching - * public key. - * - * Generated from protobuf field bytes shared_secret = 2; - * @param string $var - * @return $this - */ - public function setSharedSecret($var) - { - GPBUtil::checkString($var, False); - $this->shared_secret = $var; - - return $this; - } - - /** - * Integrity verification field. A CRC32C checksum of the returned - * [DecapsulateResponse.shared_secret][google.cloud.kms.v1.DecapsulateResponse.shared_secret]. - * An integrity check of - * [DecapsulateResponse.shared_secret][google.cloud.kms.v1.DecapsulateResponse.shared_secret] - * can be performed by computing the CRC32C checksum of - * [DecapsulateResponse.shared_secret][google.cloud.kms.v1.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][google.cloud.kms.v1.KeyManagementService] is able to - * successfully decrypt the - * [ciphertext][google.cloud.kms.v1.DecapsulateRequest.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. - * - * Generated from protobuf field optional int64 shared_secret_crc32c = 3; - * @return int|string - */ - public function getSharedSecretCrc32C() - { - return isset($this->shared_secret_crc32c) ? $this->shared_secret_crc32c : 0; - } - - public function hasSharedSecretCrc32C() - { - return isset($this->shared_secret_crc32c); - } - - public function clearSharedSecretCrc32C() - { - unset($this->shared_secret_crc32c); - } - - /** - * Integrity verification field. A CRC32C checksum of the returned - * [DecapsulateResponse.shared_secret][google.cloud.kms.v1.DecapsulateResponse.shared_secret]. - * An integrity check of - * [DecapsulateResponse.shared_secret][google.cloud.kms.v1.DecapsulateResponse.shared_secret] - * can be performed by computing the CRC32C checksum of - * [DecapsulateResponse.shared_secret][google.cloud.kms.v1.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][google.cloud.kms.v1.KeyManagementService] is able to - * successfully decrypt the - * [ciphertext][google.cloud.kms.v1.DecapsulateRequest.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. - * - * Generated from protobuf field optional int64 shared_secret_crc32c = 3; - * @param int|string $var - * @return $this - */ - public function setSharedSecretCrc32C($var) - { - GPBUtil::checkInt64($var); - $this->shared_secret_crc32c = $var; - - return $this; - } - - /** - * Integrity verification field. A flag indicating whether - * [DecapsulateRequest.ciphertext_crc32c][google.cloud.kms.v1.DecapsulateRequest.ciphertext_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of the - * [ciphertext][google.cloud.kms.v1.DecapsulateRequest.ciphertext]. A false - * value of this field indicates either that - * [DecapsulateRequest.ciphertext_crc32c][google.cloud.kms.v1.DecapsulateRequest.ciphertext_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [DecapsulateRequest.ciphertext_crc32c][google.cloud.kms.v1.DecapsulateRequest.ciphertext_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * - * Generated from protobuf field bool verified_ciphertext_crc32c = 4; - * @return bool - */ - public function getVerifiedCiphertextCrc32C() - { - return $this->verified_ciphertext_crc32c; - } - - /** - * Integrity verification field. A flag indicating whether - * [DecapsulateRequest.ciphertext_crc32c][google.cloud.kms.v1.DecapsulateRequest.ciphertext_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of the - * [ciphertext][google.cloud.kms.v1.DecapsulateRequest.ciphertext]. A false - * value of this field indicates either that - * [DecapsulateRequest.ciphertext_crc32c][google.cloud.kms.v1.DecapsulateRequest.ciphertext_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [DecapsulateRequest.ciphertext_crc32c][google.cloud.kms.v1.DecapsulateRequest.ciphertext_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * - * Generated from protobuf field bool verified_ciphertext_crc32c = 4; - * @param bool $var - * @return $this - */ - public function setVerifiedCiphertextCrc32C($var) - { - GPBUtil::checkBool($var); - $this->verified_ciphertext_crc32c = $var; - - return $this; - } - - /** - * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in - * decapsulation. - * - * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 5; - * @return int - */ - public function getProtectionLevel() - { - return $this->protection_level; - } - - /** - * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in - * decapsulation. - * - * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 5; - * @param int $var - * @return $this - */ - public function setProtectionLevel($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\ProtectionLevel::class); - $this->protection_level = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DecryptRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DecryptRequest.php deleted file mode 100644 index 86cf3cc753e8..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DecryptRequest.php +++ /dev/null @@ -1,529 +0,0 @@ -google.cloud.kms.v1.DecryptRequest - */ -class DecryptRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] to use for decryption. The - * server will choose the appropriate version. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. The encrypted data originally returned in - * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext]. - * - * Generated from protobuf field bytes ciphertext = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $ciphertext = ''; - /** - * Optional. Optional data that must match the data originally supplied in - * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. - * - * Generated from protobuf field bytes additional_authenticated_data = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $additional_authenticated_data = ''; - /** - * Optional. An optional CRC32C checksum of the - * [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]) - * is equal to - * [DecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $ciphertext_crc32c = null; - /** - * Optional. An optional CRC32C checksum of the - * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.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][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]) - * is equal to - * [DecryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value additional_authenticated_data_crc32c = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $additional_authenticated_data_crc32c = null; - - /** - * @param string $name Required. The resource name of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] to use for decryption. The - * server will choose the appropriate version. Please see - * {@see KeyManagementServiceClient::cryptoKeyName()} for help formatting this field. - * @param string $ciphertext Required. The encrypted data originally returned in - * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext]. - * - * @return \Google\Cloud\Kms\V1\DecryptRequest - * - * @experimental - */ - public static function build(string $name, string $ciphertext): self - { - return (new self()) - ->setName($name) - ->setCiphertext($ciphertext); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] to use for decryption. The - * server will choose the appropriate version. - * @type string $ciphertext - * Required. The encrypted data originally returned in - * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext]. - * @type string $additional_authenticated_data - * Optional. Optional data that must match the data originally supplied in - * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. - * @type \Google\Protobuf\Int64Value $ciphertext_crc32c - * Optional. An optional CRC32C checksum of the - * [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]) - * is equal to - * [DecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.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. - * @type \Google\Protobuf\Int64Value $additional_authenticated_data_crc32c - * Optional. An optional CRC32C checksum of the - * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.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][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]) - * is equal to - * [DecryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.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. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] to use for decryption. The - * server will choose the appropriate version. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] to use for decryption. The - * server will choose the appropriate version. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. The encrypted data originally returned in - * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext]. - * - * Generated from protobuf field bytes ciphertext = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getCiphertext() - { - return $this->ciphertext; - } - - /** - * Required. The encrypted data originally returned in - * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext]. - * - * Generated from protobuf field bytes ciphertext = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setCiphertext($var) - { - GPBUtil::checkString($var, False); - $this->ciphertext = $var; - - return $this; - } - - /** - * Optional. Optional data that must match the data originally supplied in - * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. - * - * Generated from protobuf field bytes additional_authenticated_data = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getAdditionalAuthenticatedData() - { - return $this->additional_authenticated_data; - } - - /** - * Optional. Optional data that must match the data originally supplied in - * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. - * - * Generated from protobuf field bytes additional_authenticated_data = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setAdditionalAuthenticatedData($var) - { - GPBUtil::checkString($var, False); - $this->additional_authenticated_data = $var; - - return $this; - } - - /** - * Optional. An optional CRC32C checksum of the - * [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]) - * is equal to - * [DecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Int64Value|null - */ - public function getCiphertextCrc32C() - { - return $this->ciphertext_crc32c; - } - - public function hasCiphertextCrc32C() - { - return isset($this->ciphertext_crc32c); - } - - public function clearCiphertextCrc32C() - { - unset($this->ciphertext_crc32c); - } - - /** - * Returns the unboxed value from getCiphertextCrc32C() - - * Optional. An optional CRC32C checksum of the - * [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]) - * is equal to - * [DecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return int|string|null - */ - public function getCiphertextCrc32CUnwrapped() - { - return $this->readWrapperValue("ciphertext_crc32c"); - } - - /** - * Optional. An optional CRC32C checksum of the - * [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]) - * is equal to - * [DecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Int64Value $var - * @return $this - */ - public function setCiphertextCrc32C($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); - $this->ciphertext_crc32c = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. - - * Optional. An optional CRC32C checksum of the - * [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]) - * is equal to - * [DecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param int|string|null $var - * @return $this - */ - public function setCiphertextCrc32CUnwrapped($var) - { - $this->writeWrapperValue("ciphertext_crc32c", $var); - return $this;} - - /** - * Optional. An optional CRC32C checksum of the - * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.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][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]) - * is equal to - * [DecryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value additional_authenticated_data_crc32c = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Int64Value|null - */ - public function getAdditionalAuthenticatedDataCrc32C() - { - return $this->additional_authenticated_data_crc32c; - } - - public function hasAdditionalAuthenticatedDataCrc32C() - { - return isset($this->additional_authenticated_data_crc32c); - } - - public function clearAdditionalAuthenticatedDataCrc32C() - { - unset($this->additional_authenticated_data_crc32c); - } - - /** - * Returns the unboxed value from getAdditionalAuthenticatedDataCrc32C() - - * Optional. An optional CRC32C checksum of the - * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.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][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]) - * is equal to - * [DecryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value additional_authenticated_data_crc32c = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return int|string|null - */ - public function getAdditionalAuthenticatedDataCrc32CUnwrapped() - { - return $this->readWrapperValue("additional_authenticated_data_crc32c"); - } - - /** - * Optional. An optional CRC32C checksum of the - * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.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][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]) - * is equal to - * [DecryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value additional_authenticated_data_crc32c = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Int64Value $var - * @return $this - */ - public function setAdditionalAuthenticatedDataCrc32C($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); - $this->additional_authenticated_data_crc32c = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. - - * Optional. An optional CRC32C checksum of the - * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.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][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]) - * is equal to - * [DecryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value additional_authenticated_data_crc32c = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param int|string|null $var - * @return $this - */ - public function setAdditionalAuthenticatedDataCrc32CUnwrapped($var) - { - $this->writeWrapperValue("additional_authenticated_data_crc32c", $var); - return $this;} - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DecryptResponse.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DecryptResponse.php deleted file mode 100644 index 3910ec3ae0eb..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DecryptResponse.php +++ /dev/null @@ -1,315 +0,0 @@ -google.cloud.kms.v1.DecryptResponse - */ -class DecryptResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The decrypted data originally supplied in - * [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. - * - * Generated from protobuf field bytes plaintext = 1; - */ - protected $plaintext = ''; - /** - * Integrity verification field. A CRC32C checksum of the returned - * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext]. - * An integrity check of - * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext] - * can be performed by computing the CRC32C checksum of - * [DecryptResponse.plaintext][google.cloud.kms.v1.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][google.cloud.kms.v1.KeyManagementService] is able to - * successfully decrypt the - * [ciphertext][google.cloud.kms.v1.DecryptRequest.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. - * - * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 2; - */ - protected $plaintext_crc32c = null; - /** - * Whether the Decryption was performed using the primary key version. - * - * Generated from protobuf field bool used_primary = 3; - */ - protected $used_primary = false; - /** - * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in - * decryption. - * - * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 4; - */ - protected $protection_level = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $plaintext - * The decrypted data originally supplied in - * [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. - * @type \Google\Protobuf\Int64Value $plaintext_crc32c - * Integrity verification field. A CRC32C checksum of the returned - * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext]. - * An integrity check of - * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext] - * can be performed by computing the CRC32C checksum of - * [DecryptResponse.plaintext][google.cloud.kms.v1.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][google.cloud.kms.v1.KeyManagementService] is able to - * successfully decrypt the - * [ciphertext][google.cloud.kms.v1.DecryptRequest.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. - * @type bool $used_primary - * Whether the Decryption was performed using the primary key version. - * @type int $protection_level - * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in - * decryption. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * The decrypted data originally supplied in - * [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. - * - * Generated from protobuf field bytes plaintext = 1; - * @return string - */ - public function getPlaintext() - { - return $this->plaintext; - } - - /** - * The decrypted data originally supplied in - * [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. - * - * Generated from protobuf field bytes plaintext = 1; - * @param string $var - * @return $this - */ - public function setPlaintext($var) - { - GPBUtil::checkString($var, False); - $this->plaintext = $var; - - return $this; - } - - /** - * Integrity verification field. A CRC32C checksum of the returned - * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext]. - * An integrity check of - * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext] - * can be performed by computing the CRC32C checksum of - * [DecryptResponse.plaintext][google.cloud.kms.v1.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][google.cloud.kms.v1.KeyManagementService] is able to - * successfully decrypt the - * [ciphertext][google.cloud.kms.v1.DecryptRequest.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. - * - * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 2; - * @return \Google\Protobuf\Int64Value|null - */ - public function getPlaintextCrc32C() - { - return $this->plaintext_crc32c; - } - - public function hasPlaintextCrc32C() - { - return isset($this->plaintext_crc32c); - } - - public function clearPlaintextCrc32C() - { - unset($this->plaintext_crc32c); - } - - /** - * Returns the unboxed value from getPlaintextCrc32C() - - * Integrity verification field. A CRC32C checksum of the returned - * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext]. - * An integrity check of - * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext] - * can be performed by computing the CRC32C checksum of - * [DecryptResponse.plaintext][google.cloud.kms.v1.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][google.cloud.kms.v1.KeyManagementService] is able to - * successfully decrypt the - * [ciphertext][google.cloud.kms.v1.DecryptRequest.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. - * - * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 2; - * @return int|string|null - */ - public function getPlaintextCrc32CUnwrapped() - { - return $this->readWrapperValue("plaintext_crc32c"); - } - - /** - * Integrity verification field. A CRC32C checksum of the returned - * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext]. - * An integrity check of - * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext] - * can be performed by computing the CRC32C checksum of - * [DecryptResponse.plaintext][google.cloud.kms.v1.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][google.cloud.kms.v1.KeyManagementService] is able to - * successfully decrypt the - * [ciphertext][google.cloud.kms.v1.DecryptRequest.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. - * - * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 2; - * @param \Google\Protobuf\Int64Value $var - * @return $this - */ - public function setPlaintextCrc32C($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); - $this->plaintext_crc32c = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. - - * Integrity verification field. A CRC32C checksum of the returned - * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext]. - * An integrity check of - * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext] - * can be performed by computing the CRC32C checksum of - * [DecryptResponse.plaintext][google.cloud.kms.v1.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][google.cloud.kms.v1.KeyManagementService] is able to - * successfully decrypt the - * [ciphertext][google.cloud.kms.v1.DecryptRequest.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. - * - * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 2; - * @param int|string|null $var - * @return $this - */ - public function setPlaintextCrc32CUnwrapped($var) - { - $this->writeWrapperValue("plaintext_crc32c", $var); - return $this;} - - /** - * Whether the Decryption was performed using the primary key version. - * - * Generated from protobuf field bool used_primary = 3; - * @return bool - */ - public function getUsedPrimary() - { - return $this->used_primary; - } - - /** - * Whether the Decryption was performed using the primary key version. - * - * Generated from protobuf field bool used_primary = 3; - * @param bool $var - * @return $this - */ - public function setUsedPrimary($var) - { - GPBUtil::checkBool($var); - $this->used_primary = $var; - - return $this; - } - - /** - * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in - * decryption. - * - * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 4; - * @return int - */ - public function getProtectionLevel() - { - return $this->protection_level; - } - - /** - * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in - * decryption. - * - * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 4; - * @param int $var - * @return $this - */ - public function setProtectionLevel($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\ProtectionLevel::class); - $this->protection_level = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DeleteCryptoKeyMetadata.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DeleteCryptoKeyMetadata.php deleted file mode 100644 index 5b0f4dac2960..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DeleteCryptoKeyMetadata.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.kms.v1.DeleteCryptoKeyMetadata - */ -class DeleteCryptoKeyMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The resource name of the - * [RetiredResource][google.cloud.kms.v1.RetiredResource] created as a result - * of this operation, in the format - * `projects/*/locations/*/retiredResources/*`. - * - * Generated from protobuf field string retired_resource = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $retired_resource = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $retired_resource - * Output only. The resource name of the - * [RetiredResource][google.cloud.kms.v1.RetiredResource] created as a result - * of this operation, in the format - * `projects/*/locations/*/retiredResources/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The resource name of the - * [RetiredResource][google.cloud.kms.v1.RetiredResource] created as a result - * of this operation, in the format - * `projects/*/locations/*/retiredResources/*`. - * - * Generated from protobuf field string retired_resource = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getRetiredResource() - { - return $this->retired_resource; - } - - /** - * Output only. The resource name of the - * [RetiredResource][google.cloud.kms.v1.RetiredResource] created as a result - * of this operation, in the format - * `projects/*/locations/*/retiredResources/*`. - * - * Generated from protobuf field string retired_resource = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setRetiredResource($var) - { - GPBUtil::checkString($var, True); - $this->retired_resource = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DeleteCryptoKeyRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DeleteCryptoKeyRequest.php deleted file mode 100644 index 9de3c796200e..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DeleteCryptoKeyRequest.php +++ /dev/null @@ -1,87 +0,0 @@ -google.cloud.kms.v1.DeleteCryptoKeyRequest - */ -class DeleteCryptoKeyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The [name][google.cloud.kms.v1.CryptoKey.name] of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] to delete. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The [name][google.cloud.kms.v1.CryptoKey.name] of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] to delete. Please see - * {@see KeyManagementServiceClient::cryptoKeyName()} for help formatting this field. - * - * @return \Google\Cloud\Kms\V1\DeleteCryptoKeyRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The [name][google.cloud.kms.v1.CryptoKey.name] of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] to delete. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The [name][google.cloud.kms.v1.CryptoKey.name] of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] to delete. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The [name][google.cloud.kms.v1.CryptoKey.name] of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] to delete. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DeleteCryptoKeyVersionMetadata.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DeleteCryptoKeyVersionMetadata.php deleted file mode 100644 index 9f59dca4fa2a..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DeleteCryptoKeyVersionMetadata.php +++ /dev/null @@ -1,35 +0,0 @@ -google.cloud.kms.v1.DeleteCryptoKeyVersionMetadata - */ -class DeleteCryptoKeyVersionMetadata extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DeleteCryptoKeyVersionRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DeleteCryptoKeyVersionRequest.php deleted file mode 100644 index 36abc2b6e1ed..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DeleteCryptoKeyVersionRequest.php +++ /dev/null @@ -1,87 +0,0 @@ -google.cloud.kms.v1.DeleteCryptoKeyVersionRequest - */ -class DeleteCryptoKeyVersionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to delete. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to delete. Please see - * {@see KeyManagementServiceClient::cryptoKeyVersionName()} for help formatting this field. - * - * @return \Google\Cloud\Kms\V1\DeleteCryptoKeyVersionRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to delete. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to delete. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to delete. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DeleteSingleTenantHsmInstanceProposalRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DeleteSingleTenantHsmInstanceProposalRequest.php deleted file mode 100644 index ffdee6ceb58e..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DeleteSingleTenantHsmInstanceProposalRequest.php +++ /dev/null @@ -1,97 +0,0 @@ -google.cloud.kms.v1.DeleteSingleTenantHsmInstanceProposalRequest - */ -class DeleteSingleTenantHsmInstanceProposalRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The - * [name][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.name] of the - * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * to delete. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The - * [name][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.name] of the - * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * to delete. Please see - * {@see HsmManagementClient::singleTenantHsmInstanceProposalName()} for help formatting this field. - * - * @return \Google\Cloud\Kms\V1\DeleteSingleTenantHsmInstanceProposalRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The - * [name][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.name] of the - * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * to delete. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\HsmManagement::initOnce(); - parent::__construct($data); - } - - /** - * Required. The - * [name][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.name] of the - * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * to delete. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The - * [name][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.name] of the - * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * to delete. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DestroyCryptoKeyVersionRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DestroyCryptoKeyVersionRequest.php deleted file mode 100644 index 71fbcb00be4b..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DestroyCryptoKeyVersionRequest.php +++ /dev/null @@ -1,87 +0,0 @@ -google.cloud.kms.v1.DestroyCryptoKeyVersionRequest - */ -class DestroyCryptoKeyVersionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to destroy. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to destroy. Please see - * {@see KeyManagementServiceClient::cryptoKeyVersionName()} for help formatting this field. - * - * @return \Google\Cloud\Kms\V1\DestroyCryptoKeyVersionRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to destroy. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to destroy. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to destroy. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/Digest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/Digest.php deleted file mode 100644 index 90201ffc30de..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/Digest.php +++ /dev/null @@ -1,141 +0,0 @@ -google.cloud.kms.v1.Digest - */ -class Digest extends \Google\Protobuf\Internal\Message -{ - protected $digest; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $sha256 - * A message digest produced with the SHA-256 algorithm. - * @type string $sha384 - * A message digest produced with the SHA-384 algorithm. - * @type string $sha512 - * A message digest produced with the SHA-512 algorithm. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * A message digest produced with the SHA-256 algorithm. - * - * Generated from protobuf field bytes sha256 = 1; - * @return string - */ - public function getSha256() - { - return $this->readOneof(1); - } - - public function hasSha256() - { - return $this->hasOneof(1); - } - - /** - * A message digest produced with the SHA-256 algorithm. - * - * Generated from protobuf field bytes sha256 = 1; - * @param string $var - * @return $this - */ - public function setSha256($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * A message digest produced with the SHA-384 algorithm. - * - * Generated from protobuf field bytes sha384 = 2; - * @return string - */ - public function getSha384() - { - return $this->readOneof(2); - } - - public function hasSha384() - { - return $this->hasOneof(2); - } - - /** - * A message digest produced with the SHA-384 algorithm. - * - * Generated from protobuf field bytes sha384 = 2; - * @param string $var - * @return $this - */ - public function setSha384($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * A message digest produced with the SHA-512 algorithm. - * - * Generated from protobuf field bytes sha512 = 3; - * @return string - */ - public function getSha512() - { - return $this->readOneof(3); - } - - public function hasSha512() - { - return $this->hasOneof(3); - } - - /** - * A message digest produced with the SHA-512 algorithm. - * - * Generated from protobuf field bytes sha512 = 3; - * @param string $var - * @return $this - */ - public function setSha512($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getDigest() - { - return $this->whichOneof("digest"); - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EkmConfig.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EkmConfig.php deleted file mode 100644 index 6c69ba7f6652..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EkmConfig.php +++ /dev/null @@ -1,123 +0,0 @@ -google.cloud.kms.v1.EkmConfig - */ -class EkmConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The resource name for the - * [EkmConfig][google.cloud.kms.v1.EkmConfig] in the format - * `projects/*/locations/*/ekmConfig`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Optional. Resource name of the default - * [EkmConnection][google.cloud.kms.v1.EkmConnection]. Setting this field to - * the empty string removes the default. - * - * Generated from protobuf field string default_ekm_connection = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $default_ekm_connection = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The resource name for the - * [EkmConfig][google.cloud.kms.v1.EkmConfig] in the format - * `projects/*/locations/*/ekmConfig`. - * @type string $default_ekm_connection - * Optional. Resource name of the default - * [EkmConnection][google.cloud.kms.v1.EkmConnection]. Setting this field to - * the empty string removes the default. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\EkmService::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The resource name for the - * [EkmConfig][google.cloud.kms.v1.EkmConfig] in the format - * `projects/*/locations/*/ekmConfig`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The resource name for the - * [EkmConfig][google.cloud.kms.v1.EkmConfig] in the format - * `projects/*/locations/*/ekmConfig`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. Resource name of the default - * [EkmConnection][google.cloud.kms.v1.EkmConnection]. Setting this field to - * the empty string removes the default. - * - * Generated from protobuf field string default_ekm_connection = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getDefaultEkmConnection() - { - return $this->default_ekm_connection; - } - - /** - * Optional. Resource name of the default - * [EkmConnection][google.cloud.kms.v1.EkmConnection]. Setting this field to - * the empty string removes the default. - * - * Generated from protobuf field string default_ekm_connection = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setDefaultEkmConnection($var) - { - GPBUtil::checkString($var, True); - $this->default_ekm_connection = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EkmConnection.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EkmConnection.php deleted file mode 100644 index dd7b3fd2fc92..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EkmConnection.php +++ /dev/null @@ -1,314 +0,0 @@ -google.cloud.kms.v1.EkmConnection - */ -class EkmConnection extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The resource name for the - * [EkmConnection][google.cloud.kms.v1.EkmConnection] in the format - * `projects/*/locations/*/ekmConnections/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. The time at which the - * [EkmConnection][google.cloud.kms.v1.EkmConnection] was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Optional. A list of - * [ServiceResolvers][google.cloud.kms.v1.EkmConnection.ServiceResolver] where - * the EKM can be reached. There should be one ServiceResolver per EKM - * replica. Currently, only a single - * [ServiceResolver][google.cloud.kms.v1.EkmConnection.ServiceResolver] is - * supported. - * - * Generated from protobuf field repeated .google.cloud.kms.v1.EkmConnection.ServiceResolver service_resolvers = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $service_resolvers; - /** - * Optional. Etag of the currently stored - * [EkmConnection][google.cloud.kms.v1.EkmConnection]. - * - * Generated from protobuf field string etag = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $etag = ''; - /** - * Optional. Describes who can perform control plane operations on the EKM. If - * unset, this defaults to - * [MANUAL][google.cloud.kms.v1.EkmConnection.KeyManagementMode.MANUAL]. - * - * Generated from protobuf field .google.cloud.kms.v1.EkmConnection.KeyManagementMode key_management_mode = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $key_management_mode = 0; - /** - * Optional. Identifies the EKM Crypto Space that this - * [EkmConnection][google.cloud.kms.v1.EkmConnection] maps to. Note: This - * field is required if - * [KeyManagementMode][google.cloud.kms.v1.EkmConnection.KeyManagementMode] is - * [CLOUD_KMS][google.cloud.kms.v1.EkmConnection.KeyManagementMode.CLOUD_KMS]. - * - * Generated from protobuf field string crypto_space_path = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $crypto_space_path = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The resource name for the - * [EkmConnection][google.cloud.kms.v1.EkmConnection] in the format - * `projects/*/locations/*/ekmConnections/*`. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time at which the - * [EkmConnection][google.cloud.kms.v1.EkmConnection] was created. - * @type array<\Google\Cloud\Kms\V1\EkmConnection\ServiceResolver>|\Google\Protobuf\Internal\RepeatedField $service_resolvers - * Optional. A list of - * [ServiceResolvers][google.cloud.kms.v1.EkmConnection.ServiceResolver] where - * the EKM can be reached. There should be one ServiceResolver per EKM - * replica. Currently, only a single - * [ServiceResolver][google.cloud.kms.v1.EkmConnection.ServiceResolver] is - * supported. - * @type string $etag - * Optional. Etag of the currently stored - * [EkmConnection][google.cloud.kms.v1.EkmConnection]. - * @type int $key_management_mode - * Optional. Describes who can perform control plane operations on the EKM. If - * unset, this defaults to - * [MANUAL][google.cloud.kms.v1.EkmConnection.KeyManagementMode.MANUAL]. - * @type string $crypto_space_path - * Optional. Identifies the EKM Crypto Space that this - * [EkmConnection][google.cloud.kms.v1.EkmConnection] maps to. Note: This - * field is required if - * [KeyManagementMode][google.cloud.kms.v1.EkmConnection.KeyManagementMode] is - * [CLOUD_KMS][google.cloud.kms.v1.EkmConnection.KeyManagementMode.CLOUD_KMS]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\EkmService::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The resource name for the - * [EkmConnection][google.cloud.kms.v1.EkmConnection] in the format - * `projects/*/locations/*/ekmConnections/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The resource name for the - * [EkmConnection][google.cloud.kms.v1.EkmConnection] in the format - * `projects/*/locations/*/ekmConnections/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. The time at which the - * [EkmConnection][google.cloud.kms.v1.EkmConnection] was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time at which the - * [EkmConnection][google.cloud.kms.v1.EkmConnection] was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Optional. A list of - * [ServiceResolvers][google.cloud.kms.v1.EkmConnection.ServiceResolver] where - * the EKM can be reached. There should be one ServiceResolver per EKM - * replica. Currently, only a single - * [ServiceResolver][google.cloud.kms.v1.EkmConnection.ServiceResolver] is - * supported. - * - * Generated from protobuf field repeated .google.cloud.kms.v1.EkmConnection.ServiceResolver service_resolvers = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getServiceResolvers() - { - return $this->service_resolvers; - } - - /** - * Optional. A list of - * [ServiceResolvers][google.cloud.kms.v1.EkmConnection.ServiceResolver] where - * the EKM can be reached. There should be one ServiceResolver per EKM - * replica. Currently, only a single - * [ServiceResolver][google.cloud.kms.v1.EkmConnection.ServiceResolver] is - * supported. - * - * Generated from protobuf field repeated .google.cloud.kms.v1.EkmConnection.ServiceResolver service_resolvers = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\Kms\V1\EkmConnection\ServiceResolver>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setServiceResolvers($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Kms\V1\EkmConnection\ServiceResolver::class); - $this->service_resolvers = $arr; - - return $this; - } - - /** - * Optional. Etag of the currently stored - * [EkmConnection][google.cloud.kms.v1.EkmConnection]. - * - * Generated from protobuf field string etag = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Optional. Etag of the currently stored - * [EkmConnection][google.cloud.kms.v1.EkmConnection]. - * - * Generated from protobuf field string etag = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - - /** - * Optional. Describes who can perform control plane operations on the EKM. If - * unset, this defaults to - * [MANUAL][google.cloud.kms.v1.EkmConnection.KeyManagementMode.MANUAL]. - * - * Generated from protobuf field .google.cloud.kms.v1.EkmConnection.KeyManagementMode key_management_mode = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getKeyManagementMode() - { - return $this->key_management_mode; - } - - /** - * Optional. Describes who can perform control plane operations on the EKM. If - * unset, this defaults to - * [MANUAL][google.cloud.kms.v1.EkmConnection.KeyManagementMode.MANUAL]. - * - * Generated from protobuf field .google.cloud.kms.v1.EkmConnection.KeyManagementMode key_management_mode = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setKeyManagementMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\EkmConnection\KeyManagementMode::class); - $this->key_management_mode = $var; - - return $this; - } - - /** - * Optional. Identifies the EKM Crypto Space that this - * [EkmConnection][google.cloud.kms.v1.EkmConnection] maps to. Note: This - * field is required if - * [KeyManagementMode][google.cloud.kms.v1.EkmConnection.KeyManagementMode] is - * [CLOUD_KMS][google.cloud.kms.v1.EkmConnection.KeyManagementMode.CLOUD_KMS]. - * - * Generated from protobuf field string crypto_space_path = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getCryptoSpacePath() - { - return $this->crypto_space_path; - } - - /** - * Optional. Identifies the EKM Crypto Space that this - * [EkmConnection][google.cloud.kms.v1.EkmConnection] maps to. Note: This - * field is required if - * [KeyManagementMode][google.cloud.kms.v1.EkmConnection.KeyManagementMode] is - * [CLOUD_KMS][google.cloud.kms.v1.EkmConnection.KeyManagementMode.CLOUD_KMS]. - * - * Generated from protobuf field string crypto_space_path = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setCryptoSpacePath($var) - { - GPBUtil::checkString($var, True); - $this->crypto_space_path = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EkmConnection/KeyManagementMode.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EkmConnection/KeyManagementMode.php deleted file mode 100644 index c1afacefc14a..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EkmConnection/KeyManagementMode.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.kms.v1.EkmConnection.KeyManagementMode - */ -class KeyManagementMode -{ - /** - * Not specified. - * - * Generated from protobuf enum KEY_MANAGEMENT_MODE_UNSPECIFIED = 0; - */ - const KEY_MANAGEMENT_MODE_UNSPECIFIED = 0; - /** - * EKM-side key management operations on - * [CryptoKeys][google.cloud.kms.v1.CryptoKey] created with this - * [EkmConnection][google.cloud.kms.v1.EkmConnection] must be initiated from - * the EKM directly and cannot be performed from Cloud KMS. This means that: - * * When creating a - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] associated with - * this - * [EkmConnection][google.cloud.kms.v1.EkmConnection], the caller must - * supply the key path of pre-existing external key material that will be - * linked to the [CryptoKeyVersion][google.cloud.kms.v1.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. - * - * Generated from protobuf enum MANUAL = 1; - */ - const MANUAL = 1; - /** - * All [CryptoKeys][google.cloud.kms.v1.CryptoKey] created with this - * [EkmConnection][google.cloud.kms.v1.EkmConnection] use EKM-side key - * management operations initiated from Cloud KMS. This means that: - * * When a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] - * associated with this [EkmConnection][google.cloud.kms.v1.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][google.cloud.kms.v1.EkmConnection] can be requested by - * calling - * [DestroyCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.DestroyCryptoKeyVersion]. - * * Automatic rotation of key material is supported. - * - * Generated from protobuf enum CLOUD_KMS = 2; - */ - const CLOUD_KMS = 2; - - private static $valueToName = [ - self::KEY_MANAGEMENT_MODE_UNSPECIFIED => 'KEY_MANAGEMENT_MODE_UNSPECIFIED', - self::MANUAL => 'MANUAL', - self::CLOUD_KMS => 'CLOUD_KMS', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(KeyManagementMode::class, \Google\Cloud\Kms\V1\EkmConnection_KeyManagementMode::class); - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EkmConnection/ServiceResolver.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EkmConnection/ServiceResolver.php deleted file mode 100644 index 37e72fe4b1a8..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EkmConnection/ServiceResolver.php +++ /dev/null @@ -1,206 +0,0 @@ -google.cloud.kms.v1.EkmConnection.ServiceResolver - */ -class ServiceResolver extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the Service Directory service pointing to - * an EKM replica, in the format - * `projects/*/locations/*/namespaces/*/services/*`. - * - * Generated from protobuf field string service_directory_service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $service_directory_service = ''; - /** - * 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. - * - * Generated from protobuf field string endpoint_filter = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $endpoint_filter = ''; - /** - * Required. The hostname of the EKM replica used at TLS and HTTP layers. - * - * Generated from protobuf field string hostname = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $hostname = ''; - /** - * Required. A list of leaf server certificates used to authenticate HTTPS - * connections to the EKM replica. Currently, a maximum of 10 - * [Certificate][google.cloud.kms.v1.Certificate] is supported. - * - * Generated from protobuf field repeated .google.cloud.kms.v1.Certificate server_certificates = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - private $server_certificates; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $service_directory_service - * Required. The resource name of the Service Directory service pointing to - * an EKM replica, in the format - * `projects/*/locations/*/namespaces/*/services/*`. - * @type string $endpoint_filter - * 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. - * @type string $hostname - * Required. The hostname of the EKM replica used at TLS and HTTP layers. - * @type array<\Google\Cloud\Kms\V1\Certificate>|\Google\Protobuf\Internal\RepeatedField $server_certificates - * Required. A list of leaf server certificates used to authenticate HTTPS - * connections to the EKM replica. Currently, a maximum of 10 - * [Certificate][google.cloud.kms.v1.Certificate] is supported. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\EkmService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the Service Directory service pointing to - * an EKM replica, in the format - * `projects/*/locations/*/namespaces/*/services/*`. - * - * Generated from protobuf field string service_directory_service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getServiceDirectoryService() - { - return $this->service_directory_service; - } - - /** - * Required. The resource name of the Service Directory service pointing to - * an EKM replica, in the format - * `projects/*/locations/*/namespaces/*/services/*`. - * - * Generated from protobuf field string service_directory_service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setServiceDirectoryService($var) - { - GPBUtil::checkString($var, True); - $this->service_directory_service = $var; - - return $this; - } - - /** - * 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. - * - * Generated from protobuf field string endpoint_filter = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getEndpointFilter() - { - return $this->endpoint_filter; - } - - /** - * 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. - * - * Generated from protobuf field string endpoint_filter = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setEndpointFilter($var) - { - GPBUtil::checkString($var, True); - $this->endpoint_filter = $var; - - return $this; - } - - /** - * Required. The hostname of the EKM replica used at TLS and HTTP layers. - * - * Generated from protobuf field string hostname = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getHostname() - { - return $this->hostname; - } - - /** - * Required. The hostname of the EKM replica used at TLS and HTTP layers. - * - * Generated from protobuf field string hostname = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setHostname($var) - { - GPBUtil::checkString($var, True); - $this->hostname = $var; - - return $this; - } - - /** - * Required. A list of leaf server certificates used to authenticate HTTPS - * connections to the EKM replica. Currently, a maximum of 10 - * [Certificate][google.cloud.kms.v1.Certificate] is supported. - * - * Generated from protobuf field repeated .google.cloud.kms.v1.Certificate server_certificates = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getServerCertificates() - { - return $this->server_certificates; - } - - /** - * Required. A list of leaf server certificates used to authenticate HTTPS - * connections to the EKM replica. Currently, a maximum of 10 - * [Certificate][google.cloud.kms.v1.Certificate] is supported. - * - * Generated from protobuf field repeated .google.cloud.kms.v1.Certificate server_certificates = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\Kms\V1\Certificate>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setServerCertificates($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Kms\V1\Certificate::class); - $this->server_certificates = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ServiceResolver::class, \Google\Cloud\Kms\V1\EkmConnection_ServiceResolver::class); - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EncryptRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EncryptRequest.php deleted file mode 100644 index 54a6c404dbc8..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EncryptRequest.php +++ /dev/null @@ -1,625 +0,0 @@ -google.cloud.kms.v1.EncryptRequest - */ -class EncryptRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] or - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for - * encryption. - * If a [CryptoKey][google.cloud.kms.v1.CryptoKey] is specified, the server - * will use its [primary version][google.cloud.kms.v1.CryptoKey.primary]. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. The data to encrypt. Must be no larger than 64KiB. - * The maximum size depends on the key version's - * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]. - * For [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE], - * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL], and - * [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC] keys, the - * plaintext must be no larger than 64KiB. For - * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] keys, the combined length of - * the plaintext and additional_authenticated_data fields must be no larger - * than 8KiB. - * - * Generated from protobuf field bytes plaintext = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $plaintext = ''; - /** - * Optional. Optional data that, if specified, must also be provided during - * decryption through - * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]. - * The maximum size depends on the key version's - * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]. - * For [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE], - * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL], and - * [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC] keys the - * AAD must be no larger than 64KiB. For - * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] keys, the combined length of - * the plaintext and additional_authenticated_data fields must be no larger - * than 8KiB. - * - * Generated from protobuf field bytes additional_authenticated_data = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $additional_authenticated_data = ''; - /** - * Optional. An optional CRC32C checksum of the - * [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]) - * is equal to - * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $plaintext_crc32c = null; - /** - * Optional. An optional CRC32C checksum of the - * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.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][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]) - * is equal to - * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value additional_authenticated_data_crc32c = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $additional_authenticated_data_crc32c = null; - - /** - * @param string $name Required. The resource name of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] or - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for - * encryption. - * - * If a [CryptoKey][google.cloud.kms.v1.CryptoKey] is specified, the server - * will use its [primary version][google.cloud.kms.v1.CryptoKey.primary]. - * @param string $plaintext Required. The data to encrypt. Must be no larger than 64KiB. - * - * The maximum size depends on the key version's - * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]. - * For [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE], - * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL], and - * [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC] keys, the - * plaintext must be no larger than 64KiB. For - * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] keys, the combined length of - * the plaintext and additional_authenticated_data fields must be no larger - * than 8KiB. - * - * @return \Google\Cloud\Kms\V1\EncryptRequest - * - * @experimental - */ - public static function build(string $name, string $plaintext): self - { - return (new self()) - ->setName($name) - ->setPlaintext($plaintext); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] or - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for - * encryption. - * If a [CryptoKey][google.cloud.kms.v1.CryptoKey] is specified, the server - * will use its [primary version][google.cloud.kms.v1.CryptoKey.primary]. - * @type string $plaintext - * Required. The data to encrypt. Must be no larger than 64KiB. - * The maximum size depends on the key version's - * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]. - * For [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE], - * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL], and - * [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC] keys, the - * plaintext must be no larger than 64KiB. For - * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] keys, the combined length of - * the plaintext and additional_authenticated_data fields must be no larger - * than 8KiB. - * @type string $additional_authenticated_data - * Optional. Optional data that, if specified, must also be provided during - * decryption through - * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]. - * The maximum size depends on the key version's - * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]. - * For [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE], - * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL], and - * [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC] keys the - * AAD must be no larger than 64KiB. For - * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] keys, the combined length of - * the plaintext and additional_authenticated_data fields must be no larger - * than 8KiB. - * @type \Google\Protobuf\Int64Value $plaintext_crc32c - * Optional. An optional CRC32C checksum of the - * [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]) - * is equal to - * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.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. - * @type \Google\Protobuf\Int64Value $additional_authenticated_data_crc32c - * Optional. An optional CRC32C checksum of the - * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.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][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]) - * is equal to - * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.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. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] or - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for - * encryption. - * If a [CryptoKey][google.cloud.kms.v1.CryptoKey] is specified, the server - * will use its [primary version][google.cloud.kms.v1.CryptoKey.primary]. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] or - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for - * encryption. - * If a [CryptoKey][google.cloud.kms.v1.CryptoKey] is specified, the server - * will use its [primary version][google.cloud.kms.v1.CryptoKey.primary]. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. The data to encrypt. Must be no larger than 64KiB. - * The maximum size depends on the key version's - * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]. - * For [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE], - * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL], and - * [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC] keys, the - * plaintext must be no larger than 64KiB. For - * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] keys, the combined length of - * the plaintext and additional_authenticated_data fields must be no larger - * than 8KiB. - * - * Generated from protobuf field bytes plaintext = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getPlaintext() - { - return $this->plaintext; - } - - /** - * Required. The data to encrypt. Must be no larger than 64KiB. - * The maximum size depends on the key version's - * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]. - * For [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE], - * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL], and - * [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC] keys, the - * plaintext must be no larger than 64KiB. For - * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] keys, the combined length of - * the plaintext and additional_authenticated_data fields must be no larger - * than 8KiB. - * - * Generated from protobuf field bytes plaintext = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setPlaintext($var) - { - GPBUtil::checkString($var, False); - $this->plaintext = $var; - - return $this; - } - - /** - * Optional. Optional data that, if specified, must also be provided during - * decryption through - * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]. - * The maximum size depends on the key version's - * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]. - * For [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE], - * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL], and - * [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC] keys the - * AAD must be no larger than 64KiB. For - * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] keys, the combined length of - * the plaintext and additional_authenticated_data fields must be no larger - * than 8KiB. - * - * Generated from protobuf field bytes additional_authenticated_data = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getAdditionalAuthenticatedData() - { - return $this->additional_authenticated_data; - } - - /** - * Optional. Optional data that, if specified, must also be provided during - * decryption through - * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]. - * The maximum size depends on the key version's - * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]. - * For [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE], - * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL], and - * [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC] keys the - * AAD must be no larger than 64KiB. For - * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] keys, the combined length of - * the plaintext and additional_authenticated_data fields must be no larger - * than 8KiB. - * - * Generated from protobuf field bytes additional_authenticated_data = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setAdditionalAuthenticatedData($var) - { - GPBUtil::checkString($var, False); - $this->additional_authenticated_data = $var; - - return $this; - } - - /** - * Optional. An optional CRC32C checksum of the - * [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]) - * is equal to - * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Int64Value|null - */ - public function getPlaintextCrc32C() - { - return $this->plaintext_crc32c; - } - - public function hasPlaintextCrc32C() - { - return isset($this->plaintext_crc32c); - } - - public function clearPlaintextCrc32C() - { - unset($this->plaintext_crc32c); - } - - /** - * Returns the unboxed value from getPlaintextCrc32C() - - * Optional. An optional CRC32C checksum of the - * [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]) - * is equal to - * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return int|string|null - */ - public function getPlaintextCrc32CUnwrapped() - { - return $this->readWrapperValue("plaintext_crc32c"); - } - - /** - * Optional. An optional CRC32C checksum of the - * [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]) - * is equal to - * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Int64Value $var - * @return $this - */ - public function setPlaintextCrc32C($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); - $this->plaintext_crc32c = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. - - * Optional. An optional CRC32C checksum of the - * [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]) - * is equal to - * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param int|string|null $var - * @return $this - */ - public function setPlaintextCrc32CUnwrapped($var) - { - $this->writeWrapperValue("plaintext_crc32c", $var); - return $this;} - - /** - * Optional. An optional CRC32C checksum of the - * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.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][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]) - * is equal to - * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value additional_authenticated_data_crc32c = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Int64Value|null - */ - public function getAdditionalAuthenticatedDataCrc32C() - { - return $this->additional_authenticated_data_crc32c; - } - - public function hasAdditionalAuthenticatedDataCrc32C() - { - return isset($this->additional_authenticated_data_crc32c); - } - - public function clearAdditionalAuthenticatedDataCrc32C() - { - unset($this->additional_authenticated_data_crc32c); - } - - /** - * Returns the unboxed value from getAdditionalAuthenticatedDataCrc32C() - - * Optional. An optional CRC32C checksum of the - * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.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][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]) - * is equal to - * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value additional_authenticated_data_crc32c = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return int|string|null - */ - public function getAdditionalAuthenticatedDataCrc32CUnwrapped() - { - return $this->readWrapperValue("additional_authenticated_data_crc32c"); - } - - /** - * Optional. An optional CRC32C checksum of the - * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.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][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]) - * is equal to - * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value additional_authenticated_data_crc32c = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Int64Value $var - * @return $this - */ - public function setAdditionalAuthenticatedDataCrc32C($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); - $this->additional_authenticated_data_crc32c = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. - - * Optional. An optional CRC32C checksum of the - * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.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][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]) - * is equal to - * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value additional_authenticated_data_crc32c = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param int|string|null $var - * @return $this - */ - public function setAdditionalAuthenticatedDataCrc32CUnwrapped($var) - { - $this->writeWrapperValue("additional_authenticated_data_crc32c", $var); - return $this;} - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EncryptResponse.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EncryptResponse.php deleted file mode 100644 index 7a18418344b6..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EncryptResponse.php +++ /dev/null @@ -1,471 +0,0 @@ -google.cloud.kms.v1.EncryptResponse - */ -class EncryptResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in - * encryption. Check this field to verify that the intended resource was used - * for encryption. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The encrypted data. - * - * Generated from protobuf field bytes ciphertext = 2; - */ - protected $ciphertext = ''; - /** - * Integrity verification field. A CRC32C checksum of the returned - * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext]. - * An integrity check of - * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext] - * can be performed by computing the CRC32C checksum of - * [EncryptResponse.ciphertext][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 4; - */ - protected $ciphertext_crc32c = null; - /** - * Integrity verification field. A flag indicating whether - * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of the - * [plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. A false value of - * this field indicates either that - * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * - * Generated from protobuf field bool verified_plaintext_crc32c = 5; - */ - protected $verified_plaintext_crc32c = false; - /** - * Integrity verification field. A flag indicating whether - * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of the - * [AAD][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. A - * false value of this field indicates either that - * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * - * Generated from protobuf field bool verified_additional_authenticated_data_crc32c = 6; - */ - protected $verified_additional_authenticated_data_crc32c = false; - /** - * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in - * encryption. - * - * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 7; - */ - protected $protection_level = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in - * encryption. Check this field to verify that the intended resource was used - * for encryption. - * @type string $ciphertext - * The encrypted data. - * @type \Google\Protobuf\Int64Value $ciphertext_crc32c - * Integrity verification field. A CRC32C checksum of the returned - * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext]. - * An integrity check of - * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext] - * can be performed by computing the CRC32C checksum of - * [EncryptResponse.ciphertext][google.cloud.kms.v1.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. - * @type bool $verified_plaintext_crc32c - * Integrity verification field. A flag indicating whether - * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of the - * [plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. A false value of - * this field indicates either that - * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * @type bool $verified_additional_authenticated_data_crc32c - * Integrity verification field. A flag indicating whether - * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of the - * [AAD][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. A - * false value of this field indicates either that - * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * @type int $protection_level - * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in - * encryption. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in - * encryption. Check this field to verify that the intended resource was used - * for encryption. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in - * encryption. Check this field to verify that the intended resource was used - * for encryption. - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The encrypted data. - * - * Generated from protobuf field bytes ciphertext = 2; - * @return string - */ - public function getCiphertext() - { - return $this->ciphertext; - } - - /** - * The encrypted data. - * - * Generated from protobuf field bytes ciphertext = 2; - * @param string $var - * @return $this - */ - public function setCiphertext($var) - { - GPBUtil::checkString($var, False); - $this->ciphertext = $var; - - return $this; - } - - /** - * Integrity verification field. A CRC32C checksum of the returned - * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext]. - * An integrity check of - * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext] - * can be performed by computing the CRC32C checksum of - * [EncryptResponse.ciphertext][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 4; - * @return \Google\Protobuf\Int64Value|null - */ - public function getCiphertextCrc32C() - { - return $this->ciphertext_crc32c; - } - - public function hasCiphertextCrc32C() - { - return isset($this->ciphertext_crc32c); - } - - public function clearCiphertextCrc32C() - { - unset($this->ciphertext_crc32c); - } - - /** - * Returns the unboxed value from getCiphertextCrc32C() - - * Integrity verification field. A CRC32C checksum of the returned - * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext]. - * An integrity check of - * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext] - * can be performed by computing the CRC32C checksum of - * [EncryptResponse.ciphertext][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 4; - * @return int|string|null - */ - public function getCiphertextCrc32CUnwrapped() - { - return $this->readWrapperValue("ciphertext_crc32c"); - } - - /** - * Integrity verification field. A CRC32C checksum of the returned - * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext]. - * An integrity check of - * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext] - * can be performed by computing the CRC32C checksum of - * [EncryptResponse.ciphertext][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 4; - * @param \Google\Protobuf\Int64Value $var - * @return $this - */ - public function setCiphertextCrc32C($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); - $this->ciphertext_crc32c = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. - - * Integrity verification field. A CRC32C checksum of the returned - * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext]. - * An integrity check of - * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext] - * can be performed by computing the CRC32C checksum of - * [EncryptResponse.ciphertext][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 4; - * @param int|string|null $var - * @return $this - */ - public function setCiphertextCrc32CUnwrapped($var) - { - $this->writeWrapperValue("ciphertext_crc32c", $var); - return $this;} - - /** - * Integrity verification field. A flag indicating whether - * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of the - * [plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. A false value of - * this field indicates either that - * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * - * Generated from protobuf field bool verified_plaintext_crc32c = 5; - * @return bool - */ - public function getVerifiedPlaintextCrc32C() - { - return $this->verified_plaintext_crc32c; - } - - /** - * Integrity verification field. A flag indicating whether - * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of the - * [plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. A false value of - * this field indicates either that - * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * - * Generated from protobuf field bool verified_plaintext_crc32c = 5; - * @param bool $var - * @return $this - */ - public function setVerifiedPlaintextCrc32C($var) - { - GPBUtil::checkBool($var); - $this->verified_plaintext_crc32c = $var; - - return $this; - } - - /** - * Integrity verification field. A flag indicating whether - * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of the - * [AAD][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. A - * false value of this field indicates either that - * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * - * Generated from protobuf field bool verified_additional_authenticated_data_crc32c = 6; - * @return bool - */ - public function getVerifiedAdditionalAuthenticatedDataCrc32C() - { - return $this->verified_additional_authenticated_data_crc32c; - } - - /** - * Integrity verification field. A flag indicating whether - * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of the - * [AAD][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. A - * false value of this field indicates either that - * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * - * Generated from protobuf field bool verified_additional_authenticated_data_crc32c = 6; - * @param bool $var - * @return $this - */ - public function setVerifiedAdditionalAuthenticatedDataCrc32C($var) - { - GPBUtil::checkBool($var); - $this->verified_additional_authenticated_data_crc32c = $var; - - return $this; - } - - /** - * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in - * encryption. - * - * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 7; - * @return int - */ - public function getProtectionLevel() - { - return $this->protection_level; - } - - /** - * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in - * encryption. - * - * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 7; - * @param int $var - * @return $this - */ - public function setProtectionLevel($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\ProtectionLevel::class); - $this->protection_level = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ExecuteSingleTenantHsmInstanceProposalMetadata.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ExecuteSingleTenantHsmInstanceProposalMetadata.php deleted file mode 100644 index 79ed45f4b228..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ExecuteSingleTenantHsmInstanceProposalMetadata.php +++ /dev/null @@ -1,35 +0,0 @@ -google.cloud.kms.v1.ExecuteSingleTenantHsmInstanceProposalMetadata - */ -class ExecuteSingleTenantHsmInstanceProposalMetadata extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\HsmManagement::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ExecuteSingleTenantHsmInstanceProposalRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ExecuteSingleTenantHsmInstanceProposalRequest.php deleted file mode 100644 index 8d13cfd50639..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ExecuteSingleTenantHsmInstanceProposalRequest.php +++ /dev/null @@ -1,97 +0,0 @@ -google.cloud.kms.v1.ExecuteSingleTenantHsmInstanceProposalRequest - */ -class ExecuteSingleTenantHsmInstanceProposalRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The - * [name][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.name] of the - * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * to execute. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The - * [name][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.name] of the - * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * to execute. Please see - * {@see HsmManagementClient::singleTenantHsmInstanceProposalName()} for help formatting this field. - * - * @return \Google\Cloud\Kms\V1\ExecuteSingleTenantHsmInstanceProposalRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The - * [name][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.name] of the - * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * to execute. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\HsmManagement::initOnce(); - parent::__construct($data); - } - - /** - * Required. The - * [name][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.name] of the - * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * to execute. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The - * [name][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.name] of the - * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * to execute. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ExecuteSingleTenantHsmInstanceProposalResponse.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ExecuteSingleTenantHsmInstanceProposalResponse.php deleted file mode 100644 index c4103bf4d99b..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ExecuteSingleTenantHsmInstanceProposalResponse.php +++ /dev/null @@ -1,34 +0,0 @@ -google.cloud.kms.v1.ExecuteSingleTenantHsmInstanceProposalResponse - */ -class ExecuteSingleTenantHsmInstanceProposalResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\HsmManagement::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ExternalProtectionLevelOptions.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ExternalProtectionLevelOptions.php deleted file mode 100644 index 9a8fb7d4fabb..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ExternalProtectionLevelOptions.php +++ /dev/null @@ -1,122 +0,0 @@ -google.cloud.kms.v1.ExternalProtectionLevelOptions - */ -class ExternalProtectionLevelOptions extends \Google\Protobuf\Internal\Message -{ - /** - * The URI for an external resource that this - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] represents. - * - * Generated from protobuf field string external_key_uri = 1; - */ - protected $external_key_uri = ''; - /** - * The path to the external key material on the EKM when using - * [EkmConnection][google.cloud.kms.v1.EkmConnection] e.g., "v0/my/key". Set - * this field instead of external_key_uri when using an - * [EkmConnection][google.cloud.kms.v1.EkmConnection]. - * - * Generated from protobuf field string ekm_connection_key_path = 2; - */ - protected $ekm_connection_key_path = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $external_key_uri - * The URI for an external resource that this - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] represents. - * @type string $ekm_connection_key_path - * The path to the external key material on the EKM when using - * [EkmConnection][google.cloud.kms.v1.EkmConnection] e.g., "v0/my/key". Set - * this field instead of external_key_uri when using an - * [EkmConnection][google.cloud.kms.v1.EkmConnection]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The URI for an external resource that this - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] represents. - * - * Generated from protobuf field string external_key_uri = 1; - * @return string - */ - public function getExternalKeyUri() - { - return $this->external_key_uri; - } - - /** - * The URI for an external resource that this - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] represents. - * - * Generated from protobuf field string external_key_uri = 1; - * @param string $var - * @return $this - */ - public function setExternalKeyUri($var) - { - GPBUtil::checkString($var, True); - $this->external_key_uri = $var; - - return $this; - } - - /** - * The path to the external key material on the EKM when using - * [EkmConnection][google.cloud.kms.v1.EkmConnection] e.g., "v0/my/key". Set - * this field instead of external_key_uri when using an - * [EkmConnection][google.cloud.kms.v1.EkmConnection]. - * - * Generated from protobuf field string ekm_connection_key_path = 2; - * @return string - */ - public function getEkmConnectionKeyPath() - { - return $this->ekm_connection_key_path; - } - - /** - * The path to the external key material on the EKM when using - * [EkmConnection][google.cloud.kms.v1.EkmConnection] e.g., "v0/my/key". Set - * this field instead of external_key_uri when using an - * [EkmConnection][google.cloud.kms.v1.EkmConnection]. - * - * Generated from protobuf field string ekm_connection_key_path = 2; - * @param string $var - * @return $this - */ - public function setEkmConnectionKeyPath($var) - { - GPBUtil::checkString($var, True); - $this->ekm_connection_key_path = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GenerateRandomBytesRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GenerateRandomBytesRequest.php deleted file mode 100644 index 695206324a5a..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GenerateRandomBytesRequest.php +++ /dev/null @@ -1,179 +0,0 @@ -google.cloud.kms.v1.GenerateRandomBytesRequest - */ -class GenerateRandomBytesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The project-specific location in which to generate random bytes. - * For example, "projects/my-project/locations/us-central1". - * - * Generated from protobuf field string location = 1; - */ - protected $location = ''; - /** - * The length in bytes of the amount of randomness to retrieve. Minimum 8 - * bytes, maximum 1024 bytes. - * - * Generated from protobuf field int32 length_bytes = 2; - */ - protected $length_bytes = 0; - /** - * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] to use when - * generating the random data. Currently, only - * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] protection level is - * supported. - * - * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 3; - */ - protected $protection_level = 0; - - /** - * @param string $location The project-specific location in which to generate random bytes. - * For example, "projects/my-project/locations/us-central1". - * @param int $lengthBytes The length in bytes of the amount of randomness to retrieve. Minimum 8 - * bytes, maximum 1024 bytes. - * @param int $protectionLevel The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] to use when - * generating the random data. Currently, only - * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] protection level is - * supported. - * For allowed values, use constants defined on {@see \Google\Cloud\Kms\V1\ProtectionLevel} - * - * @return \Google\Cloud\Kms\V1\GenerateRandomBytesRequest - * - * @experimental - */ - public static function build(string $location, int $lengthBytes, int $protectionLevel): self - { - return (new self()) - ->setLocation($location) - ->setLengthBytes($lengthBytes) - ->setProtectionLevel($protectionLevel); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $location - * The project-specific location in which to generate random bytes. - * For example, "projects/my-project/locations/us-central1". - * @type int $length_bytes - * The length in bytes of the amount of randomness to retrieve. Minimum 8 - * bytes, maximum 1024 bytes. - * @type int $protection_level - * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] to use when - * generating the random data. Currently, only - * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] protection level is - * supported. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * The project-specific location in which to generate random bytes. - * For example, "projects/my-project/locations/us-central1". - * - * Generated from protobuf field string location = 1; - * @return string - */ - public function getLocation() - { - return $this->location; - } - - /** - * The project-specific location in which to generate random bytes. - * For example, "projects/my-project/locations/us-central1". - * - * Generated from protobuf field string location = 1; - * @param string $var - * @return $this - */ - public function setLocation($var) - { - GPBUtil::checkString($var, True); - $this->location = $var; - - return $this; - } - - /** - * The length in bytes of the amount of randomness to retrieve. Minimum 8 - * bytes, maximum 1024 bytes. - * - * Generated from protobuf field int32 length_bytes = 2; - * @return int - */ - public function getLengthBytes() - { - return $this->length_bytes; - } - - /** - * The length in bytes of the amount of randomness to retrieve. Minimum 8 - * bytes, maximum 1024 bytes. - * - * Generated from protobuf field int32 length_bytes = 2; - * @param int $var - * @return $this - */ - public function setLengthBytes($var) - { - GPBUtil::checkInt32($var); - $this->length_bytes = $var; - - return $this; - } - - /** - * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] to use when - * generating the random data. Currently, only - * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] protection level is - * supported. - * - * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 3; - * @return int - */ - public function getProtectionLevel() - { - return $this->protection_level; - } - - /** - * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] to use when - * generating the random data. Currently, only - * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] protection level is - * supported. - * - * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 3; - * @param int $var - * @return $this - */ - public function setProtectionLevel($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\ProtectionLevel::class); - $this->protection_level = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GenerateRandomBytesResponse.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GenerateRandomBytesResponse.php deleted file mode 100644 index 4cf4401fde68..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GenerateRandomBytesResponse.php +++ /dev/null @@ -1,211 +0,0 @@ -google.cloud.kms.v1.GenerateRandomBytesResponse - */ -class GenerateRandomBytesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The generated data. - * - * Generated from protobuf field bytes data = 1; - */ - protected $data = ''; - /** - * Integrity verification field. A CRC32C checksum of the returned - * [GenerateRandomBytesResponse.data][google.cloud.kms.v1.GenerateRandomBytesResponse.data]. - * An integrity check of - * [GenerateRandomBytesResponse.data][google.cloud.kms.v1.GenerateRandomBytesResponse.data] - * can be performed by computing the CRC32C checksum of - * [GenerateRandomBytesResponse.data][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 3; - */ - protected $data_crc32c = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $data - * The generated data. - * @type \Google\Protobuf\Int64Value $data_crc32c - * Integrity verification field. A CRC32C checksum of the returned - * [GenerateRandomBytesResponse.data][google.cloud.kms.v1.GenerateRandomBytesResponse.data]. - * An integrity check of - * [GenerateRandomBytesResponse.data][google.cloud.kms.v1.GenerateRandomBytesResponse.data] - * can be performed by computing the CRC32C checksum of - * [GenerateRandomBytesResponse.data][google.cloud.kms.v1.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. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * The generated data. - * - * Generated from protobuf field bytes data = 1; - * @return string - */ - public function getData() - { - return $this->data; - } - - /** - * The generated data. - * - * Generated from protobuf field bytes data = 1; - * @param string $var - * @return $this - */ - public function setData($var) - { - GPBUtil::checkString($var, False); - $this->data = $var; - - return $this; - } - - /** - * Integrity verification field. A CRC32C checksum of the returned - * [GenerateRandomBytesResponse.data][google.cloud.kms.v1.GenerateRandomBytesResponse.data]. - * An integrity check of - * [GenerateRandomBytesResponse.data][google.cloud.kms.v1.GenerateRandomBytesResponse.data] - * can be performed by computing the CRC32C checksum of - * [GenerateRandomBytesResponse.data][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 3; - * @return \Google\Protobuf\Int64Value|null - */ - public function getDataCrc32C() - { - return $this->data_crc32c; - } - - public function hasDataCrc32C() - { - return isset($this->data_crc32c); - } - - public function clearDataCrc32C() - { - unset($this->data_crc32c); - } - - /** - * Returns the unboxed value from getDataCrc32C() - - * Integrity verification field. A CRC32C checksum of the returned - * [GenerateRandomBytesResponse.data][google.cloud.kms.v1.GenerateRandomBytesResponse.data]. - * An integrity check of - * [GenerateRandomBytesResponse.data][google.cloud.kms.v1.GenerateRandomBytesResponse.data] - * can be performed by computing the CRC32C checksum of - * [GenerateRandomBytesResponse.data][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 3; - * @return int|string|null - */ - public function getDataCrc32CUnwrapped() - { - return $this->readWrapperValue("data_crc32c"); - } - - /** - * Integrity verification field. A CRC32C checksum of the returned - * [GenerateRandomBytesResponse.data][google.cloud.kms.v1.GenerateRandomBytesResponse.data]. - * An integrity check of - * [GenerateRandomBytesResponse.data][google.cloud.kms.v1.GenerateRandomBytesResponse.data] - * can be performed by computing the CRC32C checksum of - * [GenerateRandomBytesResponse.data][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 3; - * @param \Google\Protobuf\Int64Value $var - * @return $this - */ - public function setDataCrc32C($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); - $this->data_crc32c = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. - - * Integrity verification field. A CRC32C checksum of the returned - * [GenerateRandomBytesResponse.data][google.cloud.kms.v1.GenerateRandomBytesResponse.data]. - * An integrity check of - * [GenerateRandomBytesResponse.data][google.cloud.kms.v1.GenerateRandomBytesResponse.data] - * can be performed by computing the CRC32C checksum of - * [GenerateRandomBytesResponse.data][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 3; - * @param int|string|null $var - * @return $this - */ - public function setDataCrc32CUnwrapped($var) - { - $this->writeWrapperValue("data_crc32c", $var); - return $this;} - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetAutokeyConfigRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetAutokeyConfigRequest.php deleted file mode 100644 index 7995e8fa2885..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetAutokeyConfigRequest.php +++ /dev/null @@ -1,92 +0,0 @@ -google.cloud.kms.v1.GetAutokeyConfigRequest - */ -class GetAutokeyConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig] - * resource, e.g. `folders/{FOLDER_NUMBER}/autokeyConfig` or - * `projects/{PROJECT_NUMBER}/autokeyConfig`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Name of the [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig] - * resource, e.g. `folders/{FOLDER_NUMBER}/autokeyConfig` or - * `projects/{PROJECT_NUMBER}/autokeyConfig`. Please see - * {@see AutokeyAdminClient::autokeyConfigName()} for help formatting this field. - * - * @return \Google\Cloud\Kms\V1\GetAutokeyConfigRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig] - * resource, e.g. `folders/{FOLDER_NUMBER}/autokeyConfig` or - * `projects/{PROJECT_NUMBER}/autokeyConfig`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\AutokeyAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig] - * resource, e.g. `folders/{FOLDER_NUMBER}/autokeyConfig` or - * `projects/{PROJECT_NUMBER}/autokeyConfig`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig] - * resource, e.g. `folders/{FOLDER_NUMBER}/autokeyConfig` or - * `projects/{PROJECT_NUMBER}/autokeyConfig`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetCryptoKeyRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetCryptoKeyRequest.php deleted file mode 100644 index a022fcb8a83f..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetCryptoKeyRequest.php +++ /dev/null @@ -1,87 +0,0 @@ -google.cloud.kms.v1.GetCryptoKeyRequest - */ -class GetCryptoKeyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The [name][google.cloud.kms.v1.CryptoKey.name] of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] to get. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The [name][google.cloud.kms.v1.CryptoKey.name] of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] to get. Please see - * {@see KeyManagementServiceClient::cryptoKeyName()} for help formatting this field. - * - * @return \Google\Cloud\Kms\V1\GetCryptoKeyRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The [name][google.cloud.kms.v1.CryptoKey.name] of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] to get. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The [name][google.cloud.kms.v1.CryptoKey.name] of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] to get. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The [name][google.cloud.kms.v1.CryptoKey.name] of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] to get. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetCryptoKeyVersionRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetCryptoKeyVersionRequest.php deleted file mode 100644 index 1a7b994be0d8..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetCryptoKeyVersionRequest.php +++ /dev/null @@ -1,87 +0,0 @@ -google.cloud.kms.v1.GetCryptoKeyVersionRequest - */ -class GetCryptoKeyVersionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to get. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to get. Please see - * {@see KeyManagementServiceClient::cryptoKeyVersionName()} for help formatting this field. - * - * @return \Google\Cloud\Kms\V1\GetCryptoKeyVersionRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to get. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to get. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to get. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetEkmConfigRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetEkmConfigRequest.php deleted file mode 100644 index d51d9230caee..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetEkmConfigRequest.php +++ /dev/null @@ -1,87 +0,0 @@ -google.cloud.kms.v1.GetEkmConfigRequest - */ -class GetEkmConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The [name][google.cloud.kms.v1.EkmConfig.name] of the - * [EkmConfig][google.cloud.kms.v1.EkmConfig] to get. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The [name][google.cloud.kms.v1.EkmConfig.name] of the - * [EkmConfig][google.cloud.kms.v1.EkmConfig] to get. Please see - * {@see EkmServiceClient::ekmConfigName()} for help formatting this field. - * - * @return \Google\Cloud\Kms\V1\GetEkmConfigRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The [name][google.cloud.kms.v1.EkmConfig.name] of the - * [EkmConfig][google.cloud.kms.v1.EkmConfig] to get. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\EkmService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The [name][google.cloud.kms.v1.EkmConfig.name] of the - * [EkmConfig][google.cloud.kms.v1.EkmConfig] to get. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The [name][google.cloud.kms.v1.EkmConfig.name] of the - * [EkmConfig][google.cloud.kms.v1.EkmConfig] to get. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetEkmConnectionRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetEkmConnectionRequest.php deleted file mode 100644 index 8a5e1c04323e..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetEkmConnectionRequest.php +++ /dev/null @@ -1,87 +0,0 @@ -google.cloud.kms.v1.GetEkmConnectionRequest - */ -class GetEkmConnectionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The [name][google.cloud.kms.v1.EkmConnection.name] of the - * [EkmConnection][google.cloud.kms.v1.EkmConnection] to get. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The [name][google.cloud.kms.v1.EkmConnection.name] of the - * [EkmConnection][google.cloud.kms.v1.EkmConnection] to get. Please see - * {@see EkmServiceClient::ekmConnectionName()} for help formatting this field. - * - * @return \Google\Cloud\Kms\V1\GetEkmConnectionRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The [name][google.cloud.kms.v1.EkmConnection.name] of the - * [EkmConnection][google.cloud.kms.v1.EkmConnection] to get. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\EkmService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The [name][google.cloud.kms.v1.EkmConnection.name] of the - * [EkmConnection][google.cloud.kms.v1.EkmConnection] to get. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The [name][google.cloud.kms.v1.EkmConnection.name] of the - * [EkmConnection][google.cloud.kms.v1.EkmConnection] to get. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetImportJobRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetImportJobRequest.php deleted file mode 100644 index a8f2614ffbbd..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetImportJobRequest.php +++ /dev/null @@ -1,87 +0,0 @@ -google.cloud.kms.v1.GetImportJobRequest - */ -class GetImportJobRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The [name][google.cloud.kms.v1.ImportJob.name] of the - * [ImportJob][google.cloud.kms.v1.ImportJob] to get. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The [name][google.cloud.kms.v1.ImportJob.name] of the - * [ImportJob][google.cloud.kms.v1.ImportJob] to get. Please see - * {@see KeyManagementServiceClient::importJobName()} for help formatting this field. - * - * @return \Google\Cloud\Kms\V1\GetImportJobRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The [name][google.cloud.kms.v1.ImportJob.name] of the - * [ImportJob][google.cloud.kms.v1.ImportJob] to get. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The [name][google.cloud.kms.v1.ImportJob.name] of the - * [ImportJob][google.cloud.kms.v1.ImportJob] to get. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The [name][google.cloud.kms.v1.ImportJob.name] of the - * [ImportJob][google.cloud.kms.v1.ImportJob] to get. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetKeyHandleRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetKeyHandleRequest.php deleted file mode 100644 index 5fb3261e6b56..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetKeyHandleRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.kms.v1.GetKeyHandleRequest - */ -class GetKeyHandleRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the [KeyHandle][google.cloud.kms.v1.KeyHandle] resource, - * e.g. - * `projects/{PROJECT_ID}/locations/{LOCATION}/keyHandles/{KEY_HANDLE_ID}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Name of the [KeyHandle][google.cloud.kms.v1.KeyHandle] resource, - * e.g. - * `projects/{PROJECT_ID}/locations/{LOCATION}/keyHandles/{KEY_HANDLE_ID}`. Please see - * {@see AutokeyClient::keyHandleName()} for help formatting this field. - * - * @return \Google\Cloud\Kms\V1\GetKeyHandleRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the [KeyHandle][google.cloud.kms.v1.KeyHandle] resource, - * e.g. - * `projects/{PROJECT_ID}/locations/{LOCATION}/keyHandles/{KEY_HANDLE_ID}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Autokey::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the [KeyHandle][google.cloud.kms.v1.KeyHandle] resource, - * e.g. - * `projects/{PROJECT_ID}/locations/{LOCATION}/keyHandles/{KEY_HANDLE_ID}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the [KeyHandle][google.cloud.kms.v1.KeyHandle] resource, - * e.g. - * `projects/{PROJECT_ID}/locations/{LOCATION}/keyHandles/{KEY_HANDLE_ID}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetKeyRingRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetKeyRingRequest.php deleted file mode 100644 index a34ae4a11196..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetKeyRingRequest.php +++ /dev/null @@ -1,87 +0,0 @@ -google.cloud.kms.v1.GetKeyRingRequest - */ -class GetKeyRingRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The [name][google.cloud.kms.v1.KeyRing.name] of the - * [KeyRing][google.cloud.kms.v1.KeyRing] to get. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The [name][google.cloud.kms.v1.KeyRing.name] of the - * [KeyRing][google.cloud.kms.v1.KeyRing] to get. Please see - * {@see KeyManagementServiceClient::keyRingName()} for help formatting this field. - * - * @return \Google\Cloud\Kms\V1\GetKeyRingRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The [name][google.cloud.kms.v1.KeyRing.name] of the - * [KeyRing][google.cloud.kms.v1.KeyRing] to get. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The [name][google.cloud.kms.v1.KeyRing.name] of the - * [KeyRing][google.cloud.kms.v1.KeyRing] to get. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The [name][google.cloud.kms.v1.KeyRing.name] of the - * [KeyRing][google.cloud.kms.v1.KeyRing] to get. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetPublicKeyRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetPublicKeyRequest.php deleted file mode 100644 index cd909aac193c..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetPublicKeyRequest.php +++ /dev/null @@ -1,145 +0,0 @@ -google.cloud.kms.v1.GetPublicKeyRequest - */ -class GetPublicKeyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key to get. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. The [PublicKey][google.cloud.kms.v1.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][google.cloud.kms.v1.PublicKey.public_key] field in the - * requested format. Otherwise, the [pem][google.cloud.kms.v1.PublicKey.pem] - * field will be populated for non-PQC algorithms, and an error will be - * returned for PQC algorithms. - * - * Generated from protobuf field .google.cloud.kms.v1.PublicKey.PublicKeyFormat public_key_format = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $public_key_format = 0; - - /** - * @param string $name Required. The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key to get. Please see - * {@see KeyManagementServiceClient::cryptoKeyVersionName()} for help formatting this field. - * - * @return \Google\Cloud\Kms\V1\GetPublicKeyRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key to get. - * @type int $public_key_format - * Optional. The [PublicKey][google.cloud.kms.v1.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][google.cloud.kms.v1.PublicKey.public_key] field in the - * requested format. Otherwise, the [pem][google.cloud.kms.v1.PublicKey.pem] - * field will be populated for non-PQC algorithms, and an error will be - * returned for PQC algorithms. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key to get. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key to get. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. The [PublicKey][google.cloud.kms.v1.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][google.cloud.kms.v1.PublicKey.public_key] field in the - * requested format. Otherwise, the [pem][google.cloud.kms.v1.PublicKey.pem] - * field will be populated for non-PQC algorithms, and an error will be - * returned for PQC algorithms. - * - * Generated from protobuf field .google.cloud.kms.v1.PublicKey.PublicKeyFormat public_key_format = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPublicKeyFormat() - { - return $this->public_key_format; - } - - /** - * Optional. The [PublicKey][google.cloud.kms.v1.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][google.cloud.kms.v1.PublicKey.public_key] field in the - * requested format. Otherwise, the [pem][google.cloud.kms.v1.PublicKey.pem] - * field will be populated for non-PQC algorithms, and an error will be - * returned for PQC algorithms. - * - * Generated from protobuf field .google.cloud.kms.v1.PublicKey.PublicKeyFormat public_key_format = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPublicKeyFormat($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\PublicKey\PublicKeyFormat::class); - $this->public_key_format = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetRetiredResourceRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetRetiredResourceRequest.php deleted file mode 100644 index adc5322024c7..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetRetiredResourceRequest.php +++ /dev/null @@ -1,87 +0,0 @@ -google.cloud.kms.v1.GetRetiredResourceRequest - */ -class GetRetiredResourceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The [name][google.cloud.kms.v1.RetiredResource.name] of the - * [RetiredResource][google.cloud.kms.v1.RetiredResource] to get. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The [name][google.cloud.kms.v1.RetiredResource.name] of the - * [RetiredResource][google.cloud.kms.v1.RetiredResource] to get. Please see - * {@see KeyManagementServiceClient::retiredResourceName()} for help formatting this field. - * - * @return \Google\Cloud\Kms\V1\GetRetiredResourceRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The [name][google.cloud.kms.v1.RetiredResource.name] of the - * [RetiredResource][google.cloud.kms.v1.RetiredResource] to get. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The [name][google.cloud.kms.v1.RetiredResource.name] of the - * [RetiredResource][google.cloud.kms.v1.RetiredResource] to get. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The [name][google.cloud.kms.v1.RetiredResource.name] of the - * [RetiredResource][google.cloud.kms.v1.RetiredResource] to get. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetSingleTenantHsmInstanceProposalRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetSingleTenantHsmInstanceProposalRequest.php deleted file mode 100644 index 86e2c051a049..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetSingleTenantHsmInstanceProposalRequest.php +++ /dev/null @@ -1,97 +0,0 @@ -google.cloud.kms.v1.GetSingleTenantHsmInstanceProposalRequest - */ -class GetSingleTenantHsmInstanceProposalRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The - * [name][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.name] of the - * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * to get. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The - * [name][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.name] of the - * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * to get. Please see - * {@see HsmManagementClient::singleTenantHsmInstanceProposalName()} for help formatting this field. - * - * @return \Google\Cloud\Kms\V1\GetSingleTenantHsmInstanceProposalRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The - * [name][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.name] of the - * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * to get. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\HsmManagement::initOnce(); - parent::__construct($data); - } - - /** - * Required. The - * [name][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.name] of the - * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * to get. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The - * [name][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.name] of the - * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * to get. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetSingleTenantHsmInstanceRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetSingleTenantHsmInstanceRequest.php deleted file mode 100644 index 1434e94020bf..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetSingleTenantHsmInstanceRequest.php +++ /dev/null @@ -1,92 +0,0 @@ -google.cloud.kms.v1.GetSingleTenantHsmInstanceRequest - */ -class GetSingleTenantHsmInstanceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The [name][google.cloud.kms.v1.SingleTenantHsmInstance.name] of - * the [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] - * to get. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The [name][google.cloud.kms.v1.SingleTenantHsmInstance.name] of - * the [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] - * to get. Please see - * {@see HsmManagementClient::singleTenantHsmInstanceName()} for help formatting this field. - * - * @return \Google\Cloud\Kms\V1\GetSingleTenantHsmInstanceRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The [name][google.cloud.kms.v1.SingleTenantHsmInstance.name] of - * the [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] - * to get. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\HsmManagement::initOnce(); - parent::__construct($data); - } - - /** - * Required. The [name][google.cloud.kms.v1.SingleTenantHsmInstance.name] of - * the [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] - * to get. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The [name][google.cloud.kms.v1.SingleTenantHsmInstance.name] of - * the [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] - * to get. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportCryptoKeyVersionRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportCryptoKeyVersionRequest.php deleted file mode 100644 index 2c9ee5ce882e..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportCryptoKeyVersionRequest.php +++ /dev/null @@ -1,499 +0,0 @@ -google.cloud.kms.v1.ImportCryptoKeyVersionRequest - */ -class ImportCryptoKeyVersionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The [name][google.cloud.kms.v1.CryptoKey.name] of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] to be imported into. - * The create permission is only required on this key when creating a new - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The optional [name][google.cloud.kms.v1.CryptoKeyVersion.name] of - * an existing [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to - * target for an import operation. If this field is not present, a new - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] containing the - * supplied key material is created. - * If this field is present, the supplied key material is imported into - * the existing [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. To - * import into an existing - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion], the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] must be a child of - * [ImportCryptoKeyVersionRequest.parent][google.cloud.kms.v1.ImportCryptoKeyVersionRequest.parent], - * have been previously created via - * [ImportCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.ImportCryptoKeyVersion], - * and be in - * [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED] - * or - * [IMPORT_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.IMPORT_FAILED] - * state. The key material and algorithm must match the previous - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] exactly if the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] has ever contained - * key material. - * - * Generated from protobuf field string crypto_key_version = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $crypto_key_version = ''; - /** - * Required. The - * [algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] - * of the key being imported. This does not need to match the - * [version_template][google.cloud.kms.v1.CryptoKey.version_template] of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] this version imports into. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $algorithm = 0; - /** - * Required. The [name][google.cloud.kms.v1.ImportJob.name] of the - * [ImportJob][google.cloud.kms.v1.ImportJob] that was used to wrap this key - * material. - * - * Generated from protobuf field string import_job = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $import_job = ''; - /** - * 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][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_3072_SHA1_AES_256] - * or - * [RSA_OAEP_4096_SHA1_AES_256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_4096_SHA1_AES_256] - * or - * [RSA_OAEP_3072_SHA256_AES_256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_3072_SHA256_AES_256] - * or - * [RSA_OAEP_4096_SHA256_AES_256][google.cloud.kms.v1.ImportJob.ImportMethod.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][google.cloud.kms.v1.ImportJob.public_key] using - * RSAES-OAEP with SHA-1/SHA-256, MGF1 with SHA-1/SHA-256, and an empty - * label. - *
  2. - *
  3. The formatted key to be imported, wrapped with the ephemeral AES-256 - * key using AES-KWP (RFC 5649). - *
  4. - *
- * 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][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_3072_SHA256] - * or - * [RSA_OAEP_4096_SHA256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_4096_SHA256]), - * this field must contain the formatted key to be imported, wrapped with the - * [public_key][google.cloud.kms.v1.ImportJob.public_key] using RSAES-OAEP - * with SHA-256, MGF1 with SHA-256, and an empty label. - * - * Generated from protobuf field bytes wrapped_key = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $wrapped_key = ''; - protected $wrapped_key_material; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The [name][google.cloud.kms.v1.CryptoKey.name] of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] to be imported into. - * The create permission is only required on this key when creating a new - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. - * @type string $crypto_key_version - * Optional. The optional [name][google.cloud.kms.v1.CryptoKeyVersion.name] of - * an existing [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to - * target for an import operation. If this field is not present, a new - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] containing the - * supplied key material is created. - * If this field is present, the supplied key material is imported into - * the existing [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. To - * import into an existing - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion], the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] must be a child of - * [ImportCryptoKeyVersionRequest.parent][google.cloud.kms.v1.ImportCryptoKeyVersionRequest.parent], - * have been previously created via - * [ImportCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.ImportCryptoKeyVersion], - * and be in - * [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED] - * or - * [IMPORT_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.IMPORT_FAILED] - * state. The key material and algorithm must match the previous - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] exactly if the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] has ever contained - * key material. - * @type int $algorithm - * Required. The - * [algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] - * of the key being imported. This does not need to match the - * [version_template][google.cloud.kms.v1.CryptoKey.version_template] of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] this version imports into. - * @type string $import_job - * Required. The [name][google.cloud.kms.v1.ImportJob.name] of the - * [ImportJob][google.cloud.kms.v1.ImportJob] that was used to wrap this key - * material. - * @type string $wrapped_key - * 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][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_3072_SHA1_AES_256] - * or - * [RSA_OAEP_4096_SHA1_AES_256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_4096_SHA1_AES_256] - * or - * [RSA_OAEP_3072_SHA256_AES_256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_3072_SHA256_AES_256] - * or - * [RSA_OAEP_4096_SHA256_AES_256][google.cloud.kms.v1.ImportJob.ImportMethod.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][google.cloud.kms.v1.ImportJob.public_key] using - * RSAES-OAEP with SHA-1/SHA-256, MGF1 with SHA-1/SHA-256, and an empty - * label. - *
  2. - *
  3. The formatted key to be imported, wrapped with the ephemeral AES-256 - * key using AES-KWP (RFC 5649). - *
  4. - *
- * 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][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_3072_SHA256] - * or - * [RSA_OAEP_4096_SHA256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_4096_SHA256]), - * this field must contain the formatted key to be imported, wrapped with the - * [public_key][google.cloud.kms.v1.ImportJob.public_key] using RSAES-OAEP - * with SHA-256, MGF1 with SHA-256, and an empty label. - * @type string $rsa_aes_wrapped_key - * Optional. This field has the same meaning as - * [wrapped_key][google.cloud.kms.v1.ImportCryptoKeyVersionRequest.wrapped_key]. - * Prefer to use that field in new work. Either that field or this field - * (but not both) must be specified. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The [name][google.cloud.kms.v1.CryptoKey.name] of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] to be imported into. - * The create permission is only required on this key when creating a new - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The [name][google.cloud.kms.v1.CryptoKey.name] of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] to be imported into. - * The create permission is only required on this key when creating a new - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. The optional [name][google.cloud.kms.v1.CryptoKeyVersion.name] of - * an existing [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to - * target for an import operation. If this field is not present, a new - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] containing the - * supplied key material is created. - * If this field is present, the supplied key material is imported into - * the existing [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. To - * import into an existing - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion], the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] must be a child of - * [ImportCryptoKeyVersionRequest.parent][google.cloud.kms.v1.ImportCryptoKeyVersionRequest.parent], - * have been previously created via - * [ImportCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.ImportCryptoKeyVersion], - * and be in - * [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED] - * or - * [IMPORT_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.IMPORT_FAILED] - * state. The key material and algorithm must match the previous - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] exactly if the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] has ever contained - * key material. - * - * Generated from protobuf field string crypto_key_version = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getCryptoKeyVersion() - { - return $this->crypto_key_version; - } - - /** - * Optional. The optional [name][google.cloud.kms.v1.CryptoKeyVersion.name] of - * an existing [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to - * target for an import operation. If this field is not present, a new - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] containing the - * supplied key material is created. - * If this field is present, the supplied key material is imported into - * the existing [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. To - * import into an existing - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion], the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] must be a child of - * [ImportCryptoKeyVersionRequest.parent][google.cloud.kms.v1.ImportCryptoKeyVersionRequest.parent], - * have been previously created via - * [ImportCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.ImportCryptoKeyVersion], - * and be in - * [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED] - * or - * [IMPORT_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.IMPORT_FAILED] - * state. The key material and algorithm must match the previous - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] exactly if the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] has ever contained - * key material. - * - * Generated from protobuf field string crypto_key_version = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setCryptoKeyVersion($var) - { - GPBUtil::checkString($var, True); - $this->crypto_key_version = $var; - - return $this; - } - - /** - * Required. The - * [algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] - * of the key being imported. This does not need to match the - * [version_template][google.cloud.kms.v1.CryptoKey.version_template] of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] this version imports into. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getAlgorithm() - { - return $this->algorithm; - } - - /** - * Required. The - * [algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] - * of the key being imported. This does not need to match the - * [version_template][google.cloud.kms.v1.CryptoKey.version_template] of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] this version imports into. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setAlgorithm($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\CryptoKeyVersion\CryptoKeyVersionAlgorithm::class); - $this->algorithm = $var; - - return $this; - } - - /** - * Required. The [name][google.cloud.kms.v1.ImportJob.name] of the - * [ImportJob][google.cloud.kms.v1.ImportJob] that was used to wrap this key - * material. - * - * Generated from protobuf field string import_job = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getImportJob() - { - return $this->import_job; - } - - /** - * Required. The [name][google.cloud.kms.v1.ImportJob.name] of the - * [ImportJob][google.cloud.kms.v1.ImportJob] that was used to wrap this key - * material. - * - * Generated from protobuf field string import_job = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setImportJob($var) - { - GPBUtil::checkString($var, True); - $this->import_job = $var; - - return $this; - } - - /** - * 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][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_3072_SHA1_AES_256] - * or - * [RSA_OAEP_4096_SHA1_AES_256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_4096_SHA1_AES_256] - * or - * [RSA_OAEP_3072_SHA256_AES_256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_3072_SHA256_AES_256] - * or - * [RSA_OAEP_4096_SHA256_AES_256][google.cloud.kms.v1.ImportJob.ImportMethod.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][google.cloud.kms.v1.ImportJob.public_key] using - * RSAES-OAEP with SHA-1/SHA-256, MGF1 with SHA-1/SHA-256, and an empty - * label. - *
  2. - *
  3. The formatted key to be imported, wrapped with the ephemeral AES-256 - * key using AES-KWP (RFC 5649). - *
  4. - *
- * 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][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_3072_SHA256] - * or - * [RSA_OAEP_4096_SHA256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_4096_SHA256]), - * this field must contain the formatted key to be imported, wrapped with the - * [public_key][google.cloud.kms.v1.ImportJob.public_key] using RSAES-OAEP - * with SHA-256, MGF1 with SHA-256, and an empty label. - * - * Generated from protobuf field bytes wrapped_key = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getWrappedKey() - { - return $this->wrapped_key; - } - - /** - * 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][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_3072_SHA1_AES_256] - * or - * [RSA_OAEP_4096_SHA1_AES_256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_4096_SHA1_AES_256] - * or - * [RSA_OAEP_3072_SHA256_AES_256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_3072_SHA256_AES_256] - * or - * [RSA_OAEP_4096_SHA256_AES_256][google.cloud.kms.v1.ImportJob.ImportMethod.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][google.cloud.kms.v1.ImportJob.public_key] using - * RSAES-OAEP with SHA-1/SHA-256, MGF1 with SHA-1/SHA-256, and an empty - * label. - *
  2. - *
  3. The formatted key to be imported, wrapped with the ephemeral AES-256 - * key using AES-KWP (RFC 5649). - *
  4. - *
- * 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][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_3072_SHA256] - * or - * [RSA_OAEP_4096_SHA256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_4096_SHA256]), - * this field must contain the formatted key to be imported, wrapped with the - * [public_key][google.cloud.kms.v1.ImportJob.public_key] using RSAES-OAEP - * with SHA-256, MGF1 with SHA-256, and an empty label. - * - * Generated from protobuf field bytes wrapped_key = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setWrappedKey($var) - { - GPBUtil::checkString($var, False); - $this->wrapped_key = $var; - - return $this; - } - - /** - * Optional. This field has the same meaning as - * [wrapped_key][google.cloud.kms.v1.ImportCryptoKeyVersionRequest.wrapped_key]. - * Prefer to use that field in new work. Either that field or this field - * (but not both) must be specified. - * - * Generated from protobuf field bytes rsa_aes_wrapped_key = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRsaAesWrappedKey() - { - return $this->readOneof(5); - } - - public function hasRsaAesWrappedKey() - { - return $this->hasOneof(5); - } - - /** - * Optional. This field has the same meaning as - * [wrapped_key][google.cloud.kms.v1.ImportCryptoKeyVersionRequest.wrapped_key]. - * Prefer to use that field in new work. Either that field or this field - * (but not both) must be specified. - * - * Generated from protobuf field bytes rsa_aes_wrapped_key = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRsaAesWrappedKey($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * @return string - */ - public function getWrappedKeyMaterial() - { - return $this->whichOneof("wrapped_key_material"); - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportJob.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportJob.php deleted file mode 100644 index 8d5dafa50967..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportJob.php +++ /dev/null @@ -1,607 +0,0 @@ -google.cloud.kms.v1.ImportJob - */ -class ImportJob extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The resource name for this - * [ImportJob][google.cloud.kms.v1.ImportJob] in the format - * `projects/*/locations/*/keyRings/*/importJobs/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Required. Immutable. The wrapping method to be used for incoming key - * material. - * - * Generated from protobuf field .google.cloud.kms.v1.ImportJob.ImportMethod import_method = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - */ - protected $import_method = 0; - /** - * Required. Immutable. The protection level of the - * [ImportJob][google.cloud.kms.v1.ImportJob]. This must match the - * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level] - * of the [version_template][google.cloud.kms.v1.CryptoKey.version_template] - * on the [CryptoKey][google.cloud.kms.v1.CryptoKey] you attempt to import - * into. - * - * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 9 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - */ - protected $protection_level = 0; - /** - * Output only. The time at which this - * [ImportJob][google.cloud.kms.v1.ImportJob] was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob]'s key - * material was generated. - * - * Generated from protobuf field .google.protobuf.Timestamp generate_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $generate_time = null; - /** - * Output only. The time at which this - * [ImportJob][google.cloud.kms.v1.ImportJob] is scheduled for expiration and - * can no longer be used to import key material. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $expire_time = null; - /** - * Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob] - * expired. Only present if [state][google.cloud.kms.v1.ImportJob.state] is - * [EXPIRED][google.cloud.kms.v1.ImportJob.ImportJobState.EXPIRED]. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_event_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $expire_event_time = null; - /** - * Output only. The current state of the - * [ImportJob][google.cloud.kms.v1.ImportJob], indicating if it can be used. - * - * Generated from protobuf field .google.cloud.kms.v1.ImportJob.ImportJobState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. The public key with which to wrap key material prior to - * import. Only returned if [state][google.cloud.kms.v1.ImportJob.state] is - * [ACTIVE][google.cloud.kms.v1.ImportJob.ImportJobState.ACTIVE]. - * - * Generated from protobuf field .google.cloud.kms.v1.ImportJob.WrappingPublicKey public_key = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $public_key = null; - /** - * 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][google.cloud.kms.v1.ImportJob.ImportMethod] is one with a - * protection level of [HSM][google.cloud.kms.v1.ProtectionLevel.HSM]. - * - * Generated from protobuf field .google.cloud.kms.v1.KeyOperationAttestation attestation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $attestation = null; - /** - * 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][google.cloud.kms.v1.ProtectionLevel] - * in the future. Supported resources: - * * `"projects/*/locations/*/singleTenantHsmInstances/*"` - * - * Generated from protobuf field string crypto_key_backend = 11 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { - */ - protected $crypto_key_backend = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The resource name for this - * [ImportJob][google.cloud.kms.v1.ImportJob] in the format - * `projects/*/locations/*/keyRings/*/importJobs/*`. - * @type int $import_method - * Required. Immutable. The wrapping method to be used for incoming key - * material. - * @type int $protection_level - * Required. Immutable. The protection level of the - * [ImportJob][google.cloud.kms.v1.ImportJob]. This must match the - * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level] - * of the [version_template][google.cloud.kms.v1.CryptoKey.version_template] - * on the [CryptoKey][google.cloud.kms.v1.CryptoKey] you attempt to import - * into. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time at which this - * [ImportJob][google.cloud.kms.v1.ImportJob] was created. - * @type \Google\Protobuf\Timestamp $generate_time - * Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob]'s key - * material was generated. - * @type \Google\Protobuf\Timestamp $expire_time - * Output only. The time at which this - * [ImportJob][google.cloud.kms.v1.ImportJob] is scheduled for expiration and - * can no longer be used to import key material. - * @type \Google\Protobuf\Timestamp $expire_event_time - * Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob] - * expired. Only present if [state][google.cloud.kms.v1.ImportJob.state] is - * [EXPIRED][google.cloud.kms.v1.ImportJob.ImportJobState.EXPIRED]. - * @type int $state - * Output only. The current state of the - * [ImportJob][google.cloud.kms.v1.ImportJob], indicating if it can be used. - * @type \Google\Cloud\Kms\V1\ImportJob\WrappingPublicKey $public_key - * Output only. The public key with which to wrap key material prior to - * import. Only returned if [state][google.cloud.kms.v1.ImportJob.state] is - * [ACTIVE][google.cloud.kms.v1.ImportJob.ImportJobState.ACTIVE]. - * @type \Google\Cloud\Kms\V1\KeyOperationAttestation $attestation - * 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][google.cloud.kms.v1.ImportJob.ImportMethod] is one with a - * protection level of [HSM][google.cloud.kms.v1.ProtectionLevel.HSM]. - * @type string $crypto_key_backend - * 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][google.cloud.kms.v1.ProtectionLevel] - * in the future. Supported resources: - * * `"projects/*/locations/*/singleTenantHsmInstances/*"` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The resource name for this - * [ImportJob][google.cloud.kms.v1.ImportJob] in the format - * `projects/*/locations/*/keyRings/*/importJobs/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The resource name for this - * [ImportJob][google.cloud.kms.v1.ImportJob] in the format - * `projects/*/locations/*/keyRings/*/importJobs/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. Immutable. The wrapping method to be used for incoming key - * material. - * - * Generated from protobuf field .google.cloud.kms.v1.ImportJob.ImportMethod import_method = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @return int - */ - public function getImportMethod() - { - return $this->import_method; - } - - /** - * Required. Immutable. The wrapping method to be used for incoming key - * material. - * - * Generated from protobuf field .google.cloud.kms.v1.ImportJob.ImportMethod import_method = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @param int $var - * @return $this - */ - public function setImportMethod($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\ImportJob\ImportMethod::class); - $this->import_method = $var; - - return $this; - } - - /** - * Required. Immutable. The protection level of the - * [ImportJob][google.cloud.kms.v1.ImportJob]. This must match the - * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level] - * of the [version_template][google.cloud.kms.v1.CryptoKey.version_template] - * on the [CryptoKey][google.cloud.kms.v1.CryptoKey] you attempt to import - * into. - * - * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 9 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @return int - */ - public function getProtectionLevel() - { - return $this->protection_level; - } - - /** - * Required. Immutable. The protection level of the - * [ImportJob][google.cloud.kms.v1.ImportJob]. This must match the - * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level] - * of the [version_template][google.cloud.kms.v1.CryptoKey.version_template] - * on the [CryptoKey][google.cloud.kms.v1.CryptoKey] you attempt to import - * into. - * - * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 9 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @param int $var - * @return $this - */ - public function setProtectionLevel($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\ProtectionLevel::class); - $this->protection_level = $var; - - return $this; - } - - /** - * Output only. The time at which this - * [ImportJob][google.cloud.kms.v1.ImportJob] was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time at which this - * [ImportJob][google.cloud.kms.v1.ImportJob] was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob]'s key - * material was generated. - * - * Generated from protobuf field .google.protobuf.Timestamp generate_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getGenerateTime() - { - return $this->generate_time; - } - - public function hasGenerateTime() - { - return isset($this->generate_time); - } - - public function clearGenerateTime() - { - unset($this->generate_time); - } - - /** - * Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob]'s key - * material was generated. - * - * Generated from protobuf field .google.protobuf.Timestamp generate_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setGenerateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->generate_time = $var; - - return $this; - } - - /** - * Output only. The time at which this - * [ImportJob][google.cloud.kms.v1.ImportJob] is scheduled for expiration and - * can no longer be used to import key material. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getExpireTime() - { - return $this->expire_time; - } - - public function hasExpireTime() - { - return isset($this->expire_time); - } - - public function clearExpireTime() - { - unset($this->expire_time); - } - - /** - * Output only. The time at which this - * [ImportJob][google.cloud.kms.v1.ImportJob] is scheduled for expiration and - * can no longer be used to import key material. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setExpireTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->expire_time = $var; - - return $this; - } - - /** - * Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob] - * expired. Only present if [state][google.cloud.kms.v1.ImportJob.state] is - * [EXPIRED][google.cloud.kms.v1.ImportJob.ImportJobState.EXPIRED]. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_event_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getExpireEventTime() - { - return $this->expire_event_time; - } - - public function hasExpireEventTime() - { - return isset($this->expire_event_time); - } - - public function clearExpireEventTime() - { - unset($this->expire_event_time); - } - - /** - * Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob] - * expired. Only present if [state][google.cloud.kms.v1.ImportJob.state] is - * [EXPIRED][google.cloud.kms.v1.ImportJob.ImportJobState.EXPIRED]. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_event_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setExpireEventTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->expire_event_time = $var; - - return $this; - } - - /** - * Output only. The current state of the - * [ImportJob][google.cloud.kms.v1.ImportJob], indicating if it can be used. - * - * Generated from protobuf field .google.cloud.kms.v1.ImportJob.ImportJobState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The current state of the - * [ImportJob][google.cloud.kms.v1.ImportJob], indicating if it can be used. - * - * Generated from protobuf field .google.cloud.kms.v1.ImportJob.ImportJobState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\ImportJob\ImportJobState::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. The public key with which to wrap key material prior to - * import. Only returned if [state][google.cloud.kms.v1.ImportJob.state] is - * [ACTIVE][google.cloud.kms.v1.ImportJob.ImportJobState.ACTIVE]. - * - * Generated from protobuf field .google.cloud.kms.v1.ImportJob.WrappingPublicKey public_key = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Kms\V1\ImportJob\WrappingPublicKey|null - */ - public function getPublicKey() - { - return $this->public_key; - } - - public function hasPublicKey() - { - return isset($this->public_key); - } - - public function clearPublicKey() - { - unset($this->public_key); - } - - /** - * Output only. The public key with which to wrap key material prior to - * import. Only returned if [state][google.cloud.kms.v1.ImportJob.state] is - * [ACTIVE][google.cloud.kms.v1.ImportJob.ImportJobState.ACTIVE]. - * - * Generated from protobuf field .google.cloud.kms.v1.ImportJob.WrappingPublicKey public_key = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Kms\V1\ImportJob\WrappingPublicKey $var - * @return $this - */ - public function setPublicKey($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\ImportJob\WrappingPublicKey::class); - $this->public_key = $var; - - return $this; - } - - /** - * 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][google.cloud.kms.v1.ImportJob.ImportMethod] is one with a - * protection level of [HSM][google.cloud.kms.v1.ProtectionLevel.HSM]. - * - * Generated from protobuf field .google.cloud.kms.v1.KeyOperationAttestation attestation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Kms\V1\KeyOperationAttestation|null - */ - public function getAttestation() - { - return $this->attestation; - } - - public function hasAttestation() - { - return isset($this->attestation); - } - - public function clearAttestation() - { - unset($this->attestation); - } - - /** - * 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][google.cloud.kms.v1.ImportJob.ImportMethod] is one with a - * protection level of [HSM][google.cloud.kms.v1.ProtectionLevel.HSM]. - * - * Generated from protobuf field .google.cloud.kms.v1.KeyOperationAttestation attestation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Kms\V1\KeyOperationAttestation $var - * @return $this - */ - public function setAttestation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\KeyOperationAttestation::class); - $this->attestation = $var; - - return $this; - } - - /** - * 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][google.cloud.kms.v1.ProtectionLevel] - * in the future. Supported resources: - * * `"projects/*/locations/*/singleTenantHsmInstances/*"` - * - * Generated from protobuf field string crypto_key_backend = 11 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { - * @return string - */ - public function getCryptoKeyBackend() - { - return $this->crypto_key_backend; - } - - /** - * 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][google.cloud.kms.v1.ProtectionLevel] - * in the future. Supported resources: - * * `"projects/*/locations/*/singleTenantHsmInstances/*"` - * - * Generated from protobuf field string crypto_key_backend = 11 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setCryptoKeyBackend($var) - { - GPBUtil::checkString($var, True); - $this->crypto_key_backend = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportJob/ImportJobState.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportJob/ImportJobState.php deleted file mode 100644 index b6e7a3e918ae..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportJob/ImportJobState.php +++ /dev/null @@ -1,79 +0,0 @@ -google.cloud.kms.v1.ImportJob.ImportJobState - */ -class ImportJobState -{ - /** - * Not specified. - * - * Generated from protobuf enum IMPORT_JOB_STATE_UNSPECIFIED = 0; - */ - const IMPORT_JOB_STATE_UNSPECIFIED = 0; - /** - * The wrapping key for this job is still being generated. It may not be - * used. Cloud KMS will automatically mark this job as - * [ACTIVE][google.cloud.kms.v1.ImportJob.ImportJobState.ACTIVE] as soon as - * the wrapping key is generated. - * - * Generated from protobuf enum PENDING_GENERATION = 1; - */ - const PENDING_GENERATION = 1; - /** - * This job may be used in - * [CreateCryptoKey][google.cloud.kms.v1.KeyManagementService.CreateCryptoKey] - * and - * [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion] - * requests. - * - * Generated from protobuf enum ACTIVE = 2; - */ - const ACTIVE = 2; - /** - * This job can no longer be used and may not leave this state once entered. - * - * Generated from protobuf enum EXPIRED = 3; - */ - const EXPIRED = 3; - - private static $valueToName = [ - self::IMPORT_JOB_STATE_UNSPECIFIED => 'IMPORT_JOB_STATE_UNSPECIFIED', - self::PENDING_GENERATION => 'PENDING_GENERATION', - self::ACTIVE => 'ACTIVE', - self::EXPIRED => 'EXPIRED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ImportJobState::class, \Google\Cloud\Kms\V1\ImportJob_ImportJobState::class); - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportJob/ImportMethod.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportJob/ImportMethod.php deleted file mode 100644 index f9a854116277..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportJob/ImportMethod.php +++ /dev/null @@ -1,120 +0,0 @@ -google.cloud.kms.v1.ImportJob.ImportMethod - */ -class ImportMethod -{ - /** - * Not specified. - * - * Generated from protobuf enum IMPORT_METHOD_UNSPECIFIED = 0; - */ - const IMPORT_METHOD_UNSPECIFIED = 0; - /** - * 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). - * - * Generated from protobuf enum RSA_OAEP_3072_SHA1_AES_256 = 1; - */ - const RSA_OAEP_3072_SHA1_AES_256 = 1; - /** - * 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). - * - * Generated from protobuf enum RSA_OAEP_4096_SHA1_AES_256 = 2; - */ - const RSA_OAEP_4096_SHA1_AES_256 = 2; - /** - * 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). - * - * Generated from protobuf enum RSA_OAEP_3072_SHA256_AES_256 = 3; - */ - const RSA_OAEP_3072_SHA256_AES_256 = 3; - /** - * 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). - * - * Generated from protobuf enum RSA_OAEP_4096_SHA256_AES_256 = 4; - */ - const RSA_OAEP_4096_SHA256_AES_256 = 4; - /** - * 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. - * - * Generated from protobuf enum RSA_OAEP_3072_SHA256 = 5; - */ - const RSA_OAEP_3072_SHA256 = 5; - /** - * 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. - * - * Generated from protobuf enum RSA_OAEP_4096_SHA256 = 6; - */ - const RSA_OAEP_4096_SHA256 = 6; - - private static $valueToName = [ - self::IMPORT_METHOD_UNSPECIFIED => 'IMPORT_METHOD_UNSPECIFIED', - self::RSA_OAEP_3072_SHA1_AES_256 => 'RSA_OAEP_3072_SHA1_AES_256', - self::RSA_OAEP_4096_SHA1_AES_256 => 'RSA_OAEP_4096_SHA1_AES_256', - self::RSA_OAEP_3072_SHA256_AES_256 => 'RSA_OAEP_3072_SHA256_AES_256', - self::RSA_OAEP_4096_SHA256_AES_256 => 'RSA_OAEP_4096_SHA256_AES_256', - self::RSA_OAEP_3072_SHA256 => 'RSA_OAEP_3072_SHA256', - self::RSA_OAEP_4096_SHA256 => 'RSA_OAEP_4096_SHA256', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ImportMethod::class, \Google\Cloud\Kms\V1\ImportJob_ImportMethod::class); - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportJob/WrappingPublicKey.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportJob/WrappingPublicKey.php deleted file mode 100644 index 63be4f5d952d..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportJob/WrappingPublicKey.php +++ /dev/null @@ -1,88 +0,0 @@ -google.cloud.kms.v1.ImportJob.WrappingPublicKey - */ -class WrappingPublicKey extends \Google\Protobuf\Internal\Message -{ - /** - * 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). - * - * Generated from protobuf field string pem = 1; - */ - protected $pem = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $pem - * 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). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * 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). - * - * Generated from protobuf field string pem = 1; - * @return string - */ - public function getPem() - { - return $this->pem; - } - - /** - * 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). - * - * Generated from protobuf field string pem = 1; - * @param string $var - * @return $this - */ - public function setPem($var) - { - GPBUtil::checkString($var, True); - $this->pem = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(WrappingPublicKey::class, \Google\Cloud\Kms\V1\ImportJob_WrappingPublicKey::class); - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyAccessJustificationsPolicy.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyAccessJustificationsPolicy.php deleted file mode 100644 index f8e478c969ad..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyAccessJustificationsPolicy.php +++ /dev/null @@ -1,87 +0,0 @@ -google.cloud.kms.v1.KeyAccessJustificationsPolicy - */ -class KeyAccessJustificationsPolicy extends \Google\Protobuf\Internal\Message -{ - /** - * The list of allowed reasons for access to a - * [CryptoKey][google.cloud.kms.v1.CryptoKey]. Zero allowed access reasons - * means all encrypt, decrypt, and sign operations for the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] associated with this policy will - * fail. - * - * Generated from protobuf field repeated .google.cloud.kms.v1.AccessReason allowed_access_reasons = 1; - */ - private $allowed_access_reasons; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $allowed_access_reasons - * The list of allowed reasons for access to a - * [CryptoKey][google.cloud.kms.v1.CryptoKey]. Zero allowed access reasons - * means all encrypt, decrypt, and sign operations for the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] associated with this policy will - * fail. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The list of allowed reasons for access to a - * [CryptoKey][google.cloud.kms.v1.CryptoKey]. Zero allowed access reasons - * means all encrypt, decrypt, and sign operations for the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] associated with this policy will - * fail. - * - * Generated from protobuf field repeated .google.cloud.kms.v1.AccessReason allowed_access_reasons = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAllowedAccessReasons() - { - return $this->allowed_access_reasons; - } - - /** - * The list of allowed reasons for access to a - * [CryptoKey][google.cloud.kms.v1.CryptoKey]. Zero allowed access reasons - * means all encrypt, decrypt, and sign operations for the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] associated with this policy will - * fail. - * - * Generated from protobuf field repeated .google.cloud.kms.v1.AccessReason allowed_access_reasons = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAllowedAccessReasons($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Kms\V1\AccessReason::class); - $this->allowed_access_reasons = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyHandle.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyHandle.php deleted file mode 100644 index aa4c81b8b765..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyHandle.php +++ /dev/null @@ -1,196 +0,0 @@ -google.cloud.kms.v1.KeyHandle - */ -class KeyHandle extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. Name of the [KeyHandle][google.cloud.kms.v1.KeyHandle] - * resource, e.g. - * `projects/{PROJECT_ID}/locations/{LOCATION}/keyHandles/{KEY_HANDLE_ID}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Output only. Name of a [CryptoKey][google.cloud.kms.v1.CryptoKey] that has - * been provisioned for Customer Managed Encryption Key (CMEK) use in the - * [KeyHandle][google.cloud.kms.v1.KeyHandle] project and location for the - * requested resource type. The [CryptoKey][google.cloud.kms.v1.CryptoKey] - * project will reflect the value configured in the - * [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig] on the resource - * project's ancestor folder at the time of the - * [KeyHandle][google.cloud.kms.v1.KeyHandle] creation. If more than one - * ancestor folder has a configured - * [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig], the nearest of these - * configurations is used. - * - * Generated from protobuf field string kms_key = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $kms_key = ''; - /** - * Required. Indicates the resource type that the resulting - * [CryptoKey][google.cloud.kms.v1.CryptoKey] is meant to protect, e.g. - * `{SERVICE}.googleapis.com/{TYPE}`. See documentation for supported resource - * types. - * - * Generated from protobuf field string resource_type_selector = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $resource_type_selector = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. Name of the [KeyHandle][google.cloud.kms.v1.KeyHandle] - * resource, e.g. - * `projects/{PROJECT_ID}/locations/{LOCATION}/keyHandles/{KEY_HANDLE_ID}`. - * @type string $kms_key - * Output only. Name of a [CryptoKey][google.cloud.kms.v1.CryptoKey] that has - * been provisioned for Customer Managed Encryption Key (CMEK) use in the - * [KeyHandle][google.cloud.kms.v1.KeyHandle] project and location for the - * requested resource type. The [CryptoKey][google.cloud.kms.v1.CryptoKey] - * project will reflect the value configured in the - * [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig] on the resource - * project's ancestor folder at the time of the - * [KeyHandle][google.cloud.kms.v1.KeyHandle] creation. If more than one - * ancestor folder has a configured - * [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig], the nearest of these - * configurations is used. - * @type string $resource_type_selector - * Required. Indicates the resource type that the resulting - * [CryptoKey][google.cloud.kms.v1.CryptoKey] is meant to protect, e.g. - * `{SERVICE}.googleapis.com/{TYPE}`. See documentation for supported resource - * types. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Autokey::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. Name of the [KeyHandle][google.cloud.kms.v1.KeyHandle] - * resource, e.g. - * `projects/{PROJECT_ID}/locations/{LOCATION}/keyHandles/{KEY_HANDLE_ID}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. Name of the [KeyHandle][google.cloud.kms.v1.KeyHandle] - * resource, e.g. - * `projects/{PROJECT_ID}/locations/{LOCATION}/keyHandles/{KEY_HANDLE_ID}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. Name of a [CryptoKey][google.cloud.kms.v1.CryptoKey] that has - * been provisioned for Customer Managed Encryption Key (CMEK) use in the - * [KeyHandle][google.cloud.kms.v1.KeyHandle] project and location for the - * requested resource type. The [CryptoKey][google.cloud.kms.v1.CryptoKey] - * project will reflect the value configured in the - * [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig] on the resource - * project's ancestor folder at the time of the - * [KeyHandle][google.cloud.kms.v1.KeyHandle] creation. If more than one - * ancestor folder has a configured - * [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig], the nearest of these - * configurations is used. - * - * Generated from protobuf field string kms_key = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getKmsKey() - { - return $this->kms_key; - } - - /** - * Output only. Name of a [CryptoKey][google.cloud.kms.v1.CryptoKey] that has - * been provisioned for Customer Managed Encryption Key (CMEK) use in the - * [KeyHandle][google.cloud.kms.v1.KeyHandle] project and location for the - * requested resource type. The [CryptoKey][google.cloud.kms.v1.CryptoKey] - * project will reflect the value configured in the - * [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig] on the resource - * project's ancestor folder at the time of the - * [KeyHandle][google.cloud.kms.v1.KeyHandle] creation. If more than one - * ancestor folder has a configured - * [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig], the nearest of these - * configurations is used. - * - * Generated from protobuf field string kms_key = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setKmsKey($var) - { - GPBUtil::checkString($var, True); - $this->kms_key = $var; - - return $this; - } - - /** - * Required. Indicates the resource type that the resulting - * [CryptoKey][google.cloud.kms.v1.CryptoKey] is meant to protect, e.g. - * `{SERVICE}.googleapis.com/{TYPE}`. See documentation for supported resource - * types. - * - * Generated from protobuf field string resource_type_selector = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getResourceTypeSelector() - { - return $this->resource_type_selector; - } - - /** - * Required. Indicates the resource type that the resulting - * [CryptoKey][google.cloud.kms.v1.CryptoKey] is meant to protect, e.g. - * `{SERVICE}.googleapis.com/{TYPE}`. See documentation for supported resource - * types. - * - * Generated from protobuf field string resource_type_selector = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setResourceTypeSelector($var) - { - GPBUtil::checkString($var, True); - $this->resource_type_selector = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyOperationAttestation.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyOperationAttestation.php deleted file mode 100644 index faed7bffa9e1..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyOperationAttestation.php +++ /dev/null @@ -1,151 +0,0 @@ -google.cloud.kms.v1.KeyOperationAttestation - */ -class KeyOperationAttestation extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The format of the attestation data. - * - * Generated from protobuf field .google.cloud.kms.v1.KeyOperationAttestation.AttestationFormat format = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $format = 0; - /** - * Output only. The attestation data provided by the HSM when the key - * operation was performed. - * - * Generated from protobuf field bytes content = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $content = ''; - /** - * Output only. The certificate chains needed to validate the attestation - * - * Generated from protobuf field .google.cloud.kms.v1.KeyOperationAttestation.CertificateChains cert_chains = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $cert_chains = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $format - * Output only. The format of the attestation data. - * @type string $content - * Output only. The attestation data provided by the HSM when the key - * operation was performed. - * @type \Google\Cloud\Kms\V1\KeyOperationAttestation\CertificateChains $cert_chains - * Output only. The certificate chains needed to validate the attestation - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The format of the attestation data. - * - * Generated from protobuf field .google.cloud.kms.v1.KeyOperationAttestation.AttestationFormat format = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getFormat() - { - return $this->format; - } - - /** - * Output only. The format of the attestation data. - * - * Generated from protobuf field .google.cloud.kms.v1.KeyOperationAttestation.AttestationFormat format = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setFormat($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\KeyOperationAttestation\AttestationFormat::class); - $this->format = $var; - - return $this; - } - - /** - * Output only. The attestation data provided by the HSM when the key - * operation was performed. - * - * Generated from protobuf field bytes content = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getContent() - { - return $this->content; - } - - /** - * Output only. The attestation data provided by the HSM when the key - * operation was performed. - * - * Generated from protobuf field bytes content = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setContent($var) - { - GPBUtil::checkString($var, False); - $this->content = $var; - - return $this; - } - - /** - * Output only. The certificate chains needed to validate the attestation - * - * Generated from protobuf field .google.cloud.kms.v1.KeyOperationAttestation.CertificateChains cert_chains = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Kms\V1\KeyOperationAttestation\CertificateChains|null - */ - public function getCertChains() - { - return $this->cert_chains; - } - - public function hasCertChains() - { - return isset($this->cert_chains); - } - - public function clearCertChains() - { - unset($this->cert_chains); - } - - /** - * Output only. The certificate chains needed to validate the attestation - * - * Generated from protobuf field .google.cloud.kms.v1.KeyOperationAttestation.CertificateChains cert_chains = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Kms\V1\KeyOperationAttestation\CertificateChains $var - * @return $this - */ - public function setCertChains($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\KeyOperationAttestation\CertificateChains::class); - $this->cert_chains = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyOperationAttestation/AttestationFormat.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyOperationAttestation/AttestationFormat.php deleted file mode 100644 index 43880fade2c1..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyOperationAttestation/AttestationFormat.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.kms.v1.KeyOperationAttestation.AttestationFormat - */ -class AttestationFormat -{ - /** - * Not specified. - * - * Generated from protobuf enum ATTESTATION_FORMAT_UNSPECIFIED = 0; - */ - const ATTESTATION_FORMAT_UNSPECIFIED = 0; - /** - * 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. - * - * Generated from protobuf enum CAVIUM_V1_COMPRESSED = 3; - */ - const CAVIUM_V1_COMPRESSED = 3; - /** - * Cavium HSM attestation V2 compressed with gzip. This is a new format - * introduced in Cavium's version 3.2-08. - * - * Generated from protobuf enum CAVIUM_V2_COMPRESSED = 4; - */ - const CAVIUM_V2_COMPRESSED = 4; - - private static $valueToName = [ - self::ATTESTATION_FORMAT_UNSPECIFIED => 'ATTESTATION_FORMAT_UNSPECIFIED', - self::CAVIUM_V1_COMPRESSED => 'CAVIUM_V1_COMPRESSED', - self::CAVIUM_V2_COMPRESSED => 'CAVIUM_V2_COMPRESSED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AttestationFormat::class, \Google\Cloud\Kms\V1\KeyOperationAttestation_AttestationFormat::class); - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyOperationAttestation/CertificateChains.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyOperationAttestation/CertificateChains.php deleted file mode 100644 index b1eef375ad42..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyOperationAttestation/CertificateChains.php +++ /dev/null @@ -1,140 +0,0 @@ -google.cloud.kms.v1.KeyOperationAttestation.CertificateChains - */ -class CertificateChains extends \Google\Protobuf\Internal\Message -{ - /** - * Cavium certificate chain corresponding to the attestation. - * - * Generated from protobuf field repeated string cavium_certs = 1; - */ - private $cavium_certs; - /** - * Google card certificate chain corresponding to the attestation. - * - * Generated from protobuf field repeated string google_card_certs = 2; - */ - private $google_card_certs; - /** - * Google partition certificate chain corresponding to the attestation. - * - * Generated from protobuf field repeated string google_partition_certs = 3; - */ - private $google_partition_certs; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $cavium_certs - * Cavium certificate chain corresponding to the attestation. - * @type array|\Google\Protobuf\Internal\RepeatedField $google_card_certs - * Google card certificate chain corresponding to the attestation. - * @type array|\Google\Protobuf\Internal\RepeatedField $google_partition_certs - * Google partition certificate chain corresponding to the attestation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Cavium certificate chain corresponding to the attestation. - * - * Generated from protobuf field repeated string cavium_certs = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCaviumCerts() - { - return $this->cavium_certs; - } - - /** - * Cavium certificate chain corresponding to the attestation. - * - * Generated from protobuf field repeated string cavium_certs = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCaviumCerts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->cavium_certs = $arr; - - return $this; - } - - /** - * Google card certificate chain corresponding to the attestation. - * - * Generated from protobuf field repeated string google_card_certs = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getGoogleCardCerts() - { - return $this->google_card_certs; - } - - /** - * Google card certificate chain corresponding to the attestation. - * - * Generated from protobuf field repeated string google_card_certs = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setGoogleCardCerts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->google_card_certs = $arr; - - return $this; - } - - /** - * Google partition certificate chain corresponding to the attestation. - * - * Generated from protobuf field repeated string google_partition_certs = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getGooglePartitionCerts() - { - return $this->google_partition_certs; - } - - /** - * Google partition certificate chain corresponding to the attestation. - * - * Generated from protobuf field repeated string google_partition_certs = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setGooglePartitionCerts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->google_partition_certs = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CertificateChains::class, \Google\Cloud\Kms\V1\KeyOperationAttestation_CertificateChains::class); - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyRing.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyRing.php deleted file mode 100644 index 797fe8942e0b..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyRing.php +++ /dev/null @@ -1,124 +0,0 @@ -google.cloud.kms.v1.KeyRing - */ -class KeyRing extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The resource name for the - * [KeyRing][google.cloud.kms.v1.KeyRing] in the format - * `projects/*/locations/*/keyRings/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. The time at which this [KeyRing][google.cloud.kms.v1.KeyRing] - * was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The resource name for the - * [KeyRing][google.cloud.kms.v1.KeyRing] in the format - * `projects/*/locations/*/keyRings/*`. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time at which this [KeyRing][google.cloud.kms.v1.KeyRing] - * was created. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The resource name for the - * [KeyRing][google.cloud.kms.v1.KeyRing] in the format - * `projects/*/locations/*/keyRings/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The resource name for the - * [KeyRing][google.cloud.kms.v1.KeyRing] in the format - * `projects/*/locations/*/keyRings/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. The time at which this [KeyRing][google.cloud.kms.v1.KeyRing] - * was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time at which this [KeyRing][google.cloud.kms.v1.KeyRing] - * was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListCryptoKeyVersionsRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListCryptoKeyVersionsRequest.php deleted file mode 100644 index b429f3ce2435..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListCryptoKeyVersionsRequest.php +++ /dev/null @@ -1,314 +0,0 @@ -google.cloud.kms.v1.ListCryptoKeyVersionsRequest - */ -class ListCryptoKeyVersionsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] to list, in the format - * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Optional limit on the number of - * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] to include in the - * response. Further [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] - * can subsequently be obtained by including the - * [ListCryptoKeyVersionsResponse.next_page_token][google.cloud.kms.v1.ListCryptoKeyVersionsResponse.next_page_token] - * in a subsequent request. If unspecified, the server will pick an - * appropriate default. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. Optional pagination token, returned earlier via - * [ListCryptoKeyVersionsResponse.next_page_token][google.cloud.kms.v1.ListCryptoKeyVersionsResponse.next_page_token]. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * The fields to include in the response. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionView view = 4; - */ - protected $view = 0; - /** - * 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). - * - * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * 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). - * - * Generated from protobuf field string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The resource name of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] to list, in the format - * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. Please see - * {@see KeyManagementServiceClient::cryptoKeyName()} for help formatting this field. - * - * @return \Google\Cloud\Kms\V1\ListCryptoKeyVersionsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] to list, in the format - * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. - * @type int $page_size - * Optional. Optional limit on the number of - * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] to include in the - * response. Further [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] - * can subsequently be obtained by including the - * [ListCryptoKeyVersionsResponse.next_page_token][google.cloud.kms.v1.ListCryptoKeyVersionsResponse.next_page_token] - * in a subsequent request. If unspecified, the server will pick an - * appropriate default. - * @type string $page_token - * Optional. Optional pagination token, returned earlier via - * [ListCryptoKeyVersionsResponse.next_page_token][google.cloud.kms.v1.ListCryptoKeyVersionsResponse.next_page_token]. - * @type int $view - * The fields to include in the response. - * @type 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). - * @type string $order_by - * 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). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] to list, in the format - * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource name of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] to list, in the format - * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. Optional limit on the number of - * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] to include in the - * response. Further [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] - * can subsequently be obtained by including the - * [ListCryptoKeyVersionsResponse.next_page_token][google.cloud.kms.v1.ListCryptoKeyVersionsResponse.next_page_token] - * in a subsequent request. If unspecified, the server will pick an - * appropriate default. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. Optional limit on the number of - * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] to include in the - * response. Further [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] - * can subsequently be obtained by including the - * [ListCryptoKeyVersionsResponse.next_page_token][google.cloud.kms.v1.ListCryptoKeyVersionsResponse.next_page_token] - * in a subsequent request. If unspecified, the server will pick an - * appropriate default. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. Optional pagination token, returned earlier via - * [ListCryptoKeyVersionsResponse.next_page_token][google.cloud.kms.v1.ListCryptoKeyVersionsResponse.next_page_token]. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. Optional pagination token, returned earlier via - * [ListCryptoKeyVersionsResponse.next_page_token][google.cloud.kms.v1.ListCryptoKeyVersionsResponse.next_page_token]. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * The fields to include in the response. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionView view = 4; - * @return int - */ - public function getView() - { - return $this->view; - } - - /** - * The fields to include in the response. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionView view = 4; - * @param int $var - * @return $this - */ - public function setView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\CryptoKeyVersion\CryptoKeyVersionView::class); - $this->view = $var; - - return $this; - } - - /** - * 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). - * - * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->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). - * - * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * 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). - * - * Generated from protobuf field string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * 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). - * - * Generated from protobuf field string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListCryptoKeyVersionsResponse.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListCryptoKeyVersionsResponse.php deleted file mode 100644 index 5c7781143e8a..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListCryptoKeyVersionsResponse.php +++ /dev/null @@ -1,164 +0,0 @@ -google.cloud.kms.v1.ListCryptoKeyVersionsResponse - */ -class ListCryptoKeyVersionsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. - * - * Generated from protobuf field repeated .google.cloud.kms.v1.CryptoKeyVersion crypto_key_versions = 1; - */ - private $crypto_key_versions; - /** - * A token to retrieve next page of results. Pass this value in - * [ListCryptoKeyVersionsRequest.page_token][google.cloud.kms.v1.ListCryptoKeyVersionsRequest.page_token] - * to retrieve the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * The total number of - * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] that matched the - * query. - * This field is not populated if - * [ListCryptoKeyVersionsRequest.filter][google.cloud.kms.v1.ListCryptoKeyVersionsRequest.filter] - * is applied. - * - * Generated from protobuf field int32 total_size = 3; - */ - protected $total_size = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Kms\V1\CryptoKeyVersion>|\Google\Protobuf\Internal\RepeatedField $crypto_key_versions - * The list of [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. - * @type string $next_page_token - * A token to retrieve next page of results. Pass this value in - * [ListCryptoKeyVersionsRequest.page_token][google.cloud.kms.v1.ListCryptoKeyVersionsRequest.page_token] - * to retrieve the next page of results. - * @type int $total_size - * The total number of - * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] that matched the - * query. - * This field is not populated if - * [ListCryptoKeyVersionsRequest.filter][google.cloud.kms.v1.ListCryptoKeyVersionsRequest.filter] - * is applied. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * The list of [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. - * - * Generated from protobuf field repeated .google.cloud.kms.v1.CryptoKeyVersion crypto_key_versions = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCryptoKeyVersions() - { - return $this->crypto_key_versions; - } - - /** - * The list of [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. - * - * Generated from protobuf field repeated .google.cloud.kms.v1.CryptoKeyVersion crypto_key_versions = 1; - * @param array<\Google\Cloud\Kms\V1\CryptoKeyVersion>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCryptoKeyVersions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Kms\V1\CryptoKeyVersion::class); - $this->crypto_key_versions = $arr; - - return $this; - } - - /** - * A token to retrieve next page of results. Pass this value in - * [ListCryptoKeyVersionsRequest.page_token][google.cloud.kms.v1.ListCryptoKeyVersionsRequest.page_token] - * to retrieve the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token to retrieve next page of results. Pass this value in - * [ListCryptoKeyVersionsRequest.page_token][google.cloud.kms.v1.ListCryptoKeyVersionsRequest.page_token] - * to retrieve the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * The total number of - * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] that matched the - * query. - * This field is not populated if - * [ListCryptoKeyVersionsRequest.filter][google.cloud.kms.v1.ListCryptoKeyVersionsRequest.filter] - * is applied. - * - * Generated from protobuf field int32 total_size = 3; - * @return int - */ - public function getTotalSize() - { - return $this->total_size; - } - - /** - * The total number of - * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] that matched the - * query. - * This field is not populated if - * [ListCryptoKeyVersionsRequest.filter][google.cloud.kms.v1.ListCryptoKeyVersionsRequest.filter] - * is applied. - * - * Generated from protobuf field int32 total_size = 3; - * @param int $var - * @return $this - */ - public function setTotalSize($var) - { - GPBUtil::checkInt32($var); - $this->total_size = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListCryptoKeysRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListCryptoKeysRequest.php deleted file mode 100644 index dc800232d1eb..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListCryptoKeysRequest.php +++ /dev/null @@ -1,309 +0,0 @@ -google.cloud.kms.v1.ListCryptoKeysRequest - */ -class ListCryptoKeysRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the [KeyRing][google.cloud.kms.v1.KeyRing] - * to list, in the format `projects/*/locations/*/keyRings/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Optional limit on the number of - * [CryptoKeys][google.cloud.kms.v1.CryptoKey] to include in the response. - * Further [CryptoKeys][google.cloud.kms.v1.CryptoKey] can subsequently be - * obtained by including the - * [ListCryptoKeysResponse.next_page_token][google.cloud.kms.v1.ListCryptoKeysResponse.next_page_token] - * in a subsequent request. If unspecified, the server will pick an - * appropriate default. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. Optional pagination token, returned earlier via - * [ListCryptoKeysResponse.next_page_token][google.cloud.kms.v1.ListCryptoKeysResponse.next_page_token]. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * The fields of the primary version to include in the response. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionView version_view = 4; - */ - protected $version_view = 0; - /** - * 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). - * - * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * 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). - * - * Generated from protobuf field string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The resource name of the [KeyRing][google.cloud.kms.v1.KeyRing] - * to list, in the format `projects/*/locations/*/keyRings/*`. Please see - * {@see KeyManagementServiceClient::keyRingName()} for help formatting this field. - * - * @return \Google\Cloud\Kms\V1\ListCryptoKeysRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the [KeyRing][google.cloud.kms.v1.KeyRing] - * to list, in the format `projects/*/locations/*/keyRings/*`. - * @type int $page_size - * Optional. Optional limit on the number of - * [CryptoKeys][google.cloud.kms.v1.CryptoKey] to include in the response. - * Further [CryptoKeys][google.cloud.kms.v1.CryptoKey] can subsequently be - * obtained by including the - * [ListCryptoKeysResponse.next_page_token][google.cloud.kms.v1.ListCryptoKeysResponse.next_page_token] - * in a subsequent request. If unspecified, the server will pick an - * appropriate default. - * @type string $page_token - * Optional. Optional pagination token, returned earlier via - * [ListCryptoKeysResponse.next_page_token][google.cloud.kms.v1.ListCryptoKeysResponse.next_page_token]. - * @type int $version_view - * The fields of the primary version to include in the response. - * @type 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). - * @type string $order_by - * 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). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the [KeyRing][google.cloud.kms.v1.KeyRing] - * to list, in the format `projects/*/locations/*/keyRings/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource name of the [KeyRing][google.cloud.kms.v1.KeyRing] - * to list, in the format `projects/*/locations/*/keyRings/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. Optional limit on the number of - * [CryptoKeys][google.cloud.kms.v1.CryptoKey] to include in the response. - * Further [CryptoKeys][google.cloud.kms.v1.CryptoKey] can subsequently be - * obtained by including the - * [ListCryptoKeysResponse.next_page_token][google.cloud.kms.v1.ListCryptoKeysResponse.next_page_token] - * in a subsequent request. If unspecified, the server will pick an - * appropriate default. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. Optional limit on the number of - * [CryptoKeys][google.cloud.kms.v1.CryptoKey] to include in the response. - * Further [CryptoKeys][google.cloud.kms.v1.CryptoKey] can subsequently be - * obtained by including the - * [ListCryptoKeysResponse.next_page_token][google.cloud.kms.v1.ListCryptoKeysResponse.next_page_token] - * in a subsequent request. If unspecified, the server will pick an - * appropriate default. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. Optional pagination token, returned earlier via - * [ListCryptoKeysResponse.next_page_token][google.cloud.kms.v1.ListCryptoKeysResponse.next_page_token]. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. Optional pagination token, returned earlier via - * [ListCryptoKeysResponse.next_page_token][google.cloud.kms.v1.ListCryptoKeysResponse.next_page_token]. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * The fields of the primary version to include in the response. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionView version_view = 4; - * @return int - */ - public function getVersionView() - { - return $this->version_view; - } - - /** - * The fields of the primary version to include in the response. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionView version_view = 4; - * @param int $var - * @return $this - */ - public function setVersionView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\CryptoKeyVersion\CryptoKeyVersionView::class); - $this->version_view = $var; - - return $this; - } - - /** - * 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). - * - * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->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). - * - * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * 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). - * - * Generated from protobuf field string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * 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). - * - * Generated from protobuf field string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListCryptoKeysResponse.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListCryptoKeysResponse.php deleted file mode 100644 index 6ea2d282ad42..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListCryptoKeysResponse.php +++ /dev/null @@ -1,160 +0,0 @@ -google.cloud.kms.v1.ListCryptoKeysResponse - */ -class ListCryptoKeysResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of [CryptoKeys][google.cloud.kms.v1.CryptoKey]. - * - * Generated from protobuf field repeated .google.cloud.kms.v1.CryptoKey crypto_keys = 1; - */ - private $crypto_keys; - /** - * A token to retrieve next page of results. Pass this value in - * [ListCryptoKeysRequest.page_token][google.cloud.kms.v1.ListCryptoKeysRequest.page_token] - * to retrieve the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * The total number of [CryptoKeys][google.cloud.kms.v1.CryptoKey] that - * matched the query. - * This field is not populated if - * [ListCryptoKeysRequest.filter][google.cloud.kms.v1.ListCryptoKeysRequest.filter] - * is applied. - * - * Generated from protobuf field int32 total_size = 3; - */ - protected $total_size = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Kms\V1\CryptoKey>|\Google\Protobuf\Internal\RepeatedField $crypto_keys - * The list of [CryptoKeys][google.cloud.kms.v1.CryptoKey]. - * @type string $next_page_token - * A token to retrieve next page of results. Pass this value in - * [ListCryptoKeysRequest.page_token][google.cloud.kms.v1.ListCryptoKeysRequest.page_token] - * to retrieve the next page of results. - * @type int $total_size - * The total number of [CryptoKeys][google.cloud.kms.v1.CryptoKey] that - * matched the query. - * This field is not populated if - * [ListCryptoKeysRequest.filter][google.cloud.kms.v1.ListCryptoKeysRequest.filter] - * is applied. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * The list of [CryptoKeys][google.cloud.kms.v1.CryptoKey]. - * - * Generated from protobuf field repeated .google.cloud.kms.v1.CryptoKey crypto_keys = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCryptoKeys() - { - return $this->crypto_keys; - } - - /** - * The list of [CryptoKeys][google.cloud.kms.v1.CryptoKey]. - * - * Generated from protobuf field repeated .google.cloud.kms.v1.CryptoKey crypto_keys = 1; - * @param array<\Google\Cloud\Kms\V1\CryptoKey>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCryptoKeys($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Kms\V1\CryptoKey::class); - $this->crypto_keys = $arr; - - return $this; - } - - /** - * A token to retrieve next page of results. Pass this value in - * [ListCryptoKeysRequest.page_token][google.cloud.kms.v1.ListCryptoKeysRequest.page_token] - * to retrieve the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token to retrieve next page of results. Pass this value in - * [ListCryptoKeysRequest.page_token][google.cloud.kms.v1.ListCryptoKeysRequest.page_token] - * to retrieve the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * The total number of [CryptoKeys][google.cloud.kms.v1.CryptoKey] that - * matched the query. - * This field is not populated if - * [ListCryptoKeysRequest.filter][google.cloud.kms.v1.ListCryptoKeysRequest.filter] - * is applied. - * - * Generated from protobuf field int32 total_size = 3; - * @return int - */ - public function getTotalSize() - { - return $this->total_size; - } - - /** - * The total number of [CryptoKeys][google.cloud.kms.v1.CryptoKey] that - * matched the query. - * This field is not populated if - * [ListCryptoKeysRequest.filter][google.cloud.kms.v1.ListCryptoKeysRequest.filter] - * is applied. - * - * Generated from protobuf field int32 total_size = 3; - * @param int $var - * @return $this - */ - public function setTotalSize($var) - { - GPBUtil::checkInt32($var); - $this->total_size = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListEkmConnectionsRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListEkmConnectionsRequest.php deleted file mode 100644 index 00bdce40d8da..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListEkmConnectionsRequest.php +++ /dev/null @@ -1,280 +0,0 @@ -google.cloud.kms.v1.ListEkmConnectionsRequest - */ -class ListEkmConnectionsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the location associated with the - * [EkmConnections][google.cloud.kms.v1.EkmConnection] to list, in the format - * `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Optional limit on the number of - * [EkmConnections][google.cloud.kms.v1.EkmConnection] to include in the - * response. Further [EkmConnections][google.cloud.kms.v1.EkmConnection] can - * subsequently be obtained by including the - * [ListEkmConnectionsResponse.next_page_token][google.cloud.kms.v1.ListEkmConnectionsResponse.next_page_token] - * in a subsequent request. If unspecified, the server will pick an - * appropriate default. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. Optional pagination token, returned earlier via - * [ListEkmConnectionsResponse.next_page_token][google.cloud.kms.v1.ListEkmConnectionsResponse.next_page_token]. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * 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). - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * 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). - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The resource name of the location associated with the - * [EkmConnections][google.cloud.kms.v1.EkmConnection] to list, in the format - * `projects/*/locations/*`. Please see - * {@see EkmServiceClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\Kms\V1\ListEkmConnectionsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the location associated with the - * [EkmConnections][google.cloud.kms.v1.EkmConnection] to list, in the format - * `projects/*/locations/*`. - * @type int $page_size - * Optional. Optional limit on the number of - * [EkmConnections][google.cloud.kms.v1.EkmConnection] to include in the - * response. Further [EkmConnections][google.cloud.kms.v1.EkmConnection] can - * subsequently be obtained by including the - * [ListEkmConnectionsResponse.next_page_token][google.cloud.kms.v1.ListEkmConnectionsResponse.next_page_token] - * in a subsequent request. If unspecified, the server will pick an - * appropriate default. - * @type string $page_token - * Optional. Optional pagination token, returned earlier via - * [ListEkmConnectionsResponse.next_page_token][google.cloud.kms.v1.ListEkmConnectionsResponse.next_page_token]. - * @type 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). - * @type string $order_by - * 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). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\EkmService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the location associated with the - * [EkmConnections][google.cloud.kms.v1.EkmConnection] to list, in the format - * `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource name of the location associated with the - * [EkmConnections][google.cloud.kms.v1.EkmConnection] to list, in the format - * `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. Optional limit on the number of - * [EkmConnections][google.cloud.kms.v1.EkmConnection] to include in the - * response. Further [EkmConnections][google.cloud.kms.v1.EkmConnection] can - * subsequently be obtained by including the - * [ListEkmConnectionsResponse.next_page_token][google.cloud.kms.v1.ListEkmConnectionsResponse.next_page_token] - * in a subsequent request. If unspecified, the server will pick an - * appropriate default. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. Optional limit on the number of - * [EkmConnections][google.cloud.kms.v1.EkmConnection] to include in the - * response. Further [EkmConnections][google.cloud.kms.v1.EkmConnection] can - * subsequently be obtained by including the - * [ListEkmConnectionsResponse.next_page_token][google.cloud.kms.v1.ListEkmConnectionsResponse.next_page_token] - * in a subsequent request. If unspecified, the server will pick an - * appropriate default. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. Optional pagination token, returned earlier via - * [ListEkmConnectionsResponse.next_page_token][google.cloud.kms.v1.ListEkmConnectionsResponse.next_page_token]. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. Optional pagination token, returned earlier via - * [ListEkmConnectionsResponse.next_page_token][google.cloud.kms.v1.ListEkmConnectionsResponse.next_page_token]. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * 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). - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->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). - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * 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). - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * 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). - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListEkmConnectionsResponse.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListEkmConnectionsResponse.php deleted file mode 100644 index 2273176dd077..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListEkmConnectionsResponse.php +++ /dev/null @@ -1,160 +0,0 @@ -google.cloud.kms.v1.ListEkmConnectionsResponse - */ -class ListEkmConnectionsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of [EkmConnections][google.cloud.kms.v1.EkmConnection]. - * - * Generated from protobuf field repeated .google.cloud.kms.v1.EkmConnection ekm_connections = 1; - */ - private $ekm_connections; - /** - * A token to retrieve next page of results. Pass this value in - * [ListEkmConnectionsRequest.page_token][google.cloud.kms.v1.ListEkmConnectionsRequest.page_token] - * to retrieve the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * The total number of [EkmConnections][google.cloud.kms.v1.EkmConnection] - * that matched the query. - * This field is not populated if - * [ListEkmConnectionsRequest.filter][google.cloud.kms.v1.ListEkmConnectionsRequest.filter] - * is applied. - * - * Generated from protobuf field int32 total_size = 3; - */ - protected $total_size = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Kms\V1\EkmConnection>|\Google\Protobuf\Internal\RepeatedField $ekm_connections - * The list of [EkmConnections][google.cloud.kms.v1.EkmConnection]. - * @type string $next_page_token - * A token to retrieve next page of results. Pass this value in - * [ListEkmConnectionsRequest.page_token][google.cloud.kms.v1.ListEkmConnectionsRequest.page_token] - * to retrieve the next page of results. - * @type int $total_size - * The total number of [EkmConnections][google.cloud.kms.v1.EkmConnection] - * that matched the query. - * This field is not populated if - * [ListEkmConnectionsRequest.filter][google.cloud.kms.v1.ListEkmConnectionsRequest.filter] - * is applied. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\EkmService::initOnce(); - parent::__construct($data); - } - - /** - * The list of [EkmConnections][google.cloud.kms.v1.EkmConnection]. - * - * Generated from protobuf field repeated .google.cloud.kms.v1.EkmConnection ekm_connections = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEkmConnections() - { - return $this->ekm_connections; - } - - /** - * The list of [EkmConnections][google.cloud.kms.v1.EkmConnection]. - * - * Generated from protobuf field repeated .google.cloud.kms.v1.EkmConnection ekm_connections = 1; - * @param array<\Google\Cloud\Kms\V1\EkmConnection>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEkmConnections($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Kms\V1\EkmConnection::class); - $this->ekm_connections = $arr; - - return $this; - } - - /** - * A token to retrieve next page of results. Pass this value in - * [ListEkmConnectionsRequest.page_token][google.cloud.kms.v1.ListEkmConnectionsRequest.page_token] - * to retrieve the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token to retrieve next page of results. Pass this value in - * [ListEkmConnectionsRequest.page_token][google.cloud.kms.v1.ListEkmConnectionsRequest.page_token] - * to retrieve the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * The total number of [EkmConnections][google.cloud.kms.v1.EkmConnection] - * that matched the query. - * This field is not populated if - * [ListEkmConnectionsRequest.filter][google.cloud.kms.v1.ListEkmConnectionsRequest.filter] - * is applied. - * - * Generated from protobuf field int32 total_size = 3; - * @return int - */ - public function getTotalSize() - { - return $this->total_size; - } - - /** - * The total number of [EkmConnections][google.cloud.kms.v1.EkmConnection] - * that matched the query. - * This field is not populated if - * [ListEkmConnectionsRequest.filter][google.cloud.kms.v1.ListEkmConnectionsRequest.filter] - * is applied. - * - * Generated from protobuf field int32 total_size = 3; - * @param int $var - * @return $this - */ - public function setTotalSize($var) - { - GPBUtil::checkInt32($var); - $this->total_size = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListImportJobsRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListImportJobsRequest.php deleted file mode 100644 index 463eb5440cc1..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListImportJobsRequest.php +++ /dev/null @@ -1,275 +0,0 @@ -google.cloud.kms.v1.ListImportJobsRequest - */ -class ListImportJobsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the [KeyRing][google.cloud.kms.v1.KeyRing] - * to list, in the format `projects/*/locations/*/keyRings/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Optional limit on the number of - * [ImportJobs][google.cloud.kms.v1.ImportJob] to include in the response. - * Further [ImportJobs][google.cloud.kms.v1.ImportJob] can subsequently be - * obtained by including the - * [ListImportJobsResponse.next_page_token][google.cloud.kms.v1.ListImportJobsResponse.next_page_token] - * in a subsequent request. If unspecified, the server will pick an - * appropriate default. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. Optional pagination token, returned earlier via - * [ListImportJobsResponse.next_page_token][google.cloud.kms.v1.ListImportJobsResponse.next_page_token]. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * 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). - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * 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). - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The resource name of the [KeyRing][google.cloud.kms.v1.KeyRing] - * to list, in the format `projects/*/locations/*/keyRings/*`. Please see - * {@see KeyManagementServiceClient::keyRingName()} for help formatting this field. - * - * @return \Google\Cloud\Kms\V1\ListImportJobsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the [KeyRing][google.cloud.kms.v1.KeyRing] - * to list, in the format `projects/*/locations/*/keyRings/*`. - * @type int $page_size - * Optional. Optional limit on the number of - * [ImportJobs][google.cloud.kms.v1.ImportJob] to include in the response. - * Further [ImportJobs][google.cloud.kms.v1.ImportJob] can subsequently be - * obtained by including the - * [ListImportJobsResponse.next_page_token][google.cloud.kms.v1.ListImportJobsResponse.next_page_token] - * in a subsequent request. If unspecified, the server will pick an - * appropriate default. - * @type string $page_token - * Optional. Optional pagination token, returned earlier via - * [ListImportJobsResponse.next_page_token][google.cloud.kms.v1.ListImportJobsResponse.next_page_token]. - * @type 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). - * @type string $order_by - * 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). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the [KeyRing][google.cloud.kms.v1.KeyRing] - * to list, in the format `projects/*/locations/*/keyRings/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource name of the [KeyRing][google.cloud.kms.v1.KeyRing] - * to list, in the format `projects/*/locations/*/keyRings/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. Optional limit on the number of - * [ImportJobs][google.cloud.kms.v1.ImportJob] to include in the response. - * Further [ImportJobs][google.cloud.kms.v1.ImportJob] can subsequently be - * obtained by including the - * [ListImportJobsResponse.next_page_token][google.cloud.kms.v1.ListImportJobsResponse.next_page_token] - * in a subsequent request. If unspecified, the server will pick an - * appropriate default. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. Optional limit on the number of - * [ImportJobs][google.cloud.kms.v1.ImportJob] to include in the response. - * Further [ImportJobs][google.cloud.kms.v1.ImportJob] can subsequently be - * obtained by including the - * [ListImportJobsResponse.next_page_token][google.cloud.kms.v1.ListImportJobsResponse.next_page_token] - * in a subsequent request. If unspecified, the server will pick an - * appropriate default. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. Optional pagination token, returned earlier via - * [ListImportJobsResponse.next_page_token][google.cloud.kms.v1.ListImportJobsResponse.next_page_token]. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. Optional pagination token, returned earlier via - * [ListImportJobsResponse.next_page_token][google.cloud.kms.v1.ListImportJobsResponse.next_page_token]. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * 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). - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->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). - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * 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). - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * 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). - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListImportJobsResponse.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListImportJobsResponse.php deleted file mode 100644 index aa2597e9f7ed..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListImportJobsResponse.php +++ /dev/null @@ -1,160 +0,0 @@ -google.cloud.kms.v1.ListImportJobsResponse - */ -class ListImportJobsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of [ImportJobs][google.cloud.kms.v1.ImportJob]. - * - * Generated from protobuf field repeated .google.cloud.kms.v1.ImportJob import_jobs = 1; - */ - private $import_jobs; - /** - * A token to retrieve next page of results. Pass this value in - * [ListImportJobsRequest.page_token][google.cloud.kms.v1.ListImportJobsRequest.page_token] - * to retrieve the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * The total number of [ImportJobs][google.cloud.kms.v1.ImportJob] that - * matched the query. - * This field is not populated if - * [ListImportJobsRequest.filter][google.cloud.kms.v1.ListImportJobsRequest.filter] - * is applied. - * - * Generated from protobuf field int32 total_size = 3; - */ - protected $total_size = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Kms\V1\ImportJob>|\Google\Protobuf\Internal\RepeatedField $import_jobs - * The list of [ImportJobs][google.cloud.kms.v1.ImportJob]. - * @type string $next_page_token - * A token to retrieve next page of results. Pass this value in - * [ListImportJobsRequest.page_token][google.cloud.kms.v1.ListImportJobsRequest.page_token] - * to retrieve the next page of results. - * @type int $total_size - * The total number of [ImportJobs][google.cloud.kms.v1.ImportJob] that - * matched the query. - * This field is not populated if - * [ListImportJobsRequest.filter][google.cloud.kms.v1.ListImportJobsRequest.filter] - * is applied. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * The list of [ImportJobs][google.cloud.kms.v1.ImportJob]. - * - * Generated from protobuf field repeated .google.cloud.kms.v1.ImportJob import_jobs = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getImportJobs() - { - return $this->import_jobs; - } - - /** - * The list of [ImportJobs][google.cloud.kms.v1.ImportJob]. - * - * Generated from protobuf field repeated .google.cloud.kms.v1.ImportJob import_jobs = 1; - * @param array<\Google\Cloud\Kms\V1\ImportJob>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setImportJobs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Kms\V1\ImportJob::class); - $this->import_jobs = $arr; - - return $this; - } - - /** - * A token to retrieve next page of results. Pass this value in - * [ListImportJobsRequest.page_token][google.cloud.kms.v1.ListImportJobsRequest.page_token] - * to retrieve the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token to retrieve next page of results. Pass this value in - * [ListImportJobsRequest.page_token][google.cloud.kms.v1.ListImportJobsRequest.page_token] - * to retrieve the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * The total number of [ImportJobs][google.cloud.kms.v1.ImportJob] that - * matched the query. - * This field is not populated if - * [ListImportJobsRequest.filter][google.cloud.kms.v1.ListImportJobsRequest.filter] - * is applied. - * - * Generated from protobuf field int32 total_size = 3; - * @return int - */ - public function getTotalSize() - { - return $this->total_size; - } - - /** - * The total number of [ImportJobs][google.cloud.kms.v1.ImportJob] that - * matched the query. - * This field is not populated if - * [ListImportJobsRequest.filter][google.cloud.kms.v1.ListImportJobsRequest.filter] - * is applied. - * - * Generated from protobuf field int32 total_size = 3; - * @param int $var - * @return $this - */ - public function setTotalSize($var) - { - GPBUtil::checkInt32($var); - $this->total_size = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListKeyHandlesRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListKeyHandlesRequest.php deleted file mode 100644 index c294c8dedd23..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListKeyHandlesRequest.php +++ /dev/null @@ -1,234 +0,0 @@ -google.cloud.kms.v1.ListKeyHandlesRequest - */ -class ListKeyHandlesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the resource project and location from which to list - * [KeyHandles][google.cloud.kms.v1.KeyHandle], e.g. - * `projects/{PROJECT_ID}/locations/{LOCATION}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Optional limit on the number of - * [KeyHandles][google.cloud.kms.v1.KeyHandle] to include in the response. The - * service may return fewer than this value. Further - * [KeyHandles][google.cloud.kms.v1.KeyHandle] can subsequently be obtained by - * including the - * [ListKeyHandlesResponse.next_page_token][google.cloud.kms.v1.ListKeyHandlesResponse.next_page_token] - * in a subsequent request. If unspecified, at most 100 - * [KeyHandles][google.cloud.kms.v1.KeyHandle] will be returned. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. Optional pagination token, returned earlier via - * [ListKeyHandlesResponse.next_page_token][google.cloud.kms.v1.ListKeyHandlesResponse.next_page_token]. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. Filter to apply when listing - * [KeyHandles][google.cloud.kms.v1.KeyHandle], e.g. - * `resource_type_selector="{SERVICE}.googleapis.com/{TYPE}"`. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - - /** - * @param string $parent Required. Name of the resource project and location from which to list - * [KeyHandles][google.cloud.kms.v1.KeyHandle], e.g. - * `projects/{PROJECT_ID}/locations/{LOCATION}`. Please see - * {@see AutokeyClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\Kms\V1\ListKeyHandlesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Name of the resource project and location from which to list - * [KeyHandles][google.cloud.kms.v1.KeyHandle], e.g. - * `projects/{PROJECT_ID}/locations/{LOCATION}`. - * @type int $page_size - * Optional. Optional limit on the number of - * [KeyHandles][google.cloud.kms.v1.KeyHandle] to include in the response. The - * service may return fewer than this value. Further - * [KeyHandles][google.cloud.kms.v1.KeyHandle] can subsequently be obtained by - * including the - * [ListKeyHandlesResponse.next_page_token][google.cloud.kms.v1.ListKeyHandlesResponse.next_page_token] - * in a subsequent request. If unspecified, at most 100 - * [KeyHandles][google.cloud.kms.v1.KeyHandle] will be returned. - * @type string $page_token - * Optional. Optional pagination token, returned earlier via - * [ListKeyHandlesResponse.next_page_token][google.cloud.kms.v1.ListKeyHandlesResponse.next_page_token]. - * @type string $filter - * Optional. Filter to apply when listing - * [KeyHandles][google.cloud.kms.v1.KeyHandle], e.g. - * `resource_type_selector="{SERVICE}.googleapis.com/{TYPE}"`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Autokey::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the resource project and location from which to list - * [KeyHandles][google.cloud.kms.v1.KeyHandle], e.g. - * `projects/{PROJECT_ID}/locations/{LOCATION}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Name of the resource project and location from which to list - * [KeyHandles][google.cloud.kms.v1.KeyHandle], e.g. - * `projects/{PROJECT_ID}/locations/{LOCATION}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. Optional limit on the number of - * [KeyHandles][google.cloud.kms.v1.KeyHandle] to include in the response. The - * service may return fewer than this value. Further - * [KeyHandles][google.cloud.kms.v1.KeyHandle] can subsequently be obtained by - * including the - * [ListKeyHandlesResponse.next_page_token][google.cloud.kms.v1.ListKeyHandlesResponse.next_page_token] - * in a subsequent request. If unspecified, at most 100 - * [KeyHandles][google.cloud.kms.v1.KeyHandle] will be returned. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. Optional limit on the number of - * [KeyHandles][google.cloud.kms.v1.KeyHandle] to include in the response. The - * service may return fewer than this value. Further - * [KeyHandles][google.cloud.kms.v1.KeyHandle] can subsequently be obtained by - * including the - * [ListKeyHandlesResponse.next_page_token][google.cloud.kms.v1.ListKeyHandlesResponse.next_page_token] - * in a subsequent request. If unspecified, at most 100 - * [KeyHandles][google.cloud.kms.v1.KeyHandle] will be returned. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. Optional pagination token, returned earlier via - * [ListKeyHandlesResponse.next_page_token][google.cloud.kms.v1.ListKeyHandlesResponse.next_page_token]. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. Optional pagination token, returned earlier via - * [ListKeyHandlesResponse.next_page_token][google.cloud.kms.v1.ListKeyHandlesResponse.next_page_token]. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. Filter to apply when listing - * [KeyHandles][google.cloud.kms.v1.KeyHandle], e.g. - * `resource_type_selector="{SERVICE}.googleapis.com/{TYPE}"`. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. Filter to apply when listing - * [KeyHandles][google.cloud.kms.v1.KeyHandle], e.g. - * `resource_type_selector="{SERVICE}.googleapis.com/{TYPE}"`. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListKeyHandlesResponse.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListKeyHandlesResponse.php deleted file mode 100644 index eed5fc43ccb1..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListKeyHandlesResponse.php +++ /dev/null @@ -1,110 +0,0 @@ -google.cloud.kms.v1.ListKeyHandlesResponse - */ -class ListKeyHandlesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Resulting [KeyHandles][google.cloud.kms.v1.KeyHandle]. - * - * Generated from protobuf field repeated .google.cloud.kms.v1.KeyHandle key_handles = 1; - */ - private $key_handles; - /** - * A token to retrieve next page of results. Pass this value in - * [ListKeyHandlesRequest.page_token][google.cloud.kms.v1.ListKeyHandlesRequest.page_token] - * to retrieve the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Kms\V1\KeyHandle>|\Google\Protobuf\Internal\RepeatedField $key_handles - * Resulting [KeyHandles][google.cloud.kms.v1.KeyHandle]. - * @type string $next_page_token - * A token to retrieve next page of results. Pass this value in - * [ListKeyHandlesRequest.page_token][google.cloud.kms.v1.ListKeyHandlesRequest.page_token] - * to retrieve the next page of results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Autokey::initOnce(); - parent::__construct($data); - } - - /** - * Resulting [KeyHandles][google.cloud.kms.v1.KeyHandle]. - * - * Generated from protobuf field repeated .google.cloud.kms.v1.KeyHandle key_handles = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getKeyHandles() - { - return $this->key_handles; - } - - /** - * Resulting [KeyHandles][google.cloud.kms.v1.KeyHandle]. - * - * Generated from protobuf field repeated .google.cloud.kms.v1.KeyHandle key_handles = 1; - * @param array<\Google\Cloud\Kms\V1\KeyHandle>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setKeyHandles($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Kms\V1\KeyHandle::class); - $this->key_handles = $arr; - - return $this; - } - - /** - * A token to retrieve next page of results. Pass this value in - * [ListKeyHandlesRequest.page_token][google.cloud.kms.v1.ListKeyHandlesRequest.page_token] - * to retrieve the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token to retrieve next page of results. Pass this value in - * [ListKeyHandlesRequest.page_token][google.cloud.kms.v1.ListKeyHandlesRequest.page_token] - * to retrieve the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListKeyRingsRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListKeyRingsRequest.php deleted file mode 100644 index 5f2032f8741e..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListKeyRingsRequest.php +++ /dev/null @@ -1,280 +0,0 @@ -google.cloud.kms.v1.ListKeyRingsRequest - */ -class ListKeyRingsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the location associated with the - * [KeyRings][google.cloud.kms.v1.KeyRing], in the format - * `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Optional limit on the number of - * [KeyRings][google.cloud.kms.v1.KeyRing] to include in the response. Further - * [KeyRings][google.cloud.kms.v1.KeyRing] can subsequently be obtained by - * including the - * [ListKeyRingsResponse.next_page_token][google.cloud.kms.v1.ListKeyRingsResponse.next_page_token] - * in a subsequent request. If unspecified, the server will pick an - * appropriate default. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. Optional pagination token, returned earlier via - * [ListKeyRingsResponse.next_page_token][google.cloud.kms.v1.ListKeyRingsResponse.next_page_token]. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * 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). - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * 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). - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The resource name of the location associated with the - * [KeyRings][google.cloud.kms.v1.KeyRing], in the format - * `projects/*/locations/*`. Please see - * {@see KeyManagementServiceClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\Kms\V1\ListKeyRingsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the location associated with the - * [KeyRings][google.cloud.kms.v1.KeyRing], in the format - * `projects/*/locations/*`. - * @type int $page_size - * Optional. Optional limit on the number of - * [KeyRings][google.cloud.kms.v1.KeyRing] to include in the response. Further - * [KeyRings][google.cloud.kms.v1.KeyRing] can subsequently be obtained by - * including the - * [ListKeyRingsResponse.next_page_token][google.cloud.kms.v1.ListKeyRingsResponse.next_page_token] - * in a subsequent request. If unspecified, the server will pick an - * appropriate default. - * @type string $page_token - * Optional. Optional pagination token, returned earlier via - * [ListKeyRingsResponse.next_page_token][google.cloud.kms.v1.ListKeyRingsResponse.next_page_token]. - * @type 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). - * @type string $order_by - * 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). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the location associated with the - * [KeyRings][google.cloud.kms.v1.KeyRing], in the format - * `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource name of the location associated with the - * [KeyRings][google.cloud.kms.v1.KeyRing], in the format - * `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. Optional limit on the number of - * [KeyRings][google.cloud.kms.v1.KeyRing] to include in the response. Further - * [KeyRings][google.cloud.kms.v1.KeyRing] can subsequently be obtained by - * including the - * [ListKeyRingsResponse.next_page_token][google.cloud.kms.v1.ListKeyRingsResponse.next_page_token] - * in a subsequent request. If unspecified, the server will pick an - * appropriate default. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. Optional limit on the number of - * [KeyRings][google.cloud.kms.v1.KeyRing] to include in the response. Further - * [KeyRings][google.cloud.kms.v1.KeyRing] can subsequently be obtained by - * including the - * [ListKeyRingsResponse.next_page_token][google.cloud.kms.v1.ListKeyRingsResponse.next_page_token] - * in a subsequent request. If unspecified, the server will pick an - * appropriate default. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. Optional pagination token, returned earlier via - * [ListKeyRingsResponse.next_page_token][google.cloud.kms.v1.ListKeyRingsResponse.next_page_token]. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. Optional pagination token, returned earlier via - * [ListKeyRingsResponse.next_page_token][google.cloud.kms.v1.ListKeyRingsResponse.next_page_token]. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * 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). - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->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). - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * 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). - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * 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). - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListKeyRingsResponse.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListKeyRingsResponse.php deleted file mode 100644 index 409bf1a82c50..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListKeyRingsResponse.php +++ /dev/null @@ -1,160 +0,0 @@ -google.cloud.kms.v1.ListKeyRingsResponse - */ -class ListKeyRingsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of [KeyRings][google.cloud.kms.v1.KeyRing]. - * - * Generated from protobuf field repeated .google.cloud.kms.v1.KeyRing key_rings = 1; - */ - private $key_rings; - /** - * A token to retrieve next page of results. Pass this value in - * [ListKeyRingsRequest.page_token][google.cloud.kms.v1.ListKeyRingsRequest.page_token] - * to retrieve the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * The total number of [KeyRings][google.cloud.kms.v1.KeyRing] that matched - * the query. - * This field is not populated if - * [ListKeyRingsRequest.filter][google.cloud.kms.v1.ListKeyRingsRequest.filter] - * is applied. - * - * Generated from protobuf field int32 total_size = 3; - */ - protected $total_size = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Kms\V1\KeyRing>|\Google\Protobuf\Internal\RepeatedField $key_rings - * The list of [KeyRings][google.cloud.kms.v1.KeyRing]. - * @type string $next_page_token - * A token to retrieve next page of results. Pass this value in - * [ListKeyRingsRequest.page_token][google.cloud.kms.v1.ListKeyRingsRequest.page_token] - * to retrieve the next page of results. - * @type int $total_size - * The total number of [KeyRings][google.cloud.kms.v1.KeyRing] that matched - * the query. - * This field is not populated if - * [ListKeyRingsRequest.filter][google.cloud.kms.v1.ListKeyRingsRequest.filter] - * is applied. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * The list of [KeyRings][google.cloud.kms.v1.KeyRing]. - * - * Generated from protobuf field repeated .google.cloud.kms.v1.KeyRing key_rings = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getKeyRings() - { - return $this->key_rings; - } - - /** - * The list of [KeyRings][google.cloud.kms.v1.KeyRing]. - * - * Generated from protobuf field repeated .google.cloud.kms.v1.KeyRing key_rings = 1; - * @param array<\Google\Cloud\Kms\V1\KeyRing>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setKeyRings($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Kms\V1\KeyRing::class); - $this->key_rings = $arr; - - return $this; - } - - /** - * A token to retrieve next page of results. Pass this value in - * [ListKeyRingsRequest.page_token][google.cloud.kms.v1.ListKeyRingsRequest.page_token] - * to retrieve the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token to retrieve next page of results. Pass this value in - * [ListKeyRingsRequest.page_token][google.cloud.kms.v1.ListKeyRingsRequest.page_token] - * to retrieve the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * The total number of [KeyRings][google.cloud.kms.v1.KeyRing] that matched - * the query. - * This field is not populated if - * [ListKeyRingsRequest.filter][google.cloud.kms.v1.ListKeyRingsRequest.filter] - * is applied. - * - * Generated from protobuf field int32 total_size = 3; - * @return int - */ - public function getTotalSize() - { - return $this->total_size; - } - - /** - * The total number of [KeyRings][google.cloud.kms.v1.KeyRing] that matched - * the query. - * This field is not populated if - * [ListKeyRingsRequest.filter][google.cloud.kms.v1.ListKeyRingsRequest.filter] - * is applied. - * - * Generated from protobuf field int32 total_size = 3; - * @param int $var - * @return $this - */ - public function setTotalSize($var) - { - GPBUtil::checkInt32($var); - $this->total_size = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListRetiredResourcesRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListRetiredResourcesRequest.php deleted file mode 100644 index f681a968b70c..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListRetiredResourcesRequest.php +++ /dev/null @@ -1,192 +0,0 @@ -google.cloud.kms.v1.ListRetiredResourcesRequest - */ -class ListRetiredResourcesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project-specific location holding the - * [RetiredResources][google.cloud.kms.v1.RetiredResource], in the format - * `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Optional limit on the number of - * [RetiredResources][google.cloud.kms.v1.RetiredResource] to be included in - * the response. Further - * [RetiredResources][google.cloud.kms.v1.RetiredResource] can subsequently be - * obtained by including the - * [ListRetiredResourcesResponse.next_page_token][google.cloud.kms.v1.ListRetiredResourcesResponse.next_page_token] - * in a subsequent request. If unspecified, the server will pick an - * appropriate default. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. Optional pagination token, returned earlier via - * [ListRetiredResourcesResponse.next_page_token][google.cloud.kms.v1.ListRetiredResourcesResponse.next_page_token]. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The project-specific location holding the - * [RetiredResources][google.cloud.kms.v1.RetiredResource], in the format - * `projects/*/locations/*`. Please see - * {@see KeyManagementServiceClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\Kms\V1\ListRetiredResourcesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project-specific location holding the - * [RetiredResources][google.cloud.kms.v1.RetiredResource], in the format - * `projects/*/locations/*`. - * @type int $page_size - * Optional. Optional limit on the number of - * [RetiredResources][google.cloud.kms.v1.RetiredResource] to be included in - * the response. Further - * [RetiredResources][google.cloud.kms.v1.RetiredResource] can subsequently be - * obtained by including the - * [ListRetiredResourcesResponse.next_page_token][google.cloud.kms.v1.ListRetiredResourcesResponse.next_page_token] - * in a subsequent request. If unspecified, the server will pick an - * appropriate default. - * @type string $page_token - * Optional. Optional pagination token, returned earlier via - * [ListRetiredResourcesResponse.next_page_token][google.cloud.kms.v1.ListRetiredResourcesResponse.next_page_token]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project-specific location holding the - * [RetiredResources][google.cloud.kms.v1.RetiredResource], in the format - * `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The project-specific location holding the - * [RetiredResources][google.cloud.kms.v1.RetiredResource], in the format - * `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. Optional limit on the number of - * [RetiredResources][google.cloud.kms.v1.RetiredResource] to be included in - * the response. Further - * [RetiredResources][google.cloud.kms.v1.RetiredResource] can subsequently be - * obtained by including the - * [ListRetiredResourcesResponse.next_page_token][google.cloud.kms.v1.ListRetiredResourcesResponse.next_page_token] - * in a subsequent request. If unspecified, the server will pick an - * appropriate default. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. Optional limit on the number of - * [RetiredResources][google.cloud.kms.v1.RetiredResource] to be included in - * the response. Further - * [RetiredResources][google.cloud.kms.v1.RetiredResource] can subsequently be - * obtained by including the - * [ListRetiredResourcesResponse.next_page_token][google.cloud.kms.v1.ListRetiredResourcesResponse.next_page_token] - * in a subsequent request. If unspecified, the server will pick an - * appropriate default. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. Optional pagination token, returned earlier via - * [ListRetiredResourcesResponse.next_page_token][google.cloud.kms.v1.ListRetiredResourcesResponse.next_page_token]. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. Optional pagination token, returned earlier via - * [ListRetiredResourcesResponse.next_page_token][google.cloud.kms.v1.ListRetiredResourcesResponse.next_page_token]. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListRetiredResourcesResponse.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListRetiredResourcesResponse.php deleted file mode 100644 index 6e8ef34aaec6..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListRetiredResourcesResponse.php +++ /dev/null @@ -1,148 +0,0 @@ -google.cloud.kms.v1.ListRetiredResourcesResponse - */ -class ListRetiredResourcesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of [RetiredResources][google.cloud.kms.v1.RetiredResource]. - * - * Generated from protobuf field repeated .google.cloud.kms.v1.RetiredResource retired_resources = 1; - */ - private $retired_resources; - /** - * A token to retrieve the next page of results. Pass this value in - * [ListRetiredResourcesRequest.page_token][google.cloud.kms.v1.ListRetiredResourcesRequest.page_token] - * to retrieve the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * The total number of [RetiredResources][google.cloud.kms.v1.RetiredResource] - * that matched the query. - * - * Generated from protobuf field int64 total_size = 3; - */ - protected $total_size = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Kms\V1\RetiredResource>|\Google\Protobuf\Internal\RepeatedField $retired_resources - * The list of [RetiredResources][google.cloud.kms.v1.RetiredResource]. - * @type string $next_page_token - * A token to retrieve the next page of results. Pass this value in - * [ListRetiredResourcesRequest.page_token][google.cloud.kms.v1.ListRetiredResourcesRequest.page_token] - * to retrieve the next page of results. - * @type int|string $total_size - * The total number of [RetiredResources][google.cloud.kms.v1.RetiredResource] - * that matched the query. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * The list of [RetiredResources][google.cloud.kms.v1.RetiredResource]. - * - * Generated from protobuf field repeated .google.cloud.kms.v1.RetiredResource retired_resources = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRetiredResources() - { - return $this->retired_resources; - } - - /** - * The list of [RetiredResources][google.cloud.kms.v1.RetiredResource]. - * - * Generated from protobuf field repeated .google.cloud.kms.v1.RetiredResource retired_resources = 1; - * @param array<\Google\Cloud\Kms\V1\RetiredResource>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRetiredResources($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Kms\V1\RetiredResource::class); - $this->retired_resources = $arr; - - return $this; - } - - /** - * A token to retrieve the next page of results. Pass this value in - * [ListRetiredResourcesRequest.page_token][google.cloud.kms.v1.ListRetiredResourcesRequest.page_token] - * to retrieve the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token to retrieve the next page of results. Pass this value in - * [ListRetiredResourcesRequest.page_token][google.cloud.kms.v1.ListRetiredResourcesRequest.page_token] - * to retrieve the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * The total number of [RetiredResources][google.cloud.kms.v1.RetiredResource] - * that matched the query. - * - * Generated from protobuf field int64 total_size = 3; - * @return int|string - */ - public function getTotalSize() - { - return $this->total_size; - } - - /** - * The total number of [RetiredResources][google.cloud.kms.v1.RetiredResource] - * that matched the query. - * - * Generated from protobuf field int64 total_size = 3; - * @param int|string $var - * @return $this - */ - public function setTotalSize($var) - { - GPBUtil::checkInt64($var); - $this->total_size = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListSingleTenantHsmInstanceProposalsRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListSingleTenantHsmInstanceProposalsRequest.php deleted file mode 100644 index b7fc1795d1cf..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListSingleTenantHsmInstanceProposalsRequest.php +++ /dev/null @@ -1,339 +0,0 @@ -google.cloud.kms.v1.ListSingleTenantHsmInstanceProposalsRequest - */ -class ListSingleTenantHsmInstanceProposalsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the single tenant HSM instance associated - * with the - * [SingleTenantHsmInstanceProposals][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * to list, in the format `projects/*/locations/*/singleTenantHsmInstances/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Optional limit on the number of - * [SingleTenantHsmInstanceProposals][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * to include in the response. Further - * [SingleTenantHsmInstanceProposals][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * can subsequently be obtained by including the - * [ListSingleTenantHsmInstanceProposalsResponse.next_page_token][google.cloud.kms.v1.ListSingleTenantHsmInstanceProposalsResponse.next_page_token] - * in a subsequent request. If unspecified, the server will pick an - * appropriate default. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. Optional pagination token, returned earlier via - * [ListSingleTenantHsmInstanceProposalsResponse.next_page_token][google.cloud.kms.v1.ListSingleTenantHsmInstanceProposalsResponse.next_page_token]. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * 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). - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * 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). - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - /** - * Optional. If set to true, - * [HsmManagement.ListSingleTenantHsmInstanceProposals][google.cloud.kms.v1.HsmManagement.ListSingleTenantHsmInstanceProposals] - * will also return - * [SingleTenantHsmInstanceProposals][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * in DELETED state. - * - * Generated from protobuf field bool show_deleted = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $show_deleted = false; - - /** - * @param string $parent Required. The resource name of the single tenant HSM instance associated - * with the - * [SingleTenantHsmInstanceProposals][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * to list, in the format `projects/*/locations/*/singleTenantHsmInstances/*`. Please see - * {@see HsmManagementClient::singleTenantHsmInstanceName()} for help formatting this field. - * - * @return \Google\Cloud\Kms\V1\ListSingleTenantHsmInstanceProposalsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the single tenant HSM instance associated - * with the - * [SingleTenantHsmInstanceProposals][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * to list, in the format `projects/*/locations/*/singleTenantHsmInstances/*`. - * @type int $page_size - * Optional. Optional limit on the number of - * [SingleTenantHsmInstanceProposals][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * to include in the response. Further - * [SingleTenantHsmInstanceProposals][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * can subsequently be obtained by including the - * [ListSingleTenantHsmInstanceProposalsResponse.next_page_token][google.cloud.kms.v1.ListSingleTenantHsmInstanceProposalsResponse.next_page_token] - * in a subsequent request. If unspecified, the server will pick an - * appropriate default. - * @type string $page_token - * Optional. Optional pagination token, returned earlier via - * [ListSingleTenantHsmInstanceProposalsResponse.next_page_token][google.cloud.kms.v1.ListSingleTenantHsmInstanceProposalsResponse.next_page_token]. - * @type 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). - * @type string $order_by - * 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). - * @type bool $show_deleted - * Optional. If set to true, - * [HsmManagement.ListSingleTenantHsmInstanceProposals][google.cloud.kms.v1.HsmManagement.ListSingleTenantHsmInstanceProposals] - * will also return - * [SingleTenantHsmInstanceProposals][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * in DELETED state. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\HsmManagement::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the single tenant HSM instance associated - * with the - * [SingleTenantHsmInstanceProposals][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * to list, in the format `projects/*/locations/*/singleTenantHsmInstances/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource name of the single tenant HSM instance associated - * with the - * [SingleTenantHsmInstanceProposals][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * to list, in the format `projects/*/locations/*/singleTenantHsmInstances/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. Optional limit on the number of - * [SingleTenantHsmInstanceProposals][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * to include in the response. Further - * [SingleTenantHsmInstanceProposals][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * can subsequently be obtained by including the - * [ListSingleTenantHsmInstanceProposalsResponse.next_page_token][google.cloud.kms.v1.ListSingleTenantHsmInstanceProposalsResponse.next_page_token] - * in a subsequent request. If unspecified, the server will pick an - * appropriate default. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. Optional limit on the number of - * [SingleTenantHsmInstanceProposals][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * to include in the response. Further - * [SingleTenantHsmInstanceProposals][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * can subsequently be obtained by including the - * [ListSingleTenantHsmInstanceProposalsResponse.next_page_token][google.cloud.kms.v1.ListSingleTenantHsmInstanceProposalsResponse.next_page_token] - * in a subsequent request. If unspecified, the server will pick an - * appropriate default. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. Optional pagination token, returned earlier via - * [ListSingleTenantHsmInstanceProposalsResponse.next_page_token][google.cloud.kms.v1.ListSingleTenantHsmInstanceProposalsResponse.next_page_token]. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. Optional pagination token, returned earlier via - * [ListSingleTenantHsmInstanceProposalsResponse.next_page_token][google.cloud.kms.v1.ListSingleTenantHsmInstanceProposalsResponse.next_page_token]. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * 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). - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->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). - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * 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). - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * 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). - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - - /** - * Optional. If set to true, - * [HsmManagement.ListSingleTenantHsmInstanceProposals][google.cloud.kms.v1.HsmManagement.ListSingleTenantHsmInstanceProposals] - * will also return - * [SingleTenantHsmInstanceProposals][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * in DELETED state. - * - * Generated from protobuf field bool show_deleted = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getShowDeleted() - { - return $this->show_deleted; - } - - /** - * Optional. If set to true, - * [HsmManagement.ListSingleTenantHsmInstanceProposals][google.cloud.kms.v1.HsmManagement.ListSingleTenantHsmInstanceProposals] - * will also return - * [SingleTenantHsmInstanceProposals][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * in DELETED state. - * - * Generated from protobuf field bool show_deleted = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setShowDeleted($var) - { - GPBUtil::checkBool($var); - $this->show_deleted = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListSingleTenantHsmInstanceProposalsResponse.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListSingleTenantHsmInstanceProposalsResponse.php deleted file mode 100644 index 35f4dd405206..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListSingleTenantHsmInstanceProposalsResponse.php +++ /dev/null @@ -1,168 +0,0 @@ -google.cloud.kms.v1.ListSingleTenantHsmInstanceProposalsResponse - */ -class ListSingleTenantHsmInstanceProposalsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of - * [SingleTenantHsmInstanceProposals][google.cloud.kms.v1.SingleTenantHsmInstanceProposal]. - * - * Generated from protobuf field repeated .google.cloud.kms.v1.SingleTenantHsmInstanceProposal single_tenant_hsm_instance_proposals = 1; - */ - private $single_tenant_hsm_instance_proposals; - /** - * A token to retrieve next page of results. Pass this value in - * [ListSingleTenantHsmInstanceProposalsRequest.page_token][google.cloud.kms.v1.ListSingleTenantHsmInstanceProposalsRequest.page_token] - * to retrieve the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * The total number of - * [SingleTenantHsmInstanceProposals][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * that matched the query. - * This field is not populated if - * [ListSingleTenantHsmInstanceProposalsRequest.filter][google.cloud.kms.v1.ListSingleTenantHsmInstanceProposalsRequest.filter] - * is applied. - * - * Generated from protobuf field int32 total_size = 3; - */ - protected $total_size = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal>|\Google\Protobuf\Internal\RepeatedField $single_tenant_hsm_instance_proposals - * The list of - * [SingleTenantHsmInstanceProposals][google.cloud.kms.v1.SingleTenantHsmInstanceProposal]. - * @type string $next_page_token - * A token to retrieve next page of results. Pass this value in - * [ListSingleTenantHsmInstanceProposalsRequest.page_token][google.cloud.kms.v1.ListSingleTenantHsmInstanceProposalsRequest.page_token] - * to retrieve the next page of results. - * @type int $total_size - * The total number of - * [SingleTenantHsmInstanceProposals][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * that matched the query. - * This field is not populated if - * [ListSingleTenantHsmInstanceProposalsRequest.filter][google.cloud.kms.v1.ListSingleTenantHsmInstanceProposalsRequest.filter] - * is applied. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\HsmManagement::initOnce(); - parent::__construct($data); - } - - /** - * The list of - * [SingleTenantHsmInstanceProposals][google.cloud.kms.v1.SingleTenantHsmInstanceProposal]. - * - * Generated from protobuf field repeated .google.cloud.kms.v1.SingleTenantHsmInstanceProposal single_tenant_hsm_instance_proposals = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSingleTenantHsmInstanceProposals() - { - return $this->single_tenant_hsm_instance_proposals; - } - - /** - * The list of - * [SingleTenantHsmInstanceProposals][google.cloud.kms.v1.SingleTenantHsmInstanceProposal]. - * - * Generated from protobuf field repeated .google.cloud.kms.v1.SingleTenantHsmInstanceProposal single_tenant_hsm_instance_proposals = 1; - * @param array<\Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSingleTenantHsmInstanceProposals($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal::class); - $this->single_tenant_hsm_instance_proposals = $arr; - - return $this; - } - - /** - * A token to retrieve next page of results. Pass this value in - * [ListSingleTenantHsmInstanceProposalsRequest.page_token][google.cloud.kms.v1.ListSingleTenantHsmInstanceProposalsRequest.page_token] - * to retrieve the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token to retrieve next page of results. Pass this value in - * [ListSingleTenantHsmInstanceProposalsRequest.page_token][google.cloud.kms.v1.ListSingleTenantHsmInstanceProposalsRequest.page_token] - * to retrieve the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * The total number of - * [SingleTenantHsmInstanceProposals][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * that matched the query. - * This field is not populated if - * [ListSingleTenantHsmInstanceProposalsRequest.filter][google.cloud.kms.v1.ListSingleTenantHsmInstanceProposalsRequest.filter] - * is applied. - * - * Generated from protobuf field int32 total_size = 3; - * @return int - */ - public function getTotalSize() - { - return $this->total_size; - } - - /** - * The total number of - * [SingleTenantHsmInstanceProposals][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * that matched the query. - * This field is not populated if - * [ListSingleTenantHsmInstanceProposalsRequest.filter][google.cloud.kms.v1.ListSingleTenantHsmInstanceProposalsRequest.filter] - * is applied. - * - * Generated from protobuf field int32 total_size = 3; - * @param int $var - * @return $this - */ - public function setTotalSize($var) - { - GPBUtil::checkInt32($var); - $this->total_size = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListSingleTenantHsmInstancesRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListSingleTenantHsmInstancesRequest.php deleted file mode 100644 index 15cbcd4c0456..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListSingleTenantHsmInstancesRequest.php +++ /dev/null @@ -1,338 +0,0 @@ -google.cloud.kms.v1.ListSingleTenantHsmInstancesRequest - */ -class ListSingleTenantHsmInstancesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the location associated with the - * [SingleTenantHsmInstances][google.cloud.kms.v1.SingleTenantHsmInstance] to - * list, in the format `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Optional limit on the number of - * [SingleTenantHsmInstances][google.cloud.kms.v1.SingleTenantHsmInstance] to - * include in the response. Further - * [SingleTenantHsmInstances][google.cloud.kms.v1.SingleTenantHsmInstance] can - * subsequently be - * obtained by including the - * [ListSingleTenantHsmInstancesResponse.next_page_token][google.cloud.kms.v1.ListSingleTenantHsmInstancesResponse.next_page_token] - * in a subsequent request. If unspecified, the server will pick an - * appropriate default. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. Optional pagination token, returned earlier via - * [ListSingleTenantHsmInstancesResponse.next_page_token][google.cloud.kms.v1.ListSingleTenantHsmInstancesResponse.next_page_token]. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * 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). - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * 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). - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - /** - * Optional. If set to true, - * [HsmManagement.ListSingleTenantHsmInstances][google.cloud.kms.v1.HsmManagement.ListSingleTenantHsmInstances] - * will also return - * [SingleTenantHsmInstances][google.cloud.kms.v1.SingleTenantHsmInstance] in - * DELETED state. - * - * Generated from protobuf field bool show_deleted = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $show_deleted = false; - - /** - * @param string $parent Required. The resource name of the location associated with the - * [SingleTenantHsmInstances][google.cloud.kms.v1.SingleTenantHsmInstance] to - * list, in the format `projects/*/locations/*`. Please see - * {@see HsmManagementClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\Kms\V1\ListSingleTenantHsmInstancesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the location associated with the - * [SingleTenantHsmInstances][google.cloud.kms.v1.SingleTenantHsmInstance] to - * list, in the format `projects/*/locations/*`. - * @type int $page_size - * Optional. Optional limit on the number of - * [SingleTenantHsmInstances][google.cloud.kms.v1.SingleTenantHsmInstance] to - * include in the response. Further - * [SingleTenantHsmInstances][google.cloud.kms.v1.SingleTenantHsmInstance] can - * subsequently be - * obtained by including the - * [ListSingleTenantHsmInstancesResponse.next_page_token][google.cloud.kms.v1.ListSingleTenantHsmInstancesResponse.next_page_token] - * in a subsequent request. If unspecified, the server will pick an - * appropriate default. - * @type string $page_token - * Optional. Optional pagination token, returned earlier via - * [ListSingleTenantHsmInstancesResponse.next_page_token][google.cloud.kms.v1.ListSingleTenantHsmInstancesResponse.next_page_token]. - * @type 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). - * @type string $order_by - * 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). - * @type bool $show_deleted - * Optional. If set to true, - * [HsmManagement.ListSingleTenantHsmInstances][google.cloud.kms.v1.HsmManagement.ListSingleTenantHsmInstances] - * will also return - * [SingleTenantHsmInstances][google.cloud.kms.v1.SingleTenantHsmInstance] in - * DELETED state. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\HsmManagement::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the location associated with the - * [SingleTenantHsmInstances][google.cloud.kms.v1.SingleTenantHsmInstance] to - * list, in the format `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource name of the location associated with the - * [SingleTenantHsmInstances][google.cloud.kms.v1.SingleTenantHsmInstance] to - * list, in the format `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. Optional limit on the number of - * [SingleTenantHsmInstances][google.cloud.kms.v1.SingleTenantHsmInstance] to - * include in the response. Further - * [SingleTenantHsmInstances][google.cloud.kms.v1.SingleTenantHsmInstance] can - * subsequently be - * obtained by including the - * [ListSingleTenantHsmInstancesResponse.next_page_token][google.cloud.kms.v1.ListSingleTenantHsmInstancesResponse.next_page_token] - * in a subsequent request. If unspecified, the server will pick an - * appropriate default. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. Optional limit on the number of - * [SingleTenantHsmInstances][google.cloud.kms.v1.SingleTenantHsmInstance] to - * include in the response. Further - * [SingleTenantHsmInstances][google.cloud.kms.v1.SingleTenantHsmInstance] can - * subsequently be - * obtained by including the - * [ListSingleTenantHsmInstancesResponse.next_page_token][google.cloud.kms.v1.ListSingleTenantHsmInstancesResponse.next_page_token] - * in a subsequent request. If unspecified, the server will pick an - * appropriate default. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. Optional pagination token, returned earlier via - * [ListSingleTenantHsmInstancesResponse.next_page_token][google.cloud.kms.v1.ListSingleTenantHsmInstancesResponse.next_page_token]. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. Optional pagination token, returned earlier via - * [ListSingleTenantHsmInstancesResponse.next_page_token][google.cloud.kms.v1.ListSingleTenantHsmInstancesResponse.next_page_token]. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * 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). - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->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). - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * 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). - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * 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). - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - - /** - * Optional. If set to true, - * [HsmManagement.ListSingleTenantHsmInstances][google.cloud.kms.v1.HsmManagement.ListSingleTenantHsmInstances] - * will also return - * [SingleTenantHsmInstances][google.cloud.kms.v1.SingleTenantHsmInstance] in - * DELETED state. - * - * Generated from protobuf field bool show_deleted = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getShowDeleted() - { - return $this->show_deleted; - } - - /** - * Optional. If set to true, - * [HsmManagement.ListSingleTenantHsmInstances][google.cloud.kms.v1.HsmManagement.ListSingleTenantHsmInstances] - * will also return - * [SingleTenantHsmInstances][google.cloud.kms.v1.SingleTenantHsmInstance] in - * DELETED state. - * - * Generated from protobuf field bool show_deleted = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setShowDeleted($var) - { - GPBUtil::checkBool($var); - $this->show_deleted = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListSingleTenantHsmInstancesResponse.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListSingleTenantHsmInstancesResponse.php deleted file mode 100644 index 9723ddcce6f7..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListSingleTenantHsmInstancesResponse.php +++ /dev/null @@ -1,168 +0,0 @@ -google.cloud.kms.v1.ListSingleTenantHsmInstancesResponse - */ -class ListSingleTenantHsmInstancesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of - * [SingleTenantHsmInstances][google.cloud.kms.v1.SingleTenantHsmInstance]. - * - * Generated from protobuf field repeated .google.cloud.kms.v1.SingleTenantHsmInstance single_tenant_hsm_instances = 1; - */ - private $single_tenant_hsm_instances; - /** - * A token to retrieve next page of results. Pass this value in - * [ListSingleTenantHsmInstancesRequest.page_token][google.cloud.kms.v1.ListSingleTenantHsmInstancesRequest.page_token] - * to retrieve the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * The total number of - * [SingleTenantHsmInstances][google.cloud.kms.v1.SingleTenantHsmInstance] - * that matched the query. - * This field is not populated if - * [ListSingleTenantHsmInstancesRequest.filter][google.cloud.kms.v1.ListSingleTenantHsmInstancesRequest.filter] - * is applied. - * - * Generated from protobuf field int32 total_size = 3; - */ - protected $total_size = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Kms\V1\SingleTenantHsmInstance>|\Google\Protobuf\Internal\RepeatedField $single_tenant_hsm_instances - * The list of - * [SingleTenantHsmInstances][google.cloud.kms.v1.SingleTenantHsmInstance]. - * @type string $next_page_token - * A token to retrieve next page of results. Pass this value in - * [ListSingleTenantHsmInstancesRequest.page_token][google.cloud.kms.v1.ListSingleTenantHsmInstancesRequest.page_token] - * to retrieve the next page of results. - * @type int $total_size - * The total number of - * [SingleTenantHsmInstances][google.cloud.kms.v1.SingleTenantHsmInstance] - * that matched the query. - * This field is not populated if - * [ListSingleTenantHsmInstancesRequest.filter][google.cloud.kms.v1.ListSingleTenantHsmInstancesRequest.filter] - * is applied. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\HsmManagement::initOnce(); - parent::__construct($data); - } - - /** - * The list of - * [SingleTenantHsmInstances][google.cloud.kms.v1.SingleTenantHsmInstance]. - * - * Generated from protobuf field repeated .google.cloud.kms.v1.SingleTenantHsmInstance single_tenant_hsm_instances = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSingleTenantHsmInstances() - { - return $this->single_tenant_hsm_instances; - } - - /** - * The list of - * [SingleTenantHsmInstances][google.cloud.kms.v1.SingleTenantHsmInstance]. - * - * Generated from protobuf field repeated .google.cloud.kms.v1.SingleTenantHsmInstance single_tenant_hsm_instances = 1; - * @param array<\Google\Cloud\Kms\V1\SingleTenantHsmInstance>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSingleTenantHsmInstances($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Kms\V1\SingleTenantHsmInstance::class); - $this->single_tenant_hsm_instances = $arr; - - return $this; - } - - /** - * A token to retrieve next page of results. Pass this value in - * [ListSingleTenantHsmInstancesRequest.page_token][google.cloud.kms.v1.ListSingleTenantHsmInstancesRequest.page_token] - * to retrieve the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token to retrieve next page of results. Pass this value in - * [ListSingleTenantHsmInstancesRequest.page_token][google.cloud.kms.v1.ListSingleTenantHsmInstancesRequest.page_token] - * to retrieve the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * The total number of - * [SingleTenantHsmInstances][google.cloud.kms.v1.SingleTenantHsmInstance] - * that matched the query. - * This field is not populated if - * [ListSingleTenantHsmInstancesRequest.filter][google.cloud.kms.v1.ListSingleTenantHsmInstancesRequest.filter] - * is applied. - * - * Generated from protobuf field int32 total_size = 3; - * @return int - */ - public function getTotalSize() - { - return $this->total_size; - } - - /** - * The total number of - * [SingleTenantHsmInstances][google.cloud.kms.v1.SingleTenantHsmInstance] - * that matched the query. - * This field is not populated if - * [ListSingleTenantHsmInstancesRequest.filter][google.cloud.kms.v1.ListSingleTenantHsmInstancesRequest.filter] - * is applied. - * - * Generated from protobuf field int32 total_size = 3; - * @param int $var - * @return $this - */ - public function setTotalSize($var) - { - GPBUtil::checkInt32($var); - $this->total_size = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/LocationMetadata.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/LocationMetadata.php deleted file mode 100644 index 76435c001fab..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/LocationMetadata.php +++ /dev/null @@ -1,172 +0,0 @@ -google.cloud.kms.v1.LocationMetadata - */ -class LocationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Indicates whether [CryptoKeys][google.cloud.kms.v1.CryptoKey] with - * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level] - * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] can be created in this - * location. - * - * Generated from protobuf field bool hsm_available = 1; - */ - protected $hsm_available = false; - /** - * Indicates whether [CryptoKeys][google.cloud.kms.v1.CryptoKey] with - * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level] - * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] can be created in - * this location. - * - * Generated from protobuf field bool ekm_available = 2; - */ - protected $ekm_available = false; - /** - * Indicates whether [CryptoKeys][google.cloud.kms.v1.CryptoKey] with - * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level] - * [HSM_SINGLE_TENANT][google.cloud.kms.v1.ProtectionLevel.HSM_SINGLE_TENANT] - * can be created in this location. - * - * Generated from protobuf field bool hsm_single_tenant_available = 3; - */ - protected $hsm_single_tenant_available = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $hsm_available - * Indicates whether [CryptoKeys][google.cloud.kms.v1.CryptoKey] with - * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level] - * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] can be created in this - * location. - * @type bool $ekm_available - * Indicates whether [CryptoKeys][google.cloud.kms.v1.CryptoKey] with - * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level] - * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] can be created in - * this location. - * @type bool $hsm_single_tenant_available - * Indicates whether [CryptoKeys][google.cloud.kms.v1.CryptoKey] with - * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level] - * [HSM_SINGLE_TENANT][google.cloud.kms.v1.ProtectionLevel.HSM_SINGLE_TENANT] - * can be created in this location. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Indicates whether [CryptoKeys][google.cloud.kms.v1.CryptoKey] with - * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level] - * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] can be created in this - * location. - * - * Generated from protobuf field bool hsm_available = 1; - * @return bool - */ - public function getHsmAvailable() - { - return $this->hsm_available; - } - - /** - * Indicates whether [CryptoKeys][google.cloud.kms.v1.CryptoKey] with - * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level] - * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] can be created in this - * location. - * - * Generated from protobuf field bool hsm_available = 1; - * @param bool $var - * @return $this - */ - public function setHsmAvailable($var) - { - GPBUtil::checkBool($var); - $this->hsm_available = $var; - - return $this; - } - - /** - * Indicates whether [CryptoKeys][google.cloud.kms.v1.CryptoKey] with - * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level] - * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] can be created in - * this location. - * - * Generated from protobuf field bool ekm_available = 2; - * @return bool - */ - public function getEkmAvailable() - { - return $this->ekm_available; - } - - /** - * Indicates whether [CryptoKeys][google.cloud.kms.v1.CryptoKey] with - * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level] - * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] can be created in - * this location. - * - * Generated from protobuf field bool ekm_available = 2; - * @param bool $var - * @return $this - */ - public function setEkmAvailable($var) - { - GPBUtil::checkBool($var); - $this->ekm_available = $var; - - return $this; - } - - /** - * Indicates whether [CryptoKeys][google.cloud.kms.v1.CryptoKey] with - * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level] - * [HSM_SINGLE_TENANT][google.cloud.kms.v1.ProtectionLevel.HSM_SINGLE_TENANT] - * can be created in this location. - * - * Generated from protobuf field bool hsm_single_tenant_available = 3; - * @return bool - */ - public function getHsmSingleTenantAvailable() - { - return $this->hsm_single_tenant_available; - } - - /** - * Indicates whether [CryptoKeys][google.cloud.kms.v1.CryptoKey] with - * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level] - * [HSM_SINGLE_TENANT][google.cloud.kms.v1.ProtectionLevel.HSM_SINGLE_TENANT] - * can be created in this location. - * - * Generated from protobuf field bool hsm_single_tenant_available = 3; - * @param bool $var - * @return $this - */ - public function setHsmSingleTenantAvailable($var) - { - GPBUtil::checkBool($var); - $this->hsm_single_tenant_available = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/MacSignRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/MacSignRequest.php deleted file mode 100644 index efc81a1661d3..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/MacSignRequest.php +++ /dev/null @@ -1,300 +0,0 @@ -google.cloud.kms.v1.MacSignRequest - */ -class MacSignRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for - * signing. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. The data to sign. The MAC tag is computed over this data field - * based on the specific algorithm. - * - * Generated from protobuf field bytes data = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $data = ''; - /** - * Optional. An optional CRC32C checksum of the - * [MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data]. If - * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] - * will verify the integrity of the received - * [MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data] using this - * checksum. [KeyManagementService][google.cloud.kms.v1.KeyManagementService] - * will report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data]) is - * equal to - * [MacSignRequest.data_crc32c][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $data_crc32c = null; - - /** - * @param string $name Required. The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for - * signing. Please see - * {@see KeyManagementServiceClient::cryptoKeyVersionName()} for help formatting this field. - * @param string $data Required. The data to sign. The MAC tag is computed over this data field - * based on the specific algorithm. - * - * @return \Google\Cloud\Kms\V1\MacSignRequest - * - * @experimental - */ - public static function build(string $name, string $data): self - { - return (new self()) - ->setName($name) - ->setData($data); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for - * signing. - * @type string $data - * Required. The data to sign. The MAC tag is computed over this data field - * based on the specific algorithm. - * @type \Google\Protobuf\Int64Value $data_crc32c - * Optional. An optional CRC32C checksum of the - * [MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data]. If - * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] - * will verify the integrity of the received - * [MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data] using this - * checksum. [KeyManagementService][google.cloud.kms.v1.KeyManagementService] - * will report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data]) is - * equal to - * [MacSignRequest.data_crc32c][google.cloud.kms.v1.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. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for - * signing. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for - * signing. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. The data to sign. The MAC tag is computed over this data field - * based on the specific algorithm. - * - * Generated from protobuf field bytes data = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getData() - { - return $this->data; - } - - /** - * Required. The data to sign. The MAC tag is computed over this data field - * based on the specific algorithm. - * - * Generated from protobuf field bytes data = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setData($var) - { - GPBUtil::checkString($var, False); - $this->data = $var; - - return $this; - } - - /** - * Optional. An optional CRC32C checksum of the - * [MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data]. If - * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] - * will verify the integrity of the received - * [MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data] using this - * checksum. [KeyManagementService][google.cloud.kms.v1.KeyManagementService] - * will report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data]) is - * equal to - * [MacSignRequest.data_crc32c][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Int64Value|null - */ - public function getDataCrc32C() - { - return $this->data_crc32c; - } - - public function hasDataCrc32C() - { - return isset($this->data_crc32c); - } - - public function clearDataCrc32C() - { - unset($this->data_crc32c); - } - - /** - * Returns the unboxed value from getDataCrc32C() - - * Optional. An optional CRC32C checksum of the - * [MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data]. If - * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] - * will verify the integrity of the received - * [MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data] using this - * checksum. [KeyManagementService][google.cloud.kms.v1.KeyManagementService] - * will report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data]) is - * equal to - * [MacSignRequest.data_crc32c][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int|string|null - */ - public function getDataCrc32CUnwrapped() - { - return $this->readWrapperValue("data_crc32c"); - } - - /** - * Optional. An optional CRC32C checksum of the - * [MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data]. If - * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] - * will verify the integrity of the received - * [MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data] using this - * checksum. [KeyManagementService][google.cloud.kms.v1.KeyManagementService] - * will report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data]) is - * equal to - * [MacSignRequest.data_crc32c][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Int64Value $var - * @return $this - */ - public function setDataCrc32C($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); - $this->data_crc32c = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. - - * Optional. An optional CRC32C checksum of the - * [MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data]. If - * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] - * will verify the integrity of the received - * [MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data] using this - * checksum. [KeyManagementService][google.cloud.kms.v1.KeyManagementService] - * will report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data]) is - * equal to - * [MacSignRequest.data_crc32c][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param int|string|null $var - * @return $this - */ - public function setDataCrc32CUnwrapped($var) - { - $this->writeWrapperValue("data_crc32c", $var); - return $this;} - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/MacSignResponse.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/MacSignResponse.php deleted file mode 100644 index 632a972782b3..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/MacSignResponse.php +++ /dev/null @@ -1,377 +0,0 @@ -google.cloud.kms.v1.MacSignResponse - */ -class MacSignResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. - * Check this field to verify that the intended resource was used for signing. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The created signature. - * - * Generated from protobuf field bytes mac = 2; - */ - protected $mac = ''; - /** - * Integrity verification field. A CRC32C checksum of the returned - * [MacSignResponse.mac][google.cloud.kms.v1.MacSignResponse.mac]. An - * integrity check of - * [MacSignResponse.mac][google.cloud.kms.v1.MacSignResponse.mac] can be - * performed by computing the CRC32C checksum of - * [MacSignResponse.mac][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value mac_crc32c = 3; - */ - protected $mac_crc32c = null; - /** - * Integrity verification field. A flag indicating whether - * [MacSignRequest.data_crc32c][google.cloud.kms.v1.MacSignRequest.data_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of the - * [data][google.cloud.kms.v1.MacSignRequest.data]. A false value of this - * field indicates either that - * [MacSignRequest.data_crc32c][google.cloud.kms.v1.MacSignRequest.data_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [MacSignRequest.data_crc32c][google.cloud.kms.v1.MacSignRequest.data_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * - * Generated from protobuf field bool verified_data_crc32c = 4; - */ - protected $verified_data_crc32c = false; - /** - * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. - * - * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 5; - */ - protected $protection_level = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. - * Check this field to verify that the intended resource was used for signing. - * @type string $mac - * The created signature. - * @type \Google\Protobuf\Int64Value $mac_crc32c - * Integrity verification field. A CRC32C checksum of the returned - * [MacSignResponse.mac][google.cloud.kms.v1.MacSignResponse.mac]. An - * integrity check of - * [MacSignResponse.mac][google.cloud.kms.v1.MacSignResponse.mac] can be - * performed by computing the CRC32C checksum of - * [MacSignResponse.mac][google.cloud.kms.v1.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. - * @type bool $verified_data_crc32c - * Integrity verification field. A flag indicating whether - * [MacSignRequest.data_crc32c][google.cloud.kms.v1.MacSignRequest.data_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of the - * [data][google.cloud.kms.v1.MacSignRequest.data]. A false value of this - * field indicates either that - * [MacSignRequest.data_crc32c][google.cloud.kms.v1.MacSignRequest.data_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [MacSignRequest.data_crc32c][google.cloud.kms.v1.MacSignRequest.data_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * @type int $protection_level - * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. - * Check this field to verify that the intended resource was used for signing. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. - * Check this field to verify that the intended resource was used for signing. - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The created signature. - * - * Generated from protobuf field bytes mac = 2; - * @return string - */ - public function getMac() - { - return $this->mac; - } - - /** - * The created signature. - * - * Generated from protobuf field bytes mac = 2; - * @param string $var - * @return $this - */ - public function setMac($var) - { - GPBUtil::checkString($var, False); - $this->mac = $var; - - return $this; - } - - /** - * Integrity verification field. A CRC32C checksum of the returned - * [MacSignResponse.mac][google.cloud.kms.v1.MacSignResponse.mac]. An - * integrity check of - * [MacSignResponse.mac][google.cloud.kms.v1.MacSignResponse.mac] can be - * performed by computing the CRC32C checksum of - * [MacSignResponse.mac][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value mac_crc32c = 3; - * @return \Google\Protobuf\Int64Value|null - */ - public function getMacCrc32C() - { - return $this->mac_crc32c; - } - - public function hasMacCrc32C() - { - return isset($this->mac_crc32c); - } - - public function clearMacCrc32C() - { - unset($this->mac_crc32c); - } - - /** - * Returns the unboxed value from getMacCrc32C() - - * Integrity verification field. A CRC32C checksum of the returned - * [MacSignResponse.mac][google.cloud.kms.v1.MacSignResponse.mac]. An - * integrity check of - * [MacSignResponse.mac][google.cloud.kms.v1.MacSignResponse.mac] can be - * performed by computing the CRC32C checksum of - * [MacSignResponse.mac][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value mac_crc32c = 3; - * @return int|string|null - */ - public function getMacCrc32CUnwrapped() - { - return $this->readWrapperValue("mac_crc32c"); - } - - /** - * Integrity verification field. A CRC32C checksum of the returned - * [MacSignResponse.mac][google.cloud.kms.v1.MacSignResponse.mac]. An - * integrity check of - * [MacSignResponse.mac][google.cloud.kms.v1.MacSignResponse.mac] can be - * performed by computing the CRC32C checksum of - * [MacSignResponse.mac][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value mac_crc32c = 3; - * @param \Google\Protobuf\Int64Value $var - * @return $this - */ - public function setMacCrc32C($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); - $this->mac_crc32c = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. - - * Integrity verification field. A CRC32C checksum of the returned - * [MacSignResponse.mac][google.cloud.kms.v1.MacSignResponse.mac]. An - * integrity check of - * [MacSignResponse.mac][google.cloud.kms.v1.MacSignResponse.mac] can be - * performed by computing the CRC32C checksum of - * [MacSignResponse.mac][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value mac_crc32c = 3; - * @param int|string|null $var - * @return $this - */ - public function setMacCrc32CUnwrapped($var) - { - $this->writeWrapperValue("mac_crc32c", $var); - return $this;} - - /** - * Integrity verification field. A flag indicating whether - * [MacSignRequest.data_crc32c][google.cloud.kms.v1.MacSignRequest.data_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of the - * [data][google.cloud.kms.v1.MacSignRequest.data]. A false value of this - * field indicates either that - * [MacSignRequest.data_crc32c][google.cloud.kms.v1.MacSignRequest.data_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [MacSignRequest.data_crc32c][google.cloud.kms.v1.MacSignRequest.data_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * - * Generated from protobuf field bool verified_data_crc32c = 4; - * @return bool - */ - public function getVerifiedDataCrc32C() - { - return $this->verified_data_crc32c; - } - - /** - * Integrity verification field. A flag indicating whether - * [MacSignRequest.data_crc32c][google.cloud.kms.v1.MacSignRequest.data_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of the - * [data][google.cloud.kms.v1.MacSignRequest.data]. A false value of this - * field indicates either that - * [MacSignRequest.data_crc32c][google.cloud.kms.v1.MacSignRequest.data_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [MacSignRequest.data_crc32c][google.cloud.kms.v1.MacSignRequest.data_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * - * Generated from protobuf field bool verified_data_crc32c = 4; - * @param bool $var - * @return $this - */ - public function setVerifiedDataCrc32C($var) - { - GPBUtil::checkBool($var); - $this->verified_data_crc32c = $var; - - return $this; - } - - /** - * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. - * - * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 5; - * @return int - */ - public function getProtectionLevel() - { - return $this->protection_level; - } - - /** - * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. - * - * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 5; - * @param int $var - * @return $this - */ - public function setProtectionLevel($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\ProtectionLevel::class); - $this->protection_level = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/MacVerifyRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/MacVerifyRequest.php deleted file mode 100644 index 97046b5453b8..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/MacVerifyRequest.php +++ /dev/null @@ -1,514 +0,0 @@ -google.cloud.kms.v1.MacVerifyRequest - */ -class MacVerifyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for - * verification. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. The data used previously as a - * [MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data] to generate - * the MAC tag. - * - * Generated from protobuf field bytes data = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $data = ''; - /** - * Optional. An optional CRC32C checksum of the - * [MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data]. If - * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] - * will verify the integrity of the received - * [MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data] using - * this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data]) - * is equal to - * [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $data_crc32c = null; - /** - * Required. The signature to verify. - * - * Generated from protobuf field bytes mac = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $mac = ''; - /** - * Optional. An optional CRC32C checksum of the - * [MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac]. If - * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] - * will verify the integrity of the received - * [MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac] using this - * checksum. [KeyManagementService][google.cloud.kms.v1.KeyManagementService] - * will report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac]) is - * equal to - * [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value mac_crc32c = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $mac_crc32c = null; - - /** - * @param string $name Required. The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for - * verification. Please see - * {@see KeyManagementServiceClient::cryptoKeyVersionName()} for help formatting this field. - * @param string $data Required. The data used previously as a - * [MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data] to generate - * the MAC tag. - * @param string $mac Required. The signature to verify. - * - * @return \Google\Cloud\Kms\V1\MacVerifyRequest - * - * @experimental - */ - public static function build(string $name, string $data, string $mac): self - { - return (new self()) - ->setName($name) - ->setData($data) - ->setMac($mac); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for - * verification. - * @type string $data - * Required. The data used previously as a - * [MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data] to generate - * the MAC tag. - * @type \Google\Protobuf\Int64Value $data_crc32c - * Optional. An optional CRC32C checksum of the - * [MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data]. If - * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] - * will verify the integrity of the received - * [MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data] using - * this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data]) - * is equal to - * [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.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. - * @type string $mac - * Required. The signature to verify. - * @type \Google\Protobuf\Int64Value $mac_crc32c - * Optional. An optional CRC32C checksum of the - * [MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac]. If - * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] - * will verify the integrity of the received - * [MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac] using this - * checksum. [KeyManagementService][google.cloud.kms.v1.KeyManagementService] - * will report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac]) is - * equal to - * [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.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. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for - * verification. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for - * verification. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. The data used previously as a - * [MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data] to generate - * the MAC tag. - * - * Generated from protobuf field bytes data = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getData() - { - return $this->data; - } - - /** - * Required. The data used previously as a - * [MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data] to generate - * the MAC tag. - * - * Generated from protobuf field bytes data = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setData($var) - { - GPBUtil::checkString($var, False); - $this->data = $var; - - return $this; - } - - /** - * Optional. An optional CRC32C checksum of the - * [MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data]. If - * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] - * will verify the integrity of the received - * [MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data] using - * this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data]) - * is equal to - * [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Int64Value|null - */ - public function getDataCrc32C() - { - return $this->data_crc32c; - } - - public function hasDataCrc32C() - { - return isset($this->data_crc32c); - } - - public function clearDataCrc32C() - { - unset($this->data_crc32c); - } - - /** - * Returns the unboxed value from getDataCrc32C() - - * Optional. An optional CRC32C checksum of the - * [MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data]. If - * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] - * will verify the integrity of the received - * [MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data] using - * this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data]) - * is equal to - * [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int|string|null - */ - public function getDataCrc32CUnwrapped() - { - return $this->readWrapperValue("data_crc32c"); - } - - /** - * Optional. An optional CRC32C checksum of the - * [MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data]. If - * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] - * will verify the integrity of the received - * [MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data] using - * this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data]) - * is equal to - * [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Int64Value $var - * @return $this - */ - public function setDataCrc32C($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); - $this->data_crc32c = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. - - * Optional. An optional CRC32C checksum of the - * [MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data]. If - * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] - * will verify the integrity of the received - * [MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data] using - * this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data]) - * is equal to - * [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param int|string|null $var - * @return $this - */ - public function setDataCrc32CUnwrapped($var) - { - $this->writeWrapperValue("data_crc32c", $var); - return $this;} - - /** - * Required. The signature to verify. - * - * Generated from protobuf field bytes mac = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getMac() - { - return $this->mac; - } - - /** - * Required. The signature to verify. - * - * Generated from protobuf field bytes mac = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setMac($var) - { - GPBUtil::checkString($var, False); - $this->mac = $var; - - return $this; - } - - /** - * Optional. An optional CRC32C checksum of the - * [MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac]. If - * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] - * will verify the integrity of the received - * [MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac] using this - * checksum. [KeyManagementService][google.cloud.kms.v1.KeyManagementService] - * will report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac]) is - * equal to - * [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value mac_crc32c = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Int64Value|null - */ - public function getMacCrc32C() - { - return $this->mac_crc32c; - } - - public function hasMacCrc32C() - { - return isset($this->mac_crc32c); - } - - public function clearMacCrc32C() - { - unset($this->mac_crc32c); - } - - /** - * Returns the unboxed value from getMacCrc32C() - - * Optional. An optional CRC32C checksum of the - * [MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac]. If - * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] - * will verify the integrity of the received - * [MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac] using this - * checksum. [KeyManagementService][google.cloud.kms.v1.KeyManagementService] - * will report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac]) is - * equal to - * [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value mac_crc32c = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return int|string|null - */ - public function getMacCrc32CUnwrapped() - { - return $this->readWrapperValue("mac_crc32c"); - } - - /** - * Optional. An optional CRC32C checksum of the - * [MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac]. If - * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] - * will verify the integrity of the received - * [MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac] using this - * checksum. [KeyManagementService][google.cloud.kms.v1.KeyManagementService] - * will report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac]) is - * equal to - * [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value mac_crc32c = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Int64Value $var - * @return $this - */ - public function setMacCrc32C($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); - $this->mac_crc32c = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. - - * Optional. An optional CRC32C checksum of the - * [MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac]. If - * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] - * will verify the integrity of the received - * [MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac] using this - * checksum. [KeyManagementService][google.cloud.kms.v1.KeyManagementService] - * will report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac]) is - * equal to - * [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value mac_crc32c = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param int|string|null $var - * @return $this - */ - public function setMacCrc32CUnwrapped($var) - { - $this->writeWrapperValue("mac_crc32c", $var); - return $this;} - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/MacVerifyResponse.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/MacVerifyResponse.php deleted file mode 100644 index 457f9f454810..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/MacVerifyResponse.php +++ /dev/null @@ -1,386 +0,0 @@ -google.cloud.kms.v1.MacVerifyResponse - */ -class MacVerifyResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for - * verification. Check this field to verify that the intended resource was - * used for verification. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * This field indicates whether or not the verification operation for - * [MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac] over - * [MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data] was - * successful. - * - * Generated from protobuf field bool success = 2; - */ - protected $success = false; - /** - * Integrity verification field. A flag indicating whether - * [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.MacVerifyRequest.data_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of the - * [data][google.cloud.kms.v1.MacVerifyRequest.data]. A false value of this - * field indicates either that - * [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.MacVerifyRequest.data_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.MacVerifyRequest.data_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * - * Generated from protobuf field bool verified_data_crc32c = 3; - */ - protected $verified_data_crc32c = false; - /** - * Integrity verification field. A flag indicating whether - * [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.MacVerifyRequest.mac_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of the - * [data][google.cloud.kms.v1.MacVerifyRequest.mac]. A false value of this - * field indicates either that - * [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.MacVerifyRequest.mac_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.MacVerifyRequest.mac_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * - * Generated from protobuf field bool verified_mac_crc32c = 4; - */ - protected $verified_mac_crc32c = false; - /** - * 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. - * - * Generated from protobuf field bool verified_success_integrity = 5; - */ - protected $verified_success_integrity = false; - /** - * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for - * verification. - * - * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 6; - */ - protected $protection_level = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for - * verification. Check this field to verify that the intended resource was - * used for verification. - * @type bool $success - * This field indicates whether or not the verification operation for - * [MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac] over - * [MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data] was - * successful. - * @type bool $verified_data_crc32c - * Integrity verification field. A flag indicating whether - * [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.MacVerifyRequest.data_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of the - * [data][google.cloud.kms.v1.MacVerifyRequest.data]. A false value of this - * field indicates either that - * [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.MacVerifyRequest.data_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.MacVerifyRequest.data_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * @type bool $verified_mac_crc32c - * Integrity verification field. A flag indicating whether - * [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.MacVerifyRequest.mac_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of the - * [data][google.cloud.kms.v1.MacVerifyRequest.mac]. A false value of this - * field indicates either that - * [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.MacVerifyRequest.mac_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.MacVerifyRequest.mac_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * @type bool $verified_success_integrity - * 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. - * @type int $protection_level - * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for - * verification. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for - * verification. Check this field to verify that the intended resource was - * used for verification. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for - * verification. Check this field to verify that the intended resource was - * used for verification. - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * This field indicates whether or not the verification operation for - * [MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac] over - * [MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data] was - * successful. - * - * Generated from protobuf field bool success = 2; - * @return bool - */ - public function getSuccess() - { - return $this->success; - } - - /** - * This field indicates whether or not the verification operation for - * [MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac] over - * [MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data] was - * successful. - * - * Generated from protobuf field bool success = 2; - * @param bool $var - * @return $this - */ - public function setSuccess($var) - { - GPBUtil::checkBool($var); - $this->success = $var; - - return $this; - } - - /** - * Integrity verification field. A flag indicating whether - * [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.MacVerifyRequest.data_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of the - * [data][google.cloud.kms.v1.MacVerifyRequest.data]. A false value of this - * field indicates either that - * [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.MacVerifyRequest.data_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.MacVerifyRequest.data_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * - * Generated from protobuf field bool verified_data_crc32c = 3; - * @return bool - */ - public function getVerifiedDataCrc32C() - { - return $this->verified_data_crc32c; - } - - /** - * Integrity verification field. A flag indicating whether - * [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.MacVerifyRequest.data_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of the - * [data][google.cloud.kms.v1.MacVerifyRequest.data]. A false value of this - * field indicates either that - * [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.MacVerifyRequest.data_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.MacVerifyRequest.data_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * - * Generated from protobuf field bool verified_data_crc32c = 3; - * @param bool $var - * @return $this - */ - public function setVerifiedDataCrc32C($var) - { - GPBUtil::checkBool($var); - $this->verified_data_crc32c = $var; - - return $this; - } - - /** - * Integrity verification field. A flag indicating whether - * [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.MacVerifyRequest.mac_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of the - * [data][google.cloud.kms.v1.MacVerifyRequest.mac]. A false value of this - * field indicates either that - * [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.MacVerifyRequest.mac_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.MacVerifyRequest.mac_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * - * Generated from protobuf field bool verified_mac_crc32c = 4; - * @return bool - */ - public function getVerifiedMacCrc32C() - { - return $this->verified_mac_crc32c; - } - - /** - * Integrity verification field. A flag indicating whether - * [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.MacVerifyRequest.mac_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of the - * [data][google.cloud.kms.v1.MacVerifyRequest.mac]. A false value of this - * field indicates either that - * [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.MacVerifyRequest.mac_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.MacVerifyRequest.mac_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * - * Generated from protobuf field bool verified_mac_crc32c = 4; - * @param bool $var - * @return $this - */ - public function setVerifiedMacCrc32C($var) - { - GPBUtil::checkBool($var); - $this->verified_mac_crc32c = $var; - - return $this; - } - - /** - * 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. - * - * Generated from protobuf field bool verified_success_integrity = 5; - * @return bool - */ - public function getVerifiedSuccessIntegrity() - { - return $this->verified_success_integrity; - } - - /** - * 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. - * - * Generated from protobuf field bool verified_success_integrity = 5; - * @param bool $var - * @return $this - */ - public function setVerifiedSuccessIntegrity($var) - { - GPBUtil::checkBool($var); - $this->verified_success_integrity = $var; - - return $this; - } - - /** - * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for - * verification. - * - * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 6; - * @return int - */ - public function getProtectionLevel() - { - return $this->protection_level; - } - - /** - * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for - * verification. - * - * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 6; - * @param int $var - * @return $this - */ - public function setProtectionLevel($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\ProtectionLevel::class); - $this->protection_level = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ProtectionLevel.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ProtectionLevel.php deleted file mode 100644 index 89c97cb38289..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ProtectionLevel.php +++ /dev/null @@ -1,84 +0,0 @@ -google.cloud.kms.v1.ProtectionLevel - */ -class ProtectionLevel -{ - /** - * Not specified. - * - * Generated from protobuf enum PROTECTION_LEVEL_UNSPECIFIED = 0; - */ - const PROTECTION_LEVEL_UNSPECIFIED = 0; - /** - * Crypto operations are performed in software. - * - * Generated from protobuf enum SOFTWARE = 1; - */ - const SOFTWARE = 1; - /** - * Crypto operations are performed in a Hardware Security Module. - * - * Generated from protobuf enum HSM = 2; - */ - const HSM = 2; - /** - * Crypto operations are performed by an external key manager. - * - * Generated from protobuf enum EXTERNAL = 3; - */ - const EXTERNAL = 3; - /** - * Crypto operations are performed in an EKM-over-VPC backend. - * - * Generated from protobuf enum EXTERNAL_VPC = 4; - */ - const EXTERNAL_VPC = 4; - /** - * Crypto operations are performed in a single-tenant HSM. - * - * Generated from protobuf enum HSM_SINGLE_TENANT = 5; - */ - const HSM_SINGLE_TENANT = 5; - - private static $valueToName = [ - self::PROTECTION_LEVEL_UNSPECIFIED => 'PROTECTION_LEVEL_UNSPECIFIED', - self::SOFTWARE => 'SOFTWARE', - self::HSM => 'HSM', - self::EXTERNAL => 'EXTERNAL', - self::EXTERNAL_VPC => 'EXTERNAL_VPC', - self::HSM_SINGLE_TENANT => 'HSM_SINGLE_TENANT', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/PublicKey.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/PublicKey.php deleted file mode 100644 index 6e5ae047ab43..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/PublicKey.php +++ /dev/null @@ -1,452 +0,0 @@ -google.cloud.kms.v1.PublicKey - */ -class PublicKey extends \Google\Protobuf\Internal\Message -{ - /** - * 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). - * - * Generated from protobuf field string pem = 1; - */ - protected $pem = ''; - /** - * The - * [Algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] - * associated with this key. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 2; - */ - protected $algorithm = 0; - /** - * Integrity verification field. A CRC32C checksum of the returned - * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem]. An integrity check of - * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] can be performed by - * computing the CRC32C checksum of - * [PublicKey.pem][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value pem_crc32c = 3; - */ - protected $pem_crc32c = null; - /** - * The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key. - * Provided here for verification. - * NOTE: This field is in Beta. - * - * Generated from protobuf field string name = 4; - */ - protected $name = ''; - /** - * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key. - * - * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 5; - */ - protected $protection_level = 0; - /** - * The [PublicKey][google.cloud.kms.v1.PublicKey] format specified by the - * customer through the - * [public_key_format][google.cloud.kms.v1.GetPublicKeyRequest.public_key_format] - * field. - * - * Generated from protobuf field .google.cloud.kms.v1.PublicKey.PublicKeyFormat public_key_format = 7; - */ - protected $public_key_format = 0; - /** - * This field contains the public key (with integrity verification), formatted - * according to the - * [public_key_format][google.cloud.kms.v1.PublicKey.public_key_format] field. - * - * Generated from protobuf field .google.cloud.kms.v1.ChecksummedData public_key = 8; - */ - protected $public_key = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $pem - * 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). - * @type int $algorithm - * The - * [Algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] - * associated with this key. - * @type \Google\Protobuf\Int64Value $pem_crc32c - * Integrity verification field. A CRC32C checksum of the returned - * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem]. An integrity check of - * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] can be performed by - * computing the CRC32C checksum of - * [PublicKey.pem][google.cloud.kms.v1.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. - * @type string $name - * The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key. - * Provided here for verification. - * NOTE: This field is in Beta. - * @type int $protection_level - * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key. - * @type int $public_key_format - * The [PublicKey][google.cloud.kms.v1.PublicKey] format specified by the - * customer through the - * [public_key_format][google.cloud.kms.v1.GetPublicKeyRequest.public_key_format] - * field. - * @type \Google\Cloud\Kms\V1\ChecksummedData $public_key - * This field contains the public key (with integrity verification), formatted - * according to the - * [public_key_format][google.cloud.kms.v1.PublicKey.public_key_format] field. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * 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). - * - * Generated from protobuf field string pem = 1; - * @return string - */ - public function getPem() - { - return $this->pem; - } - - /** - * 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). - * - * Generated from protobuf field string pem = 1; - * @param string $var - * @return $this - */ - public function setPem($var) - { - GPBUtil::checkString($var, True); - $this->pem = $var; - - return $this; - } - - /** - * The - * [Algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] - * associated with this key. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 2; - * @return int - */ - public function getAlgorithm() - { - return $this->algorithm; - } - - /** - * The - * [Algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] - * associated with this key. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 2; - * @param int $var - * @return $this - */ - public function setAlgorithm($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\CryptoKeyVersion\CryptoKeyVersionAlgorithm::class); - $this->algorithm = $var; - - return $this; - } - - /** - * Integrity verification field. A CRC32C checksum of the returned - * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem]. An integrity check of - * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] can be performed by - * computing the CRC32C checksum of - * [PublicKey.pem][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value pem_crc32c = 3; - * @return \Google\Protobuf\Int64Value|null - */ - public function getPemCrc32C() - { - return $this->pem_crc32c; - } - - public function hasPemCrc32C() - { - return isset($this->pem_crc32c); - } - - public function clearPemCrc32C() - { - unset($this->pem_crc32c); - } - - /** - * Returns the unboxed value from getPemCrc32C() - - * Integrity verification field. A CRC32C checksum of the returned - * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem]. An integrity check of - * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] can be performed by - * computing the CRC32C checksum of - * [PublicKey.pem][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value pem_crc32c = 3; - * @return int|string|null - */ - public function getPemCrc32CUnwrapped() - { - return $this->readWrapperValue("pem_crc32c"); - } - - /** - * Integrity verification field. A CRC32C checksum of the returned - * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem]. An integrity check of - * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] can be performed by - * computing the CRC32C checksum of - * [PublicKey.pem][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value pem_crc32c = 3; - * @param \Google\Protobuf\Int64Value $var - * @return $this - */ - public function setPemCrc32C($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); - $this->pem_crc32c = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. - - * Integrity verification field. A CRC32C checksum of the returned - * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem]. An integrity check of - * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] can be performed by - * computing the CRC32C checksum of - * [PublicKey.pem][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value pem_crc32c = 3; - * @param int|string|null $var - * @return $this - */ - public function setPemCrc32CUnwrapped($var) - { - $this->writeWrapperValue("pem_crc32c", $var); - return $this;} - - /** - * The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key. - * Provided here for verification. - * NOTE: This field is in Beta. - * - * Generated from protobuf field string name = 4; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key. - * Provided here for verification. - * NOTE: This field is in Beta. - * - * Generated from protobuf field string name = 4; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key. - * - * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 5; - * @return int - */ - public function getProtectionLevel() - { - return $this->protection_level; - } - - /** - * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key. - * - * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 5; - * @param int $var - * @return $this - */ - public function setProtectionLevel($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\ProtectionLevel::class); - $this->protection_level = $var; - - return $this; - } - - /** - * The [PublicKey][google.cloud.kms.v1.PublicKey] format specified by the - * customer through the - * [public_key_format][google.cloud.kms.v1.GetPublicKeyRequest.public_key_format] - * field. - * - * Generated from protobuf field .google.cloud.kms.v1.PublicKey.PublicKeyFormat public_key_format = 7; - * @return int - */ - public function getPublicKeyFormat() - { - return $this->public_key_format; - } - - /** - * The [PublicKey][google.cloud.kms.v1.PublicKey] format specified by the - * customer through the - * [public_key_format][google.cloud.kms.v1.GetPublicKeyRequest.public_key_format] - * field. - * - * Generated from protobuf field .google.cloud.kms.v1.PublicKey.PublicKeyFormat public_key_format = 7; - * @param int $var - * @return $this - */ - public function setPublicKeyFormat($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\PublicKey\PublicKeyFormat::class); - $this->public_key_format = $var; - - return $this; - } - - /** - * This field contains the public key (with integrity verification), formatted - * according to the - * [public_key_format][google.cloud.kms.v1.PublicKey.public_key_format] field. - * - * Generated from protobuf field .google.cloud.kms.v1.ChecksummedData public_key = 8; - * @return \Google\Cloud\Kms\V1\ChecksummedData|null - */ - public function getPublicKey() - { - return $this->public_key; - } - - public function hasPublicKey() - { - return isset($this->public_key); - } - - public function clearPublicKey() - { - unset($this->public_key); - } - - /** - * This field contains the public key (with integrity verification), formatted - * according to the - * [public_key_format][google.cloud.kms.v1.PublicKey.public_key_format] field. - * - * Generated from protobuf field .google.cloud.kms.v1.ChecksummedData public_key = 8; - * @param \Google\Cloud\Kms\V1\ChecksummedData $var - * @return $this - */ - public function setPublicKey($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\ChecksummedData::class); - $this->public_key = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/PublicKey/PublicKeyFormat.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/PublicKey/PublicKeyFormat.php deleted file mode 100644 index 2dbf402cefe9..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/PublicKey/PublicKeyFormat.php +++ /dev/null @@ -1,94 +0,0 @@ -google.cloud.kms.v1.PublicKey.PublicKeyFormat - */ -class PublicKeyFormat -{ - /** - * If the - * [public_key_format][google.cloud.kms.v1.GetPublicKeyRequest.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][google.cloud.kms.v1.PublicKey.pem] will be populated. - * Otherwise, the public key will be exported through the - * [public_key][google.cloud.kms.v1.PublicKey.public_key] field in the - * requested format. - * - * Generated from protobuf enum PUBLIC_KEY_FORMAT_UNSPECIFIED = 0; - */ - const PUBLIC_KEY_FORMAT_UNSPECIFIED = 0; - /** - * 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. - * - * Generated from protobuf enum PEM = 1; - */ - const PEM = 1; - /** - * The returned public key will be encoded in DER format (the - * PrivateKeyInfo structure from RFC 5208). - * - * Generated from protobuf enum DER = 2; - */ - const DER = 2; - /** - * 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). - * - * Generated from protobuf enum NIST_PQC = 3; - */ - const NIST_PQC = 3; - /** - * The returned public key is in raw bytes format defined in its standard - * https://datatracker.ietf.org/doc/draft-connolly-cfrg-xwing-kem. - * - * Generated from protobuf enum XWING_RAW_BYTES = 4; - */ - const XWING_RAW_BYTES = 4; - - private static $valueToName = [ - self::PUBLIC_KEY_FORMAT_UNSPECIFIED => 'PUBLIC_KEY_FORMAT_UNSPECIFIED', - self::PEM => 'PEM', - self::DER => 'DER', - self::NIST_PQC => 'NIST_PQC', - self::XWING_RAW_BYTES => 'XWING_RAW_BYTES', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PublicKeyFormat::class, \Google\Cloud\Kms\V1\PublicKey_PublicKeyFormat::class); - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/RawDecryptRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/RawDecryptRequest.php deleted file mode 100644 index 3d6cd5c1a96f..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/RawDecryptRequest.php +++ /dev/null @@ -1,707 +0,0 @@ -google.cloud.kms.v1.RawDecryptRequest - */ -class RawDecryptRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for - * decryption. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Required. The encrypted data originally returned in - * [RawEncryptResponse.ciphertext][google.cloud.kms.v1.RawEncryptResponse.ciphertext]. - * - * Generated from protobuf field bytes ciphertext = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $ciphertext = ''; - /** - * Optional. Optional data that must match the data originally supplied in - * [RawEncryptRequest.additional_authenticated_data][google.cloud.kms.v1.RawEncryptRequest.additional_authenticated_data]. - * - * Generated from protobuf field bytes additional_authenticated_data = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $additional_authenticated_data = ''; - /** - * Required. The initialization vector (IV) used during encryption, which must - * match the data originally provided in - * [RawEncryptResponse.initialization_vector][google.cloud.kms.v1.RawEncryptResponse.initialization_vector]. - * - * Generated from protobuf field bytes initialization_vector = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $initialization_vector = ''; - /** - * 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). - * - * Generated from protobuf field int32 tag_length = 5; - */ - protected $tag_length = 0; - /** - * Optional. An optional CRC32C checksum of the - * [RawDecryptRequest.ciphertext][google.cloud.kms.v1.RawDecryptRequest.ciphertext]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received ciphertext using this checksum. - * [KeyManagementService][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $ciphertext_crc32c = null; - /** - * Optional. An optional CRC32C checksum of the - * [RawDecryptRequest.additional_authenticated_data][google.cloud.kms.v1.RawDecryptRequest.additional_authenticated_data]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received additional_authenticated_data using - * this checksum. - * [KeyManagementService][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value additional_authenticated_data_crc32c = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $additional_authenticated_data_crc32c = null; - /** - * Optional. An optional CRC32C checksum of the - * [RawDecryptRequest.initialization_vector][google.cloud.kms.v1.RawDecryptRequest.initialization_vector]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received initialization_vector using this - * checksum. [KeyManagementService][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value initialization_vector_crc32c = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $initialization_vector_crc32c = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for - * decryption. - * @type string $ciphertext - * Required. The encrypted data originally returned in - * [RawEncryptResponse.ciphertext][google.cloud.kms.v1.RawEncryptResponse.ciphertext]. - * @type string $additional_authenticated_data - * Optional. Optional data that must match the data originally supplied in - * [RawEncryptRequest.additional_authenticated_data][google.cloud.kms.v1.RawEncryptRequest.additional_authenticated_data]. - * @type string $initialization_vector - * Required. The initialization vector (IV) used during encryption, which must - * match the data originally provided in - * [RawEncryptResponse.initialization_vector][google.cloud.kms.v1.RawEncryptResponse.initialization_vector]. - * @type int $tag_length - * 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). - * @type \Google\Protobuf\Int64Value $ciphertext_crc32c - * Optional. An optional CRC32C checksum of the - * [RawDecryptRequest.ciphertext][google.cloud.kms.v1.RawDecryptRequest.ciphertext]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received ciphertext using this checksum. - * [KeyManagementService][google.cloud.kms.v1.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. - * @type \Google\Protobuf\Int64Value $additional_authenticated_data_crc32c - * Optional. An optional CRC32C checksum of the - * [RawDecryptRequest.additional_authenticated_data][google.cloud.kms.v1.RawDecryptRequest.additional_authenticated_data]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received additional_authenticated_data using - * this checksum. - * [KeyManagementService][google.cloud.kms.v1.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. - * @type \Google\Protobuf\Int64Value $initialization_vector_crc32c - * Optional. An optional CRC32C checksum of the - * [RawDecryptRequest.initialization_vector][google.cloud.kms.v1.RawDecryptRequest.initialization_vector]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received initialization_vector using this - * checksum. [KeyManagementService][google.cloud.kms.v1.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. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for - * decryption. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for - * decryption. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. The encrypted data originally returned in - * [RawEncryptResponse.ciphertext][google.cloud.kms.v1.RawEncryptResponse.ciphertext]. - * - * Generated from protobuf field bytes ciphertext = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getCiphertext() - { - return $this->ciphertext; - } - - /** - * Required. The encrypted data originally returned in - * [RawEncryptResponse.ciphertext][google.cloud.kms.v1.RawEncryptResponse.ciphertext]. - * - * Generated from protobuf field bytes ciphertext = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setCiphertext($var) - { - GPBUtil::checkString($var, False); - $this->ciphertext = $var; - - return $this; - } - - /** - * Optional. Optional data that must match the data originally supplied in - * [RawEncryptRequest.additional_authenticated_data][google.cloud.kms.v1.RawEncryptRequest.additional_authenticated_data]. - * - * Generated from protobuf field bytes additional_authenticated_data = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getAdditionalAuthenticatedData() - { - return $this->additional_authenticated_data; - } - - /** - * Optional. Optional data that must match the data originally supplied in - * [RawEncryptRequest.additional_authenticated_data][google.cloud.kms.v1.RawEncryptRequest.additional_authenticated_data]. - * - * Generated from protobuf field bytes additional_authenticated_data = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setAdditionalAuthenticatedData($var) - { - GPBUtil::checkString($var, False); - $this->additional_authenticated_data = $var; - - return $this; - } - - /** - * Required. The initialization vector (IV) used during encryption, which must - * match the data originally provided in - * [RawEncryptResponse.initialization_vector][google.cloud.kms.v1.RawEncryptResponse.initialization_vector]. - * - * Generated from protobuf field bytes initialization_vector = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getInitializationVector() - { - return $this->initialization_vector; - } - - /** - * Required. The initialization vector (IV) used during encryption, which must - * match the data originally provided in - * [RawEncryptResponse.initialization_vector][google.cloud.kms.v1.RawEncryptResponse.initialization_vector]. - * - * Generated from protobuf field bytes initialization_vector = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setInitializationVector($var) - { - GPBUtil::checkString($var, False); - $this->initialization_vector = $var; - - return $this; - } - - /** - * 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). - * - * Generated from protobuf field int32 tag_length = 5; - * @return int - */ - public function getTagLength() - { - return $this->tag_length; - } - - /** - * 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). - * - * Generated from protobuf field int32 tag_length = 5; - * @param int $var - * @return $this - */ - public function setTagLength($var) - { - GPBUtil::checkInt32($var); - $this->tag_length = $var; - - return $this; - } - - /** - * Optional. An optional CRC32C checksum of the - * [RawDecryptRequest.ciphertext][google.cloud.kms.v1.RawDecryptRequest.ciphertext]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received ciphertext using this checksum. - * [KeyManagementService][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Int64Value|null - */ - public function getCiphertextCrc32C() - { - return $this->ciphertext_crc32c; - } - - public function hasCiphertextCrc32C() - { - return isset($this->ciphertext_crc32c); - } - - public function clearCiphertextCrc32C() - { - unset($this->ciphertext_crc32c); - } - - /** - * Returns the unboxed value from getCiphertextCrc32C() - - * Optional. An optional CRC32C checksum of the - * [RawDecryptRequest.ciphertext][google.cloud.kms.v1.RawDecryptRequest.ciphertext]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received ciphertext using this checksum. - * [KeyManagementService][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return int|string|null - */ - public function getCiphertextCrc32CUnwrapped() - { - return $this->readWrapperValue("ciphertext_crc32c"); - } - - /** - * Optional. An optional CRC32C checksum of the - * [RawDecryptRequest.ciphertext][google.cloud.kms.v1.RawDecryptRequest.ciphertext]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received ciphertext using this checksum. - * [KeyManagementService][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Int64Value $var - * @return $this - */ - public function setCiphertextCrc32C($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); - $this->ciphertext_crc32c = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. - - * Optional. An optional CRC32C checksum of the - * [RawDecryptRequest.ciphertext][google.cloud.kms.v1.RawDecryptRequest.ciphertext]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received ciphertext using this checksum. - * [KeyManagementService][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param int|string|null $var - * @return $this - */ - public function setCiphertextCrc32CUnwrapped($var) - { - $this->writeWrapperValue("ciphertext_crc32c", $var); - return $this;} - - /** - * Optional. An optional CRC32C checksum of the - * [RawDecryptRequest.additional_authenticated_data][google.cloud.kms.v1.RawDecryptRequest.additional_authenticated_data]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received additional_authenticated_data using - * this checksum. - * [KeyManagementService][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value additional_authenticated_data_crc32c = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Int64Value|null - */ - public function getAdditionalAuthenticatedDataCrc32C() - { - return $this->additional_authenticated_data_crc32c; - } - - public function hasAdditionalAuthenticatedDataCrc32C() - { - return isset($this->additional_authenticated_data_crc32c); - } - - public function clearAdditionalAuthenticatedDataCrc32C() - { - unset($this->additional_authenticated_data_crc32c); - } - - /** - * Returns the unboxed value from getAdditionalAuthenticatedDataCrc32C() - - * Optional. An optional CRC32C checksum of the - * [RawDecryptRequest.additional_authenticated_data][google.cloud.kms.v1.RawDecryptRequest.additional_authenticated_data]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received additional_authenticated_data using - * this checksum. - * [KeyManagementService][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value additional_authenticated_data_crc32c = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return int|string|null - */ - public function getAdditionalAuthenticatedDataCrc32CUnwrapped() - { - return $this->readWrapperValue("additional_authenticated_data_crc32c"); - } - - /** - * Optional. An optional CRC32C checksum of the - * [RawDecryptRequest.additional_authenticated_data][google.cloud.kms.v1.RawDecryptRequest.additional_authenticated_data]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received additional_authenticated_data using - * this checksum. - * [KeyManagementService][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value additional_authenticated_data_crc32c = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Int64Value $var - * @return $this - */ - public function setAdditionalAuthenticatedDataCrc32C($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); - $this->additional_authenticated_data_crc32c = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. - - * Optional. An optional CRC32C checksum of the - * [RawDecryptRequest.additional_authenticated_data][google.cloud.kms.v1.RawDecryptRequest.additional_authenticated_data]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received additional_authenticated_data using - * this checksum. - * [KeyManagementService][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value additional_authenticated_data_crc32c = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param int|string|null $var - * @return $this - */ - public function setAdditionalAuthenticatedDataCrc32CUnwrapped($var) - { - $this->writeWrapperValue("additional_authenticated_data_crc32c", $var); - return $this;} - - /** - * Optional. An optional CRC32C checksum of the - * [RawDecryptRequest.initialization_vector][google.cloud.kms.v1.RawDecryptRequest.initialization_vector]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received initialization_vector using this - * checksum. [KeyManagementService][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value initialization_vector_crc32c = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Int64Value|null - */ - public function getInitializationVectorCrc32C() - { - return $this->initialization_vector_crc32c; - } - - public function hasInitializationVectorCrc32C() - { - return isset($this->initialization_vector_crc32c); - } - - public function clearInitializationVectorCrc32C() - { - unset($this->initialization_vector_crc32c); - } - - /** - * Returns the unboxed value from getInitializationVectorCrc32C() - - * Optional. An optional CRC32C checksum of the - * [RawDecryptRequest.initialization_vector][google.cloud.kms.v1.RawDecryptRequest.initialization_vector]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received initialization_vector using this - * checksum. [KeyManagementService][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value initialization_vector_crc32c = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return int|string|null - */ - public function getInitializationVectorCrc32CUnwrapped() - { - return $this->readWrapperValue("initialization_vector_crc32c"); - } - - /** - * Optional. An optional CRC32C checksum of the - * [RawDecryptRequest.initialization_vector][google.cloud.kms.v1.RawDecryptRequest.initialization_vector]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received initialization_vector using this - * checksum. [KeyManagementService][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value initialization_vector_crc32c = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Int64Value $var - * @return $this - */ - public function setInitializationVectorCrc32C($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); - $this->initialization_vector_crc32c = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. - - * Optional. An optional CRC32C checksum of the - * [RawDecryptRequest.initialization_vector][google.cloud.kms.v1.RawDecryptRequest.initialization_vector]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received initialization_vector using this - * checksum. [KeyManagementService][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value initialization_vector_crc32c = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param int|string|null $var - * @return $this - */ - public function setInitializationVectorCrc32CUnwrapped($var) - { - $this->writeWrapperValue("initialization_vector_crc32c", $var); - return $this;} - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/RawDecryptResponse.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/RawDecryptResponse.php deleted file mode 100644 index 6ce9ba157ce9..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/RawDecryptResponse.php +++ /dev/null @@ -1,511 +0,0 @@ -google.cloud.kms.v1.RawDecryptResponse - */ -class RawDecryptResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The decrypted data. - * - * Generated from protobuf field bytes plaintext = 1; - */ - protected $plaintext = ''; - /** - * Integrity verification field. A CRC32C checksum of the returned - * [RawDecryptResponse.plaintext][google.cloud.kms.v1.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][google.cloud.kms.v1.KeyManagementService] is able to - * successfully decrypt the - * [ciphertext][google.cloud.kms.v1.RawDecryptRequest.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. - * - * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 2; - */ - protected $plaintext_crc32c = null; - /** - * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in - * decryption. - * - * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 3; - */ - protected $protection_level = 0; - /** - * Integrity verification field. A flag indicating whether - * [RawDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.RawDecryptRequest.ciphertext_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of the ciphertext. A false value of this - * field indicates either that - * [RawDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.RawDecryptRequest.ciphertext_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [RawDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.RawDecryptRequest.ciphertext_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * - * Generated from protobuf field bool verified_ciphertext_crc32c = 4; - */ - protected $verified_ciphertext_crc32c = false; - /** - * Integrity verification field. A flag indicating whether - * [RawDecryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.RawDecryptRequest.additional_authenticated_data_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.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][google.cloud.kms.v1.RawDecryptRequest.additional_authenticated_data_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [RawDecryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.RawDecryptRequest.additional_authenticated_data_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * - * Generated from protobuf field bool verified_additional_authenticated_data_crc32c = 5; - */ - protected $verified_additional_authenticated_data_crc32c = false; - /** - * Integrity verification field. A flag indicating whether - * [RawDecryptRequest.initialization_vector_crc32c][google.cloud.kms.v1.RawDecryptRequest.initialization_vector_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of initialization_vector. A false value of - * this field indicates either that - * [RawDecryptRequest.initialization_vector_crc32c][google.cloud.kms.v1.RawDecryptRequest.initialization_vector_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [RawDecryptRequest.initialization_vector_crc32c][google.cloud.kms.v1.RawDecryptRequest.initialization_vector_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * - * Generated from protobuf field bool verified_initialization_vector_crc32c = 6; - */ - protected $verified_initialization_vector_crc32c = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $plaintext - * The decrypted data. - * @type \Google\Protobuf\Int64Value $plaintext_crc32c - * Integrity verification field. A CRC32C checksum of the returned - * [RawDecryptResponse.plaintext][google.cloud.kms.v1.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][google.cloud.kms.v1.KeyManagementService] is able to - * successfully decrypt the - * [ciphertext][google.cloud.kms.v1.RawDecryptRequest.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. - * @type int $protection_level - * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in - * decryption. - * @type bool $verified_ciphertext_crc32c - * Integrity verification field. A flag indicating whether - * [RawDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.RawDecryptRequest.ciphertext_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of the ciphertext. A false value of this - * field indicates either that - * [RawDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.RawDecryptRequest.ciphertext_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [RawDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.RawDecryptRequest.ciphertext_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * @type bool $verified_additional_authenticated_data_crc32c - * Integrity verification field. A flag indicating whether - * [RawDecryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.RawDecryptRequest.additional_authenticated_data_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.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][google.cloud.kms.v1.RawDecryptRequest.additional_authenticated_data_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [RawDecryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.RawDecryptRequest.additional_authenticated_data_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * @type bool $verified_initialization_vector_crc32c - * Integrity verification field. A flag indicating whether - * [RawDecryptRequest.initialization_vector_crc32c][google.cloud.kms.v1.RawDecryptRequest.initialization_vector_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of initialization_vector. A false value of - * this field indicates either that - * [RawDecryptRequest.initialization_vector_crc32c][google.cloud.kms.v1.RawDecryptRequest.initialization_vector_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [RawDecryptRequest.initialization_vector_crc32c][google.cloud.kms.v1.RawDecryptRequest.initialization_vector_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * The decrypted data. - * - * Generated from protobuf field bytes plaintext = 1; - * @return string - */ - public function getPlaintext() - { - return $this->plaintext; - } - - /** - * The decrypted data. - * - * Generated from protobuf field bytes plaintext = 1; - * @param string $var - * @return $this - */ - public function setPlaintext($var) - { - GPBUtil::checkString($var, False); - $this->plaintext = $var; - - return $this; - } - - /** - * Integrity verification field. A CRC32C checksum of the returned - * [RawDecryptResponse.plaintext][google.cloud.kms.v1.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][google.cloud.kms.v1.KeyManagementService] is able to - * successfully decrypt the - * [ciphertext][google.cloud.kms.v1.RawDecryptRequest.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. - * - * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 2; - * @return \Google\Protobuf\Int64Value|null - */ - public function getPlaintextCrc32C() - { - return $this->plaintext_crc32c; - } - - public function hasPlaintextCrc32C() - { - return isset($this->plaintext_crc32c); - } - - public function clearPlaintextCrc32C() - { - unset($this->plaintext_crc32c); - } - - /** - * Returns the unboxed value from getPlaintextCrc32C() - - * Integrity verification field. A CRC32C checksum of the returned - * [RawDecryptResponse.plaintext][google.cloud.kms.v1.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][google.cloud.kms.v1.KeyManagementService] is able to - * successfully decrypt the - * [ciphertext][google.cloud.kms.v1.RawDecryptRequest.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. - * - * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 2; - * @return int|string|null - */ - public function getPlaintextCrc32CUnwrapped() - { - return $this->readWrapperValue("plaintext_crc32c"); - } - - /** - * Integrity verification field. A CRC32C checksum of the returned - * [RawDecryptResponse.plaintext][google.cloud.kms.v1.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][google.cloud.kms.v1.KeyManagementService] is able to - * successfully decrypt the - * [ciphertext][google.cloud.kms.v1.RawDecryptRequest.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. - * - * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 2; - * @param \Google\Protobuf\Int64Value $var - * @return $this - */ - public function setPlaintextCrc32C($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); - $this->plaintext_crc32c = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. - - * Integrity verification field. A CRC32C checksum of the returned - * [RawDecryptResponse.plaintext][google.cloud.kms.v1.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][google.cloud.kms.v1.KeyManagementService] is able to - * successfully decrypt the - * [ciphertext][google.cloud.kms.v1.RawDecryptRequest.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. - * - * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 2; - * @param int|string|null $var - * @return $this - */ - public function setPlaintextCrc32CUnwrapped($var) - { - $this->writeWrapperValue("plaintext_crc32c", $var); - return $this;} - - /** - * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in - * decryption. - * - * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 3; - * @return int - */ - public function getProtectionLevel() - { - return $this->protection_level; - } - - /** - * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in - * decryption. - * - * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 3; - * @param int $var - * @return $this - */ - public function setProtectionLevel($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\ProtectionLevel::class); - $this->protection_level = $var; - - return $this; - } - - /** - * Integrity verification field. A flag indicating whether - * [RawDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.RawDecryptRequest.ciphertext_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of the ciphertext. A false value of this - * field indicates either that - * [RawDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.RawDecryptRequest.ciphertext_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [RawDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.RawDecryptRequest.ciphertext_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * - * Generated from protobuf field bool verified_ciphertext_crc32c = 4; - * @return bool - */ - public function getVerifiedCiphertextCrc32C() - { - return $this->verified_ciphertext_crc32c; - } - - /** - * Integrity verification field. A flag indicating whether - * [RawDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.RawDecryptRequest.ciphertext_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of the ciphertext. A false value of this - * field indicates either that - * [RawDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.RawDecryptRequest.ciphertext_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [RawDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.RawDecryptRequest.ciphertext_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * - * Generated from protobuf field bool verified_ciphertext_crc32c = 4; - * @param bool $var - * @return $this - */ - public function setVerifiedCiphertextCrc32C($var) - { - GPBUtil::checkBool($var); - $this->verified_ciphertext_crc32c = $var; - - return $this; - } - - /** - * Integrity verification field. A flag indicating whether - * [RawDecryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.RawDecryptRequest.additional_authenticated_data_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.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][google.cloud.kms.v1.RawDecryptRequest.additional_authenticated_data_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [RawDecryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.RawDecryptRequest.additional_authenticated_data_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * - * Generated from protobuf field bool verified_additional_authenticated_data_crc32c = 5; - * @return bool - */ - public function getVerifiedAdditionalAuthenticatedDataCrc32C() - { - return $this->verified_additional_authenticated_data_crc32c; - } - - /** - * Integrity verification field. A flag indicating whether - * [RawDecryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.RawDecryptRequest.additional_authenticated_data_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.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][google.cloud.kms.v1.RawDecryptRequest.additional_authenticated_data_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [RawDecryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.RawDecryptRequest.additional_authenticated_data_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * - * Generated from protobuf field bool verified_additional_authenticated_data_crc32c = 5; - * @param bool $var - * @return $this - */ - public function setVerifiedAdditionalAuthenticatedDataCrc32C($var) - { - GPBUtil::checkBool($var); - $this->verified_additional_authenticated_data_crc32c = $var; - - return $this; - } - - /** - * Integrity verification field. A flag indicating whether - * [RawDecryptRequest.initialization_vector_crc32c][google.cloud.kms.v1.RawDecryptRequest.initialization_vector_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of initialization_vector. A false value of - * this field indicates either that - * [RawDecryptRequest.initialization_vector_crc32c][google.cloud.kms.v1.RawDecryptRequest.initialization_vector_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [RawDecryptRequest.initialization_vector_crc32c][google.cloud.kms.v1.RawDecryptRequest.initialization_vector_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * - * Generated from protobuf field bool verified_initialization_vector_crc32c = 6; - * @return bool - */ - public function getVerifiedInitializationVectorCrc32C() - { - return $this->verified_initialization_vector_crc32c; - } - - /** - * Integrity verification field. A flag indicating whether - * [RawDecryptRequest.initialization_vector_crc32c][google.cloud.kms.v1.RawDecryptRequest.initialization_vector_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of initialization_vector. A false value of - * this field indicates either that - * [RawDecryptRequest.initialization_vector_crc32c][google.cloud.kms.v1.RawDecryptRequest.initialization_vector_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [RawDecryptRequest.initialization_vector_crc32c][google.cloud.kms.v1.RawDecryptRequest.initialization_vector_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * - * Generated from protobuf field bool verified_initialization_vector_crc32c = 6; - * @param bool $var - * @return $this - */ - public function setVerifiedInitializationVectorCrc32C($var) - { - GPBUtil::checkBool($var); - $this->verified_initialization_vector_crc32c = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/RawEncryptRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/RawEncryptRequest.php deleted file mode 100644 index 1f1d581d1d0d..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/RawEncryptRequest.php +++ /dev/null @@ -1,743 +0,0 @@ -google.cloud.kms.v1.RawEncryptRequest - */ -class RawEncryptRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for - * encryption. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Required. The data to encrypt. Must be no larger than 64KiB. - * The maximum size depends on the key version's - * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]. - * For [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE] keys, the - * plaintext must be no larger than 64KiB. For - * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] keys, the combined length of - * the plaintext and additional_authenticated_data fields must be no larger - * than 8KiB. - * - * Generated from protobuf field bytes plaintext = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $plaintext = ''; - /** - * Optional. Optional data that, if specified, must also be provided during - * decryption through - * [RawDecryptRequest.additional_authenticated_data][google.cloud.kms.v1.RawDecryptRequest.additional_authenticated_data]. - * This field may only be used in conjunction with an - * [algorithm][google.cloud.kms.v1.CryptoKeyVersion.algorithm] that accepts - * additional authenticated data (for example, AES-GCM). - * The maximum size depends on the key version's - * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]. - * For [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE] keys, the - * plaintext must be no larger than 64KiB. For - * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] keys, the combined length of - * the plaintext and additional_authenticated_data fields must be no larger - * than 8KiB. - * - * Generated from protobuf field bytes additional_authenticated_data = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $additional_authenticated_data = ''; - /** - * Optional. An optional CRC32C checksum of the - * [RawEncryptRequest.plaintext][google.cloud.kms.v1.RawEncryptRequest.plaintext]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received plaintext using this checksum. - * [KeyManagementService][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $plaintext_crc32c = null; - /** - * Optional. An optional CRC32C checksum of the - * [RawEncryptRequest.additional_authenticated_data][google.cloud.kms.v1.RawEncryptRequest.additional_authenticated_data]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received additional_authenticated_data using - * this checksum. - * [KeyManagementService][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value additional_authenticated_data_crc32c = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $additional_authenticated_data_crc32c = null; - /** - * 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][google.cloud.kms.v1.RawEncryptResponse.initialization_vector]. - * - * Generated from protobuf field bytes initialization_vector = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $initialization_vector = ''; - /** - * Optional. An optional CRC32C checksum of the - * [RawEncryptRequest.initialization_vector][google.cloud.kms.v1.RawEncryptRequest.initialization_vector]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received initialization_vector using this - * checksum. [KeyManagementService][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value initialization_vector_crc32c = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $initialization_vector_crc32c = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for - * encryption. - * @type string $plaintext - * Required. The data to encrypt. Must be no larger than 64KiB. - * The maximum size depends on the key version's - * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]. - * For [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE] keys, the - * plaintext must be no larger than 64KiB. For - * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] keys, the combined length of - * the plaintext and additional_authenticated_data fields must be no larger - * than 8KiB. - * @type string $additional_authenticated_data - * Optional. Optional data that, if specified, must also be provided during - * decryption through - * [RawDecryptRequest.additional_authenticated_data][google.cloud.kms.v1.RawDecryptRequest.additional_authenticated_data]. - * This field may only be used in conjunction with an - * [algorithm][google.cloud.kms.v1.CryptoKeyVersion.algorithm] that accepts - * additional authenticated data (for example, AES-GCM). - * The maximum size depends on the key version's - * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]. - * For [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE] keys, the - * plaintext must be no larger than 64KiB. For - * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] keys, the combined length of - * the plaintext and additional_authenticated_data fields must be no larger - * than 8KiB. - * @type \Google\Protobuf\Int64Value $plaintext_crc32c - * Optional. An optional CRC32C checksum of the - * [RawEncryptRequest.plaintext][google.cloud.kms.v1.RawEncryptRequest.plaintext]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received plaintext using this checksum. - * [KeyManagementService][google.cloud.kms.v1.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. - * @type \Google\Protobuf\Int64Value $additional_authenticated_data_crc32c - * Optional. An optional CRC32C checksum of the - * [RawEncryptRequest.additional_authenticated_data][google.cloud.kms.v1.RawEncryptRequest.additional_authenticated_data]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received additional_authenticated_data using - * this checksum. - * [KeyManagementService][google.cloud.kms.v1.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. - * @type string $initialization_vector - * 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][google.cloud.kms.v1.RawEncryptResponse.initialization_vector]. - * @type \Google\Protobuf\Int64Value $initialization_vector_crc32c - * Optional. An optional CRC32C checksum of the - * [RawEncryptRequest.initialization_vector][google.cloud.kms.v1.RawEncryptRequest.initialization_vector]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received initialization_vector using this - * checksum. [KeyManagementService][google.cloud.kms.v1.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. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for - * encryption. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for - * encryption. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. The data to encrypt. Must be no larger than 64KiB. - * The maximum size depends on the key version's - * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]. - * For [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE] keys, the - * plaintext must be no larger than 64KiB. For - * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] keys, the combined length of - * the plaintext and additional_authenticated_data fields must be no larger - * than 8KiB. - * - * Generated from protobuf field bytes plaintext = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getPlaintext() - { - return $this->plaintext; - } - - /** - * Required. The data to encrypt. Must be no larger than 64KiB. - * The maximum size depends on the key version's - * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]. - * For [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE] keys, the - * plaintext must be no larger than 64KiB. For - * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] keys, the combined length of - * the plaintext and additional_authenticated_data fields must be no larger - * than 8KiB. - * - * Generated from protobuf field bytes plaintext = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setPlaintext($var) - { - GPBUtil::checkString($var, False); - $this->plaintext = $var; - - return $this; - } - - /** - * Optional. Optional data that, if specified, must also be provided during - * decryption through - * [RawDecryptRequest.additional_authenticated_data][google.cloud.kms.v1.RawDecryptRequest.additional_authenticated_data]. - * This field may only be used in conjunction with an - * [algorithm][google.cloud.kms.v1.CryptoKeyVersion.algorithm] that accepts - * additional authenticated data (for example, AES-GCM). - * The maximum size depends on the key version's - * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]. - * For [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE] keys, the - * plaintext must be no larger than 64KiB. For - * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] keys, the combined length of - * the plaintext and additional_authenticated_data fields must be no larger - * than 8KiB. - * - * Generated from protobuf field bytes additional_authenticated_data = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getAdditionalAuthenticatedData() - { - return $this->additional_authenticated_data; - } - - /** - * Optional. Optional data that, if specified, must also be provided during - * decryption through - * [RawDecryptRequest.additional_authenticated_data][google.cloud.kms.v1.RawDecryptRequest.additional_authenticated_data]. - * This field may only be used in conjunction with an - * [algorithm][google.cloud.kms.v1.CryptoKeyVersion.algorithm] that accepts - * additional authenticated data (for example, AES-GCM). - * The maximum size depends on the key version's - * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]. - * For [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE] keys, the - * plaintext must be no larger than 64KiB. For - * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] keys, the combined length of - * the plaintext and additional_authenticated_data fields must be no larger - * than 8KiB. - * - * Generated from protobuf field bytes additional_authenticated_data = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setAdditionalAuthenticatedData($var) - { - GPBUtil::checkString($var, False); - $this->additional_authenticated_data = $var; - - return $this; - } - - /** - * Optional. An optional CRC32C checksum of the - * [RawEncryptRequest.plaintext][google.cloud.kms.v1.RawEncryptRequest.plaintext]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received plaintext using this checksum. - * [KeyManagementService][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Int64Value|null - */ - public function getPlaintextCrc32C() - { - return $this->plaintext_crc32c; - } - - public function hasPlaintextCrc32C() - { - return isset($this->plaintext_crc32c); - } - - public function clearPlaintextCrc32C() - { - unset($this->plaintext_crc32c); - } - - /** - * Returns the unboxed value from getPlaintextCrc32C() - - * Optional. An optional CRC32C checksum of the - * [RawEncryptRequest.plaintext][google.cloud.kms.v1.RawEncryptRequest.plaintext]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received plaintext using this checksum. - * [KeyManagementService][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return int|string|null - */ - public function getPlaintextCrc32CUnwrapped() - { - return $this->readWrapperValue("plaintext_crc32c"); - } - - /** - * Optional. An optional CRC32C checksum of the - * [RawEncryptRequest.plaintext][google.cloud.kms.v1.RawEncryptRequest.plaintext]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received plaintext using this checksum. - * [KeyManagementService][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Int64Value $var - * @return $this - */ - public function setPlaintextCrc32C($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); - $this->plaintext_crc32c = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. - - * Optional. An optional CRC32C checksum of the - * [RawEncryptRequest.plaintext][google.cloud.kms.v1.RawEncryptRequest.plaintext]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received plaintext using this checksum. - * [KeyManagementService][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param int|string|null $var - * @return $this - */ - public function setPlaintextCrc32CUnwrapped($var) - { - $this->writeWrapperValue("plaintext_crc32c", $var); - return $this;} - - /** - * Optional. An optional CRC32C checksum of the - * [RawEncryptRequest.additional_authenticated_data][google.cloud.kms.v1.RawEncryptRequest.additional_authenticated_data]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received additional_authenticated_data using - * this checksum. - * [KeyManagementService][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value additional_authenticated_data_crc32c = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Int64Value|null - */ - public function getAdditionalAuthenticatedDataCrc32C() - { - return $this->additional_authenticated_data_crc32c; - } - - public function hasAdditionalAuthenticatedDataCrc32C() - { - return isset($this->additional_authenticated_data_crc32c); - } - - public function clearAdditionalAuthenticatedDataCrc32C() - { - unset($this->additional_authenticated_data_crc32c); - } - - /** - * Returns the unboxed value from getAdditionalAuthenticatedDataCrc32C() - - * Optional. An optional CRC32C checksum of the - * [RawEncryptRequest.additional_authenticated_data][google.cloud.kms.v1.RawEncryptRequest.additional_authenticated_data]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received additional_authenticated_data using - * this checksum. - * [KeyManagementService][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value additional_authenticated_data_crc32c = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return int|string|null - */ - public function getAdditionalAuthenticatedDataCrc32CUnwrapped() - { - return $this->readWrapperValue("additional_authenticated_data_crc32c"); - } - - /** - * Optional. An optional CRC32C checksum of the - * [RawEncryptRequest.additional_authenticated_data][google.cloud.kms.v1.RawEncryptRequest.additional_authenticated_data]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received additional_authenticated_data using - * this checksum. - * [KeyManagementService][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value additional_authenticated_data_crc32c = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Int64Value $var - * @return $this - */ - public function setAdditionalAuthenticatedDataCrc32C($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); - $this->additional_authenticated_data_crc32c = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. - - * Optional. An optional CRC32C checksum of the - * [RawEncryptRequest.additional_authenticated_data][google.cloud.kms.v1.RawEncryptRequest.additional_authenticated_data]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received additional_authenticated_data using - * this checksum. - * [KeyManagementService][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value additional_authenticated_data_crc32c = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param int|string|null $var - * @return $this - */ - public function setAdditionalAuthenticatedDataCrc32CUnwrapped($var) - { - $this->writeWrapperValue("additional_authenticated_data_crc32c", $var); - return $this;} - - /** - * 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][google.cloud.kms.v1.RawEncryptResponse.initialization_vector]. - * - * Generated from protobuf field bytes initialization_vector = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getInitializationVector() - { - return $this->initialization_vector; - } - - /** - * 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][google.cloud.kms.v1.RawEncryptResponse.initialization_vector]. - * - * Generated from protobuf field bytes initialization_vector = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setInitializationVector($var) - { - GPBUtil::checkString($var, False); - $this->initialization_vector = $var; - - return $this; - } - - /** - * Optional. An optional CRC32C checksum of the - * [RawEncryptRequest.initialization_vector][google.cloud.kms.v1.RawEncryptRequest.initialization_vector]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received initialization_vector using this - * checksum. [KeyManagementService][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value initialization_vector_crc32c = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Int64Value|null - */ - public function getInitializationVectorCrc32C() - { - return $this->initialization_vector_crc32c; - } - - public function hasInitializationVectorCrc32C() - { - return isset($this->initialization_vector_crc32c); - } - - public function clearInitializationVectorCrc32C() - { - unset($this->initialization_vector_crc32c); - } - - /** - * Returns the unboxed value from getInitializationVectorCrc32C() - - * Optional. An optional CRC32C checksum of the - * [RawEncryptRequest.initialization_vector][google.cloud.kms.v1.RawEncryptRequest.initialization_vector]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received initialization_vector using this - * checksum. [KeyManagementService][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value initialization_vector_crc32c = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return int|string|null - */ - public function getInitializationVectorCrc32CUnwrapped() - { - return $this->readWrapperValue("initialization_vector_crc32c"); - } - - /** - * Optional. An optional CRC32C checksum of the - * [RawEncryptRequest.initialization_vector][google.cloud.kms.v1.RawEncryptRequest.initialization_vector]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received initialization_vector using this - * checksum. [KeyManagementService][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value initialization_vector_crc32c = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Int64Value $var - * @return $this - */ - public function setInitializationVectorCrc32C($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); - $this->initialization_vector_crc32c = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. - - * Optional. An optional CRC32C checksum of the - * [RawEncryptRequest.initialization_vector][google.cloud.kms.v1.RawEncryptRequest.initialization_vector]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received initialization_vector using this - * checksum. [KeyManagementService][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value initialization_vector_crc32c = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param int|string|null $var - * @return $this - */ - public function setInitializationVectorCrc32CUnwrapped($var) - { - $this->writeWrapperValue("initialization_vector_crc32c", $var); - return $this;} - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/RawEncryptResponse.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/RawEncryptResponse.php deleted file mode 100644 index b779e66f66c8..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/RawEncryptResponse.php +++ /dev/null @@ -1,744 +0,0 @@ -google.cloud.kms.v1.RawEncryptResponse - */ -class RawEncryptResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The encrypted data. In the case of AES-GCM, the authentication tag - * is the [tag_length][google.cloud.kms.v1.RawEncryptResponse.tag_length] - * bytes at the end of this field. - * - * Generated from protobuf field bytes ciphertext = 1; - */ - protected $ciphertext = ''; - /** - * The initialization vector (IV) generated by the service during - * encryption. This value must be stored and provided in - * [RawDecryptRequest.initialization_vector][google.cloud.kms.v1.RawDecryptRequest.initialization_vector] - * at decryption time. - * - * Generated from protobuf field bytes initialization_vector = 2; - */ - protected $initialization_vector = ''; - /** - * The length of the authentication tag that is appended to - * the end of the ciphertext. - * - * Generated from protobuf field int32 tag_length = 3; - */ - protected $tag_length = 0; - /** - * Integrity verification field. A CRC32C checksum of the returned - * [RawEncryptResponse.ciphertext][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 4; - */ - protected $ciphertext_crc32c = null; - /** - * Integrity verification field. A CRC32C checksum of the returned - * [RawEncryptResponse.initialization_vector][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value initialization_vector_crc32c = 5; - */ - protected $initialization_vector_crc32c = null; - /** - * Integrity verification field. A flag indicating whether - * [RawEncryptRequest.plaintext_crc32c][google.cloud.kms.v1.RawEncryptRequest.plaintext_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of the plaintext. A false value of this - * field indicates either that - * [RawEncryptRequest.plaintext_crc32c][google.cloud.kms.v1.RawEncryptRequest.plaintext_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [RawEncryptRequest.plaintext_crc32c][google.cloud.kms.v1.RawEncryptRequest.plaintext_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * - * Generated from protobuf field bool verified_plaintext_crc32c = 6; - */ - protected $verified_plaintext_crc32c = false; - /** - * Integrity verification field. A flag indicating whether - * [RawEncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.RawEncryptRequest.additional_authenticated_data_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.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][google.cloud.kms.v1.RawEncryptRequest.additional_authenticated_data_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [RawEncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.RawEncryptRequest.additional_authenticated_data_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * - * Generated from protobuf field bool verified_additional_authenticated_data_crc32c = 7; - */ - protected $verified_additional_authenticated_data_crc32c = false; - /** - * Integrity verification field. A flag indicating whether - * [RawEncryptRequest.initialization_vector_crc32c][google.cloud.kms.v1.RawEncryptRequest.initialization_vector_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of initialization_vector. A false value of - * this field indicates either that - * [RawEncryptRequest.initialization_vector_crc32c][google.cloud.kms.v1.RawEncryptRequest.initialization_vector_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [RawEncryptRequest.initialization_vector_crc32c][google.cloud.kms.v1.RawEncryptRequest.initialization_vector_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * - * Generated from protobuf field bool verified_initialization_vector_crc32c = 10; - */ - protected $verified_initialization_vector_crc32c = false; - /** - * The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in - * encryption. Check this field to verify that the intended resource was used - * for encryption. - * - * Generated from protobuf field string name = 8; - */ - protected $name = ''; - /** - * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in - * encryption. - * - * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 9; - */ - protected $protection_level = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $ciphertext - * The encrypted data. In the case of AES-GCM, the authentication tag - * is the [tag_length][google.cloud.kms.v1.RawEncryptResponse.tag_length] - * bytes at the end of this field. - * @type string $initialization_vector - * The initialization vector (IV) generated by the service during - * encryption. This value must be stored and provided in - * [RawDecryptRequest.initialization_vector][google.cloud.kms.v1.RawDecryptRequest.initialization_vector] - * at decryption time. - * @type int $tag_length - * The length of the authentication tag that is appended to - * the end of the ciphertext. - * @type \Google\Protobuf\Int64Value $ciphertext_crc32c - * Integrity verification field. A CRC32C checksum of the returned - * [RawEncryptResponse.ciphertext][google.cloud.kms.v1.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. - * @type \Google\Protobuf\Int64Value $initialization_vector_crc32c - * Integrity verification field. A CRC32C checksum of the returned - * [RawEncryptResponse.initialization_vector][google.cloud.kms.v1.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. - * @type bool $verified_plaintext_crc32c - * Integrity verification field. A flag indicating whether - * [RawEncryptRequest.plaintext_crc32c][google.cloud.kms.v1.RawEncryptRequest.plaintext_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of the plaintext. A false value of this - * field indicates either that - * [RawEncryptRequest.plaintext_crc32c][google.cloud.kms.v1.RawEncryptRequest.plaintext_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [RawEncryptRequest.plaintext_crc32c][google.cloud.kms.v1.RawEncryptRequest.plaintext_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * @type bool $verified_additional_authenticated_data_crc32c - * Integrity verification field. A flag indicating whether - * [RawEncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.RawEncryptRequest.additional_authenticated_data_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.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][google.cloud.kms.v1.RawEncryptRequest.additional_authenticated_data_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [RawEncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.RawEncryptRequest.additional_authenticated_data_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * @type bool $verified_initialization_vector_crc32c - * Integrity verification field. A flag indicating whether - * [RawEncryptRequest.initialization_vector_crc32c][google.cloud.kms.v1.RawEncryptRequest.initialization_vector_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of initialization_vector. A false value of - * this field indicates either that - * [RawEncryptRequest.initialization_vector_crc32c][google.cloud.kms.v1.RawEncryptRequest.initialization_vector_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [RawEncryptRequest.initialization_vector_crc32c][google.cloud.kms.v1.RawEncryptRequest.initialization_vector_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * @type string $name - * The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in - * encryption. Check this field to verify that the intended resource was used - * for encryption. - * @type int $protection_level - * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in - * encryption. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * The encrypted data. In the case of AES-GCM, the authentication tag - * is the [tag_length][google.cloud.kms.v1.RawEncryptResponse.tag_length] - * bytes at the end of this field. - * - * Generated from protobuf field bytes ciphertext = 1; - * @return string - */ - public function getCiphertext() - { - return $this->ciphertext; - } - - /** - * The encrypted data. In the case of AES-GCM, the authentication tag - * is the [tag_length][google.cloud.kms.v1.RawEncryptResponse.tag_length] - * bytes at the end of this field. - * - * Generated from protobuf field bytes ciphertext = 1; - * @param string $var - * @return $this - */ - public function setCiphertext($var) - { - GPBUtil::checkString($var, False); - $this->ciphertext = $var; - - return $this; - } - - /** - * The initialization vector (IV) generated by the service during - * encryption. This value must be stored and provided in - * [RawDecryptRequest.initialization_vector][google.cloud.kms.v1.RawDecryptRequest.initialization_vector] - * at decryption time. - * - * Generated from protobuf field bytes initialization_vector = 2; - * @return string - */ - public function getInitializationVector() - { - return $this->initialization_vector; - } - - /** - * The initialization vector (IV) generated by the service during - * encryption. This value must be stored and provided in - * [RawDecryptRequest.initialization_vector][google.cloud.kms.v1.RawDecryptRequest.initialization_vector] - * at decryption time. - * - * Generated from protobuf field bytes initialization_vector = 2; - * @param string $var - * @return $this - */ - public function setInitializationVector($var) - { - GPBUtil::checkString($var, False); - $this->initialization_vector = $var; - - return $this; - } - - /** - * The length of the authentication tag that is appended to - * the end of the ciphertext. - * - * Generated from protobuf field int32 tag_length = 3; - * @return int - */ - public function getTagLength() - { - return $this->tag_length; - } - - /** - * The length of the authentication tag that is appended to - * the end of the ciphertext. - * - * Generated from protobuf field int32 tag_length = 3; - * @param int $var - * @return $this - */ - public function setTagLength($var) - { - GPBUtil::checkInt32($var); - $this->tag_length = $var; - - return $this; - } - - /** - * Integrity verification field. A CRC32C checksum of the returned - * [RawEncryptResponse.ciphertext][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 4; - * @return \Google\Protobuf\Int64Value|null - */ - public function getCiphertextCrc32C() - { - return $this->ciphertext_crc32c; - } - - public function hasCiphertextCrc32C() - { - return isset($this->ciphertext_crc32c); - } - - public function clearCiphertextCrc32C() - { - unset($this->ciphertext_crc32c); - } - - /** - * Returns the unboxed value from getCiphertextCrc32C() - - * Integrity verification field. A CRC32C checksum of the returned - * [RawEncryptResponse.ciphertext][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 4; - * @return int|string|null - */ - public function getCiphertextCrc32CUnwrapped() - { - return $this->readWrapperValue("ciphertext_crc32c"); - } - - /** - * Integrity verification field. A CRC32C checksum of the returned - * [RawEncryptResponse.ciphertext][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 4; - * @param \Google\Protobuf\Int64Value $var - * @return $this - */ - public function setCiphertextCrc32C($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); - $this->ciphertext_crc32c = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. - - * Integrity verification field. A CRC32C checksum of the returned - * [RawEncryptResponse.ciphertext][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 4; - * @param int|string|null $var - * @return $this - */ - public function setCiphertextCrc32CUnwrapped($var) - { - $this->writeWrapperValue("ciphertext_crc32c", $var); - return $this;} - - /** - * Integrity verification field. A CRC32C checksum of the returned - * [RawEncryptResponse.initialization_vector][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value initialization_vector_crc32c = 5; - * @return \Google\Protobuf\Int64Value|null - */ - public function getInitializationVectorCrc32C() - { - return $this->initialization_vector_crc32c; - } - - public function hasInitializationVectorCrc32C() - { - return isset($this->initialization_vector_crc32c); - } - - public function clearInitializationVectorCrc32C() - { - unset($this->initialization_vector_crc32c); - } - - /** - * Returns the unboxed value from getInitializationVectorCrc32C() - - * Integrity verification field. A CRC32C checksum of the returned - * [RawEncryptResponse.initialization_vector][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value initialization_vector_crc32c = 5; - * @return int|string|null - */ - public function getInitializationVectorCrc32CUnwrapped() - { - return $this->readWrapperValue("initialization_vector_crc32c"); - } - - /** - * Integrity verification field. A CRC32C checksum of the returned - * [RawEncryptResponse.initialization_vector][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value initialization_vector_crc32c = 5; - * @param \Google\Protobuf\Int64Value $var - * @return $this - */ - public function setInitializationVectorCrc32C($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); - $this->initialization_vector_crc32c = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. - - * Integrity verification field. A CRC32C checksum of the returned - * [RawEncryptResponse.initialization_vector][google.cloud.kms.v1.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. - * - * Generated from protobuf field .google.protobuf.Int64Value initialization_vector_crc32c = 5; - * @param int|string|null $var - * @return $this - */ - public function setInitializationVectorCrc32CUnwrapped($var) - { - $this->writeWrapperValue("initialization_vector_crc32c", $var); - return $this;} - - /** - * Integrity verification field. A flag indicating whether - * [RawEncryptRequest.plaintext_crc32c][google.cloud.kms.v1.RawEncryptRequest.plaintext_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of the plaintext. A false value of this - * field indicates either that - * [RawEncryptRequest.plaintext_crc32c][google.cloud.kms.v1.RawEncryptRequest.plaintext_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [RawEncryptRequest.plaintext_crc32c][google.cloud.kms.v1.RawEncryptRequest.plaintext_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * - * Generated from protobuf field bool verified_plaintext_crc32c = 6; - * @return bool - */ - public function getVerifiedPlaintextCrc32C() - { - return $this->verified_plaintext_crc32c; - } - - /** - * Integrity verification field. A flag indicating whether - * [RawEncryptRequest.plaintext_crc32c][google.cloud.kms.v1.RawEncryptRequest.plaintext_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of the plaintext. A false value of this - * field indicates either that - * [RawEncryptRequest.plaintext_crc32c][google.cloud.kms.v1.RawEncryptRequest.plaintext_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [RawEncryptRequest.plaintext_crc32c][google.cloud.kms.v1.RawEncryptRequest.plaintext_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * - * Generated from protobuf field bool verified_plaintext_crc32c = 6; - * @param bool $var - * @return $this - */ - public function setVerifiedPlaintextCrc32C($var) - { - GPBUtil::checkBool($var); - $this->verified_plaintext_crc32c = $var; - - return $this; - } - - /** - * Integrity verification field. A flag indicating whether - * [RawEncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.RawEncryptRequest.additional_authenticated_data_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.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][google.cloud.kms.v1.RawEncryptRequest.additional_authenticated_data_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [RawEncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.RawEncryptRequest.additional_authenticated_data_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * - * Generated from protobuf field bool verified_additional_authenticated_data_crc32c = 7; - * @return bool - */ - public function getVerifiedAdditionalAuthenticatedDataCrc32C() - { - return $this->verified_additional_authenticated_data_crc32c; - } - - /** - * Integrity verification field. A flag indicating whether - * [RawEncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.RawEncryptRequest.additional_authenticated_data_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.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][google.cloud.kms.v1.RawEncryptRequest.additional_authenticated_data_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [RawEncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.RawEncryptRequest.additional_authenticated_data_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * - * Generated from protobuf field bool verified_additional_authenticated_data_crc32c = 7; - * @param bool $var - * @return $this - */ - public function setVerifiedAdditionalAuthenticatedDataCrc32C($var) - { - GPBUtil::checkBool($var); - $this->verified_additional_authenticated_data_crc32c = $var; - - return $this; - } - - /** - * Integrity verification field. A flag indicating whether - * [RawEncryptRequest.initialization_vector_crc32c][google.cloud.kms.v1.RawEncryptRequest.initialization_vector_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of initialization_vector. A false value of - * this field indicates either that - * [RawEncryptRequest.initialization_vector_crc32c][google.cloud.kms.v1.RawEncryptRequest.initialization_vector_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [RawEncryptRequest.initialization_vector_crc32c][google.cloud.kms.v1.RawEncryptRequest.initialization_vector_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * - * Generated from protobuf field bool verified_initialization_vector_crc32c = 10; - * @return bool - */ - public function getVerifiedInitializationVectorCrc32C() - { - return $this->verified_initialization_vector_crc32c; - } - - /** - * Integrity verification field. A flag indicating whether - * [RawEncryptRequest.initialization_vector_crc32c][google.cloud.kms.v1.RawEncryptRequest.initialization_vector_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of initialization_vector. A false value of - * this field indicates either that - * [RawEncryptRequest.initialization_vector_crc32c][google.cloud.kms.v1.RawEncryptRequest.initialization_vector_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [RawEncryptRequest.initialization_vector_crc32c][google.cloud.kms.v1.RawEncryptRequest.initialization_vector_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * - * Generated from protobuf field bool verified_initialization_vector_crc32c = 10; - * @param bool $var - * @return $this - */ - public function setVerifiedInitializationVectorCrc32C($var) - { - GPBUtil::checkBool($var); - $this->verified_initialization_vector_crc32c = $var; - - return $this; - } - - /** - * The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in - * encryption. Check this field to verify that the intended resource was used - * for encryption. - * - * Generated from protobuf field string name = 8; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in - * encryption. Check this field to verify that the intended resource was used - * for encryption. - * - * Generated from protobuf field string name = 8; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in - * encryption. - * - * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 9; - * @return int - */ - public function getProtectionLevel() - { - return $this->protection_level; - } - - /** - * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in - * encryption. - * - * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 9; - * @param int $var - * @return $this - */ - public function setProtectionLevel($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\ProtectionLevel::class); - $this->protection_level = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/RestoreCryptoKeyVersionRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/RestoreCryptoKeyVersionRequest.php deleted file mode 100644 index d62fe8e8863c..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/RestoreCryptoKeyVersionRequest.php +++ /dev/null @@ -1,87 +0,0 @@ -google.cloud.kms.v1.RestoreCryptoKeyVersionRequest - */ -class RestoreCryptoKeyVersionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to restore. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to restore. Please see - * {@see KeyManagementServiceClient::cryptoKeyVersionName()} for help formatting this field. - * - * @return \Google\Cloud\Kms\V1\RestoreCryptoKeyVersionRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to restore. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to restore. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to restore. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/RetiredResource.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/RetiredResource.php deleted file mode 100644 index c77dddde52b5..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/RetiredResource.php +++ /dev/null @@ -1,202 +0,0 @@ -google.cloud.kms.v1.RetiredResource - */ -class RetiredResource extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Identifier. The resource name for this - * [RetiredResource][google.cloud.kms.v1.RetiredResource] in the format - * `projects/*/locations/*/retiredResources/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Output only. The full resource name of the original - * [CryptoKey][google.cloud.kms.v1.CryptoKey] that was deleted in the format - * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. - * - * Generated from protobuf field string original_resource = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $original_resource = ''; - /** - * Output only. The resource type of the original deleted resource. - * - * Generated from protobuf field string resource_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $resource_type = ''; - /** - * Output only. The time at which the original resource was deleted and this - * RetiredResource record was created. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $delete_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. Identifier. The resource name for this - * [RetiredResource][google.cloud.kms.v1.RetiredResource] in the format - * `projects/*/locations/*/retiredResources/*`. - * @type string $original_resource - * Output only. The full resource name of the original - * [CryptoKey][google.cloud.kms.v1.CryptoKey] that was deleted in the format - * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. - * @type string $resource_type - * Output only. The resource type of the original deleted resource. - * @type \Google\Protobuf\Timestamp $delete_time - * Output only. The time at which the original resource was deleted and this - * RetiredResource record was created. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Identifier. The resource name for this - * [RetiredResource][google.cloud.kms.v1.RetiredResource] in the format - * `projects/*/locations/*/retiredResources/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. Identifier. The resource name for this - * [RetiredResource][google.cloud.kms.v1.RetiredResource] in the format - * `projects/*/locations/*/retiredResources/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. The full resource name of the original - * [CryptoKey][google.cloud.kms.v1.CryptoKey] that was deleted in the format - * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. - * - * Generated from protobuf field string original_resource = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getOriginalResource() - { - return $this->original_resource; - } - - /** - * Output only. The full resource name of the original - * [CryptoKey][google.cloud.kms.v1.CryptoKey] that was deleted in the format - * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. - * - * Generated from protobuf field string original_resource = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setOriginalResource($var) - { - GPBUtil::checkString($var, True); - $this->original_resource = $var; - - return $this; - } - - /** - * Output only. The resource type of the original deleted resource. - * - * Generated from protobuf field string resource_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getResourceType() - { - return $this->resource_type; - } - - /** - * Output only. The resource type of the original deleted resource. - * - * Generated from protobuf field string resource_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setResourceType($var) - { - GPBUtil::checkString($var, True); - $this->resource_type = $var; - - return $this; - } - - /** - * Output only. The time at which the original resource was deleted and this - * RetiredResource record was created. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getDeleteTime() - { - return $this->delete_time; - } - - public function hasDeleteTime() - { - return isset($this->delete_time); - } - - public function clearDeleteTime() - { - unset($this->delete_time); - } - - /** - * Output only. The time at which the original resource was deleted and this - * RetiredResource record was created. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setDeleteTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->delete_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ShowEffectiveAutokeyConfigRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ShowEffectiveAutokeyConfigRequest.php deleted file mode 100644 index d92a39db1b36..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ShowEffectiveAutokeyConfigRequest.php +++ /dev/null @@ -1,92 +0,0 @@ -google.cloud.kms.v1.ShowEffectiveAutokeyConfigRequest - */ -class ShowEffectiveAutokeyConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * 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. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - - /** - * @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. Please see - * {@see AutokeyAdminClient::projectName()} for help formatting this field. - * - * @return \Google\Cloud\Kms\V1\ShowEffectiveAutokeyConfigRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type 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. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\AutokeyAdmin::initOnce(); - parent::__construct($data); - } - - /** - * 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. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->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. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ShowEffectiveAutokeyConfigResponse.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ShowEffectiveAutokeyConfigResponse.php deleted file mode 100644 index 418d222e0779..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ShowEffectiveAutokeyConfigResponse.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.kms.v1.ShowEffectiveAutokeyConfigResponse - */ -class ShowEffectiveAutokeyConfigResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Name of the key project configured in the resource project's folder - * ancestry. - * - * Generated from protobuf field string key_project = 1; - */ - protected $key_project = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $key_project - * Name of the key project configured in the resource project's folder - * ancestry. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\AutokeyAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Name of the key project configured in the resource project's folder - * ancestry. - * - * Generated from protobuf field string key_project = 1; - * @return string - */ - public function getKeyProject() - { - return $this->key_project; - } - - /** - * Name of the key project configured in the resource project's folder - * ancestry. - * - * Generated from protobuf field string key_project = 1; - * @param string $var - * @return $this - */ - public function setKeyProject($var) - { - GPBUtil::checkString($var, True); - $this->key_project = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstance.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstance.php deleted file mode 100644 index b7749ab0b538..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstance.php +++ /dev/null @@ -1,395 +0,0 @@ -google.cloud.kms.v1.SingleTenantHsmInstance - */ -class SingleTenantHsmInstance extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. The resource name for this - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] in - * the format `projects/*/locations/*/singleTenantHsmInstances/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Output only. The time at which the - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] was - * created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The state of the - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. - * - * Generated from protobuf field .google.cloud.kms.v1.SingleTenantHsmInstance.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Required. The quorum auth configuration for the - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. - * - * Generated from protobuf field .google.cloud.kms.v1.SingleTenantHsmInstance.QuorumAuth quorum_auth = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $quorum_auth = null; - /** - * Output only. The time at which the - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] was - * deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $delete_time = null; - /** - * Output only. The system-defined duration that an instance can remain - * unrefreshed until it is automatically disabled. This will have a value of - * 120 days. - * - * Generated from protobuf field .google.protobuf.Duration unrefreshed_duration_until_disable = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $unrefreshed_duration_until_disable = null; - /** - * 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][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * before this time otherwise the - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] will - * become disabled. - * - * Generated from protobuf field .google.protobuf.Timestamp disable_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $disable_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. The resource name for this - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] in - * the format `projects/*/locations/*/singleTenantHsmInstances/*`. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time at which the - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] was - * created. - * @type int $state - * Output only. The state of the - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. - * @type \Google\Cloud\Kms\V1\SingleTenantHsmInstance\QuorumAuth $quorum_auth - * Required. The quorum auth configuration for the - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. - * @type \Google\Protobuf\Timestamp $delete_time - * Output only. The time at which the - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] was - * deleted. - * @type \Google\Protobuf\Duration $unrefreshed_duration_until_disable - * Output only. The system-defined duration that an instance can remain - * unrefreshed until it is automatically disabled. This will have a value of - * 120 days. - * @type \Google\Protobuf\Timestamp $disable_time - * 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][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * before this time otherwise the - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] will - * become disabled. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\HsmManagement::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. The resource name for this - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] in - * the format `projects/*/locations/*/singleTenantHsmInstances/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. The resource name for this - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] in - * the format `projects/*/locations/*/singleTenantHsmInstances/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. The time at which the - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] was - * created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time at which the - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] was - * created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The state of the - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. - * - * Generated from protobuf field .google.cloud.kms.v1.SingleTenantHsmInstance.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The state of the - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. - * - * Generated from protobuf field .google.cloud.kms.v1.SingleTenantHsmInstance.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\SingleTenantHsmInstance\State::class); - $this->state = $var; - - return $this; - } - - /** - * Required. The quorum auth configuration for the - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. - * - * Generated from protobuf field .google.cloud.kms.v1.SingleTenantHsmInstance.QuorumAuth quorum_auth = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Kms\V1\SingleTenantHsmInstance\QuorumAuth|null - */ - public function getQuorumAuth() - { - return $this->quorum_auth; - } - - public function hasQuorumAuth() - { - return isset($this->quorum_auth); - } - - public function clearQuorumAuth() - { - unset($this->quorum_auth); - } - - /** - * Required. The quorum auth configuration for the - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. - * - * Generated from protobuf field .google.cloud.kms.v1.SingleTenantHsmInstance.QuorumAuth quorum_auth = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Kms\V1\SingleTenantHsmInstance\QuorumAuth $var - * @return $this - */ - public function setQuorumAuth($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\SingleTenantHsmInstance\QuorumAuth::class); - $this->quorum_auth = $var; - - return $this; - } - - /** - * Output only. The time at which the - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] was - * deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getDeleteTime() - { - return $this->delete_time; - } - - public function hasDeleteTime() - { - return isset($this->delete_time); - } - - public function clearDeleteTime() - { - unset($this->delete_time); - } - - /** - * Output only. The time at which the - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] was - * deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setDeleteTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->delete_time = $var; - - return $this; - } - - /** - * Output only. The system-defined duration that an instance can remain - * unrefreshed until it is automatically disabled. This will have a value of - * 120 days. - * - * Generated from protobuf field .google.protobuf.Duration unrefreshed_duration_until_disable = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Duration|null - */ - public function getUnrefreshedDurationUntilDisable() - { - return $this->unrefreshed_duration_until_disable; - } - - public function hasUnrefreshedDurationUntilDisable() - { - return isset($this->unrefreshed_duration_until_disable); - } - - public function clearUnrefreshedDurationUntilDisable() - { - unset($this->unrefreshed_duration_until_disable); - } - - /** - * Output only. The system-defined duration that an instance can remain - * unrefreshed until it is automatically disabled. This will have a value of - * 120 days. - * - * Generated from protobuf field .google.protobuf.Duration unrefreshed_duration_until_disable = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setUnrefreshedDurationUntilDisable($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->unrefreshed_duration_until_disable = $var; - - return $this; - } - - /** - * 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][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * before this time otherwise the - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] will - * become disabled. - * - * Generated from protobuf field .google.protobuf.Timestamp disable_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getDisableTime() - { - return $this->disable_time; - } - - public function hasDisableTime() - { - return isset($this->disable_time); - } - - public function clearDisableTime() - { - unset($this->disable_time); - } - - /** - * 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][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * before this time otherwise the - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] will - * become disabled. - * - * Generated from protobuf field .google.protobuf.Timestamp disable_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setDisableTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->disable_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstance/QuorumAuth.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstance/QuorumAuth.php deleted file mode 100644 index 35e2c6dc0f2f..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstance/QuorumAuth.php +++ /dev/null @@ -1,166 +0,0 @@ -google.cloud.kms.v1.SingleTenantHsmInstance.QuorumAuth - */ -class QuorumAuth extends \Google\Protobuf\Internal\Message -{ - /** - * 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. - * - * Generated from protobuf field int32 total_approver_count = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $total_approver_count = 0; - /** - * 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][google.cloud.kms.v1.SingleTenantHsmInstance.QuorumAuth.total_approver_count] - * - 1. - * - * Generated from protobuf field int32 required_approver_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $required_approver_count = 0; - /** - * Output only. The public keys associated with the 2FA keys for M of N - * quorum auth. - * - * Generated from protobuf field repeated string two_factor_public_key_pems = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $two_factor_public_key_pems; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $total_approver_count - * 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. - * @type int $required_approver_count - * 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][google.cloud.kms.v1.SingleTenantHsmInstance.QuorumAuth.total_approver_count] - * - 1. - * @type array|\Google\Protobuf\Internal\RepeatedField $two_factor_public_key_pems - * Output only. The public keys associated with the 2FA keys for M of N - * quorum auth. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\HsmManagement::initOnce(); - parent::__construct($data); - } - - /** - * 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. - * - * Generated from protobuf field int32 total_approver_count = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getTotalApproverCount() - { - return $this->total_approver_count; - } - - /** - * 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. - * - * Generated from protobuf field int32 total_approver_count = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setTotalApproverCount($var) - { - GPBUtil::checkInt32($var); - $this->total_approver_count = $var; - - return $this; - } - - /** - * 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][google.cloud.kms.v1.SingleTenantHsmInstance.QuorumAuth.total_approver_count] - * - 1. - * - * Generated from protobuf field int32 required_approver_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getRequiredApproverCount() - { - return $this->required_approver_count; - } - - /** - * 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][google.cloud.kms.v1.SingleTenantHsmInstance.QuorumAuth.total_approver_count] - * - 1. - * - * Generated from protobuf field int32 required_approver_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setRequiredApproverCount($var) - { - GPBUtil::checkInt32($var); - $this->required_approver_count = $var; - - return $this; - } - - /** - * Output only. The public keys associated with the 2FA keys for M of N - * quorum auth. - * - * Generated from protobuf field repeated string two_factor_public_key_pems = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTwoFactorPublicKeyPems() - { - return $this->two_factor_public_key_pems; - } - - /** - * Output only. The public keys associated with the 2FA keys for M of N - * quorum auth. - * - * Generated from protobuf field repeated string two_factor_public_key_pems = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTwoFactorPublicKeyPems($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->two_factor_public_key_pems = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(QuorumAuth::class, \Google\Cloud\Kms\V1\SingleTenantHsmInstance_QuorumAuth::class); - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstance/State.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstance/State.php deleted file mode 100644 index 80c42d22719f..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstance/State.php +++ /dev/null @@ -1,131 +0,0 @@ -google.cloud.kms.v1.SingleTenantHsmInstance.State - */ -class State -{ - /** - * Not specified. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] is - * being created. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * The - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] is - * waiting for 2FA keys to be registered. This can be done by calling - * [CreateSingleTenantHsmInstanceProposal][google.cloud.kms.v1.HsmManagement.CreateSingleTenantHsmInstanceProposal] - * with the [RegisterTwoFactorAuthKeys][] operation. - * - * Generated from protobuf enum PENDING_TWO_FACTOR_AUTH_REGISTRATION = 2; - */ - const PENDING_TWO_FACTOR_AUTH_REGISTRATION = 2; - /** - * The - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] is - * ready to use. A - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] - * must be in the - * [ACTIVE][google.cloud.kms.v1.SingleTenantHsmInstance.State.ACTIVE] state - * for all [CryptoKeys][google.cloud.kms.v1.CryptoKey] created within the - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] to - * be usable. - * - * Generated from protobuf enum ACTIVE = 3; - */ - const ACTIVE = 3; - /** - * The - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] is - * being disabled. - * - * Generated from protobuf enum DISABLING = 4; - */ - const DISABLING = 4; - /** - * The - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] is - * disabled. - * - * Generated from protobuf enum DISABLED = 5; - */ - const DISABLED = 5; - /** - * The - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] is - * being deleted. Requests to the instance will be rejected in this state. - * - * Generated from protobuf enum DELETING = 6; - */ - const DELETING = 6; - /** - * The - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] - * has been deleted. - * - * Generated from protobuf enum DELETED = 7; - */ - const DELETED = 7; - /** - * The - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] - * has failed and can not be recovered or used. - * - * Generated from protobuf enum FAILED = 8; - */ - const FAILED = 8; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::PENDING_TWO_FACTOR_AUTH_REGISTRATION => 'PENDING_TWO_FACTOR_AUTH_REGISTRATION', - self::ACTIVE => 'ACTIVE', - self::DISABLING => 'DISABLING', - self::DISABLED => 'DISABLED', - self::DELETING => 'DELETING', - self::DELETED => 'DELETED', - self::FAILED => 'FAILED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\Kms\V1\SingleTenantHsmInstance_State::class); - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal.php deleted file mode 100644 index 084042a021a7..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal.php +++ /dev/null @@ -1,898 +0,0 @@ -google.cloud.kms.v1.SingleTenantHsmInstanceProposal - */ -class SingleTenantHsmInstanceProposal extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. The resource name for this - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] in - * the format `projects/*/locations/*/singleTenantHsmInstances/*/proposals/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Output only. The time at which the - * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The state of the - * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal]. - * - * Generated from protobuf field .google.cloud.kms.v1.SingleTenantHsmInstanceProposal.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. The root cause of the most recent failure. Only present if - * [state][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.state] is - * [FAILED][SingleTenantHsmInstanceProposal.FAILED]. - * - * Generated from protobuf field string failure_reason = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $failure_reason = ''; - /** - * Output only. The time at which the - * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * was deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $delete_time = null; - /** - * Output only. The time at which the soft-deleted - * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * will be permanently purged. This field is only populated - * when the state is DELETED and will be set a time after expiration of the - * proposal, i.e. >= expire_time or (create_time + ttl). - * - * Generated from protobuf field .google.protobuf.Timestamp purge_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $purge_time = null; - protected $approval_parameters; - protected $expiration; - protected $operation; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. The resource name for this - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] in - * the format `projects/*/locations/*/singleTenantHsmInstances/*/proposals/*`. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time at which the - * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * was created. - * @type int $state - * Output only. The state of the - * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal]. - * @type string $failure_reason - * Output only. The root cause of the most recent failure. Only present if - * [state][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.state] is - * [FAILED][SingleTenantHsmInstanceProposal.FAILED]. - * @type \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal\QuorumParameters $quorum_parameters - * Output only. The quorum approval parameters for the - * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal]. - * @type \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal\RequiredActionQuorumParameters $required_action_quorum_parameters - * Output only. Parameters for an approval of a - * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * that has both required challenges and a quorum. - * @type \Google\Protobuf\Timestamp $expire_time - * The time at which the - * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * will expire if not approved and executed. - * @type \Google\Protobuf\Duration $ttl - * Input only. The TTL for the - * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal]. - * Proposals will expire after this duration. - * @type \Google\Protobuf\Timestamp $delete_time - * Output only. The time at which the - * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * was deleted. - * @type \Google\Protobuf\Timestamp $purge_time - * Output only. The time at which the soft-deleted - * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * will be permanently purged. This field is only populated - * when the state is DELETED and will be set a time after expiration of the - * proposal, i.e. >= expire_time or (create_time + ttl). - * @type \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal\RegisterTwoFactorAuthKeys $register_two_factor_auth_keys - * Register 2FA keys for the - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. - * This operation requires all N Challenges to be signed by 2FA keys. The - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] - * must be in the - * [PENDING_TWO_FACTOR_AUTH_REGISTRATION][google.cloud.kms.v1.SingleTenantHsmInstance.State.PENDING_TWO_FACTOR_AUTH_REGISTRATION] - * state to perform this operation. - * @type \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal\DisableSingleTenantHsmInstance $disable_single_tenant_hsm_instance - * Disable the - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. - * The - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] - * must be in the - * [ACTIVE][google.cloud.kms.v1.SingleTenantHsmInstance.State.ACTIVE] state - * to perform this operation. - * @type \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal\EnableSingleTenantHsmInstance $enable_single_tenant_hsm_instance - * Enable the - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. - * The - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] - * must be in the - * [DISABLED][google.cloud.kms.v1.SingleTenantHsmInstance.State.DISABLED] - * state to perform this operation. - * @type \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal\DeleteSingleTenantHsmInstance $delete_single_tenant_hsm_instance - * Delete the - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. - * Deleting a - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] - * will make all [CryptoKeys][google.cloud.kms.v1.CryptoKey] attached to the - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] - * unusable. The - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] - * must be in the - * [DISABLED][google.cloud.kms.v1.SingleTenantHsmInstance.State.DISABLED] or - * [PENDING_TWO_FACTOR_AUTH_REGISTRATION][google.cloud.kms.v1.SingleTenantHsmInstance.State.PENDING_TWO_FACTOR_AUTH_REGISTRATION] - * state to perform this operation. - * @type \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal\AddQuorumMember $add_quorum_member - * Add a quorum member to the - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. - * This will increase the - * [total_approver_count][google.cloud.kms.v1.SingleTenantHsmInstance.QuorumAuth.total_approver_count] - * by 1. The - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] - * must be in the - * [ACTIVE][google.cloud.kms.v1.SingleTenantHsmInstance.State.ACTIVE] state - * to perform this operation. - * @type \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal\RemoveQuorumMember $remove_quorum_member - * Remove a quorum member from the - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. - * This will reduce - * [total_approver_count][google.cloud.kms.v1.SingleTenantHsmInstance.QuorumAuth.total_approver_count] - * by 1. The - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] - * must be in the - * [ACTIVE][google.cloud.kms.v1.SingleTenantHsmInstance.State.ACTIVE] state - * to perform this operation. - * @type \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal\RefreshSingleTenantHsmInstance $refresh_single_tenant_hsm_instance - * Refreshes the - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. - * This operation must be performed periodically to keep the - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] - * active. This operation must be performed before - * [unrefreshed_duration_until_disable][google.cloud.kms.v1.SingleTenantHsmInstance.unrefreshed_duration_until_disable] - * has passed. The - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] - * must be in the - * [ACTIVE][google.cloud.kms.v1.SingleTenantHsmInstance.State.ACTIVE] state - * to perform this operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\HsmManagement::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. The resource name for this - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] in - * the format `projects/*/locations/*/singleTenantHsmInstances/*/proposals/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. The resource name for this - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] in - * the format `projects/*/locations/*/singleTenantHsmInstances/*/proposals/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. The time at which the - * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time at which the - * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The state of the - * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal]. - * - * Generated from protobuf field .google.cloud.kms.v1.SingleTenantHsmInstanceProposal.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The state of the - * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal]. - * - * Generated from protobuf field .google.cloud.kms.v1.SingleTenantHsmInstanceProposal.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. The root cause of the most recent failure. Only present if - * [state][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.state] is - * [FAILED][SingleTenantHsmInstanceProposal.FAILED]. - * - * Generated from protobuf field string failure_reason = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getFailureReason() - { - return $this->failure_reason; - } - - /** - * Output only. The root cause of the most recent failure. Only present if - * [state][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.state] is - * [FAILED][SingleTenantHsmInstanceProposal.FAILED]. - * - * Generated from protobuf field string failure_reason = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setFailureReason($var) - { - GPBUtil::checkString($var, True); - $this->failure_reason = $var; - - return $this; - } - - /** - * Output only. The quorum approval parameters for the - * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal]. - * - * Generated from protobuf field .google.cloud.kms.v1.SingleTenantHsmInstanceProposal.QuorumParameters quorum_parameters = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal\QuorumParameters|null - */ - public function getQuorumParameters() - { - return $this->readOneof(5); - } - - public function hasQuorumParameters() - { - return $this->hasOneof(5); - } - - /** - * Output only. The quorum approval parameters for the - * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal]. - * - * Generated from protobuf field .google.cloud.kms.v1.SingleTenantHsmInstanceProposal.QuorumParameters quorum_parameters = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal\QuorumParameters $var - * @return $this - */ - public function setQuorumParameters($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal\QuorumParameters::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Output only. Parameters for an approval of a - * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * that has both required challenges and a quorum. - * - * Generated from protobuf field .google.cloud.kms.v1.SingleTenantHsmInstanceProposal.RequiredActionQuorumParameters required_action_quorum_parameters = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal\RequiredActionQuorumParameters|null - */ - public function getRequiredActionQuorumParameters() - { - return $this->readOneof(14); - } - - public function hasRequiredActionQuorumParameters() - { - return $this->hasOneof(14); - } - - /** - * Output only. Parameters for an approval of a - * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * that has both required challenges and a quorum. - * - * Generated from protobuf field .google.cloud.kms.v1.SingleTenantHsmInstanceProposal.RequiredActionQuorumParameters required_action_quorum_parameters = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal\RequiredActionQuorumParameters $var - * @return $this - */ - public function setRequiredActionQuorumParameters($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal\RequiredActionQuorumParameters::class); - $this->writeOneof(14, $var); - - return $this; - } - - /** - * The time at which the - * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * will expire if not approved and executed. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 6; - * @return \Google\Protobuf\Timestamp|null - */ - public function getExpireTime() - { - return $this->readOneof(6); - } - - public function hasExpireTime() - { - return $this->hasOneof(6); - } - - /** - * The time at which the - * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * will expire if not approved and executed. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 6; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setExpireTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Input only. The TTL for the - * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal]. - * Proposals will expire after this duration. - * - * Generated from protobuf field .google.protobuf.Duration ttl = 7 [(.google.api.field_behavior) = INPUT_ONLY]; - * @return \Google\Protobuf\Duration|null - */ - public function getTtl() - { - return $this->readOneof(7); - } - - public function hasTtl() - { - return $this->hasOneof(7); - } - - /** - * Input only. The TTL for the - * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal]. - * Proposals will expire after this duration. - * - * Generated from protobuf field .google.protobuf.Duration ttl = 7 [(.google.api.field_behavior) = INPUT_ONLY]; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setTtl($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * Output only. The time at which the - * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * was deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getDeleteTime() - { - return $this->delete_time; - } - - public function hasDeleteTime() - { - return isset($this->delete_time); - } - - public function clearDeleteTime() - { - unset($this->delete_time); - } - - /** - * Output only. The time at which the - * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * was deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setDeleteTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->delete_time = $var; - - return $this; - } - - /** - * Output only. The time at which the soft-deleted - * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * will be permanently purged. This field is only populated - * when the state is DELETED and will be set a time after expiration of the - * proposal, i.e. >= expire_time or (create_time + ttl). - * - * Generated from protobuf field .google.protobuf.Timestamp purge_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getPurgeTime() - { - return $this->purge_time; - } - - public function hasPurgeTime() - { - return isset($this->purge_time); - } - - public function clearPurgeTime() - { - unset($this->purge_time); - } - - /** - * Output only. The time at which the soft-deleted - * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * will be permanently purged. This field is only populated - * when the state is DELETED and will be set a time after expiration of the - * proposal, i.e. >= expire_time or (create_time + ttl). - * - * Generated from protobuf field .google.protobuf.Timestamp purge_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setPurgeTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->purge_time = $var; - - return $this; - } - - /** - * Register 2FA keys for the - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. - * This operation requires all N Challenges to be signed by 2FA keys. The - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] - * must be in the - * [PENDING_TWO_FACTOR_AUTH_REGISTRATION][google.cloud.kms.v1.SingleTenantHsmInstance.State.PENDING_TWO_FACTOR_AUTH_REGISTRATION] - * state to perform this operation. - * - * Generated from protobuf field .google.cloud.kms.v1.SingleTenantHsmInstanceProposal.RegisterTwoFactorAuthKeys register_two_factor_auth_keys = 8; - * @return \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal\RegisterTwoFactorAuthKeys|null - */ - public function getRegisterTwoFactorAuthKeys() - { - return $this->readOneof(8); - } - - public function hasRegisterTwoFactorAuthKeys() - { - return $this->hasOneof(8); - } - - /** - * Register 2FA keys for the - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. - * This operation requires all N Challenges to be signed by 2FA keys. The - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] - * must be in the - * [PENDING_TWO_FACTOR_AUTH_REGISTRATION][google.cloud.kms.v1.SingleTenantHsmInstance.State.PENDING_TWO_FACTOR_AUTH_REGISTRATION] - * state to perform this operation. - * - * Generated from protobuf field .google.cloud.kms.v1.SingleTenantHsmInstanceProposal.RegisterTwoFactorAuthKeys register_two_factor_auth_keys = 8; - * @param \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal\RegisterTwoFactorAuthKeys $var - * @return $this - */ - public function setRegisterTwoFactorAuthKeys($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal\RegisterTwoFactorAuthKeys::class); - $this->writeOneof(8, $var); - - return $this; - } - - /** - * Disable the - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. - * The - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] - * must be in the - * [ACTIVE][google.cloud.kms.v1.SingleTenantHsmInstance.State.ACTIVE] state - * to perform this operation. - * - * Generated from protobuf field .google.cloud.kms.v1.SingleTenantHsmInstanceProposal.DisableSingleTenantHsmInstance disable_single_tenant_hsm_instance = 9; - * @return \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal\DisableSingleTenantHsmInstance|null - */ - public function getDisableSingleTenantHsmInstance() - { - return $this->readOneof(9); - } - - public function hasDisableSingleTenantHsmInstance() - { - return $this->hasOneof(9); - } - - /** - * Disable the - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. - * The - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] - * must be in the - * [ACTIVE][google.cloud.kms.v1.SingleTenantHsmInstance.State.ACTIVE] state - * to perform this operation. - * - * Generated from protobuf field .google.cloud.kms.v1.SingleTenantHsmInstanceProposal.DisableSingleTenantHsmInstance disable_single_tenant_hsm_instance = 9; - * @param \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal\DisableSingleTenantHsmInstance $var - * @return $this - */ - public function setDisableSingleTenantHsmInstance($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal\DisableSingleTenantHsmInstance::class); - $this->writeOneof(9, $var); - - return $this; - } - - /** - * Enable the - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. - * The - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] - * must be in the - * [DISABLED][google.cloud.kms.v1.SingleTenantHsmInstance.State.DISABLED] - * state to perform this operation. - * - * Generated from protobuf field .google.cloud.kms.v1.SingleTenantHsmInstanceProposal.EnableSingleTenantHsmInstance enable_single_tenant_hsm_instance = 10; - * @return \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal\EnableSingleTenantHsmInstance|null - */ - public function getEnableSingleTenantHsmInstance() - { - return $this->readOneof(10); - } - - public function hasEnableSingleTenantHsmInstance() - { - return $this->hasOneof(10); - } - - /** - * Enable the - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. - * The - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] - * must be in the - * [DISABLED][google.cloud.kms.v1.SingleTenantHsmInstance.State.DISABLED] - * state to perform this operation. - * - * Generated from protobuf field .google.cloud.kms.v1.SingleTenantHsmInstanceProposal.EnableSingleTenantHsmInstance enable_single_tenant_hsm_instance = 10; - * @param \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal\EnableSingleTenantHsmInstance $var - * @return $this - */ - public function setEnableSingleTenantHsmInstance($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal\EnableSingleTenantHsmInstance::class); - $this->writeOneof(10, $var); - - return $this; - } - - /** - * Delete the - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. - * Deleting a - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] - * will make all [CryptoKeys][google.cloud.kms.v1.CryptoKey] attached to the - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] - * unusable. The - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] - * must be in the - * [DISABLED][google.cloud.kms.v1.SingleTenantHsmInstance.State.DISABLED] or - * [PENDING_TWO_FACTOR_AUTH_REGISTRATION][google.cloud.kms.v1.SingleTenantHsmInstance.State.PENDING_TWO_FACTOR_AUTH_REGISTRATION] - * state to perform this operation. - * - * Generated from protobuf field .google.cloud.kms.v1.SingleTenantHsmInstanceProposal.DeleteSingleTenantHsmInstance delete_single_tenant_hsm_instance = 11; - * @return \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal\DeleteSingleTenantHsmInstance|null - */ - public function getDeleteSingleTenantHsmInstance() - { - return $this->readOneof(11); - } - - public function hasDeleteSingleTenantHsmInstance() - { - return $this->hasOneof(11); - } - - /** - * Delete the - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. - * Deleting a - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] - * will make all [CryptoKeys][google.cloud.kms.v1.CryptoKey] attached to the - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] - * unusable. The - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] - * must be in the - * [DISABLED][google.cloud.kms.v1.SingleTenantHsmInstance.State.DISABLED] or - * [PENDING_TWO_FACTOR_AUTH_REGISTRATION][google.cloud.kms.v1.SingleTenantHsmInstance.State.PENDING_TWO_FACTOR_AUTH_REGISTRATION] - * state to perform this operation. - * - * Generated from protobuf field .google.cloud.kms.v1.SingleTenantHsmInstanceProposal.DeleteSingleTenantHsmInstance delete_single_tenant_hsm_instance = 11; - * @param \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal\DeleteSingleTenantHsmInstance $var - * @return $this - */ - public function setDeleteSingleTenantHsmInstance($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal\DeleteSingleTenantHsmInstance::class); - $this->writeOneof(11, $var); - - return $this; - } - - /** - * Add a quorum member to the - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. - * This will increase the - * [total_approver_count][google.cloud.kms.v1.SingleTenantHsmInstance.QuorumAuth.total_approver_count] - * by 1. The - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] - * must be in the - * [ACTIVE][google.cloud.kms.v1.SingleTenantHsmInstance.State.ACTIVE] state - * to perform this operation. - * - * Generated from protobuf field .google.cloud.kms.v1.SingleTenantHsmInstanceProposal.AddQuorumMember add_quorum_member = 12; - * @return \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal\AddQuorumMember|null - */ - public function getAddQuorumMember() - { - return $this->readOneof(12); - } - - public function hasAddQuorumMember() - { - return $this->hasOneof(12); - } - - /** - * Add a quorum member to the - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. - * This will increase the - * [total_approver_count][google.cloud.kms.v1.SingleTenantHsmInstance.QuorumAuth.total_approver_count] - * by 1. The - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] - * must be in the - * [ACTIVE][google.cloud.kms.v1.SingleTenantHsmInstance.State.ACTIVE] state - * to perform this operation. - * - * Generated from protobuf field .google.cloud.kms.v1.SingleTenantHsmInstanceProposal.AddQuorumMember add_quorum_member = 12; - * @param \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal\AddQuorumMember $var - * @return $this - */ - public function setAddQuorumMember($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal\AddQuorumMember::class); - $this->writeOneof(12, $var); - - return $this; - } - - /** - * Remove a quorum member from the - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. - * This will reduce - * [total_approver_count][google.cloud.kms.v1.SingleTenantHsmInstance.QuorumAuth.total_approver_count] - * by 1. The - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] - * must be in the - * [ACTIVE][google.cloud.kms.v1.SingleTenantHsmInstance.State.ACTIVE] state - * to perform this operation. - * - * Generated from protobuf field .google.cloud.kms.v1.SingleTenantHsmInstanceProposal.RemoveQuorumMember remove_quorum_member = 13; - * @return \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal\RemoveQuorumMember|null - */ - public function getRemoveQuorumMember() - { - return $this->readOneof(13); - } - - public function hasRemoveQuorumMember() - { - return $this->hasOneof(13); - } - - /** - * Remove a quorum member from the - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. - * This will reduce - * [total_approver_count][google.cloud.kms.v1.SingleTenantHsmInstance.QuorumAuth.total_approver_count] - * by 1. The - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] - * must be in the - * [ACTIVE][google.cloud.kms.v1.SingleTenantHsmInstance.State.ACTIVE] state - * to perform this operation. - * - * Generated from protobuf field .google.cloud.kms.v1.SingleTenantHsmInstanceProposal.RemoveQuorumMember remove_quorum_member = 13; - * @param \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal\RemoveQuorumMember $var - * @return $this - */ - public function setRemoveQuorumMember($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal\RemoveQuorumMember::class); - $this->writeOneof(13, $var); - - return $this; - } - - /** - * Refreshes the - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. - * This operation must be performed periodically to keep the - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] - * active. This operation must be performed before - * [unrefreshed_duration_until_disable][google.cloud.kms.v1.SingleTenantHsmInstance.unrefreshed_duration_until_disable] - * has passed. The - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] - * must be in the - * [ACTIVE][google.cloud.kms.v1.SingleTenantHsmInstance.State.ACTIVE] state - * to perform this operation. - * - * Generated from protobuf field .google.cloud.kms.v1.SingleTenantHsmInstanceProposal.RefreshSingleTenantHsmInstance refresh_single_tenant_hsm_instance = 17; - * @return \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal\RefreshSingleTenantHsmInstance|null - */ - public function getRefreshSingleTenantHsmInstance() - { - return $this->readOneof(17); - } - - public function hasRefreshSingleTenantHsmInstance() - { - return $this->hasOneof(17); - } - - /** - * Refreshes the - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. - * This operation must be performed periodically to keep the - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] - * active. This operation must be performed before - * [unrefreshed_duration_until_disable][google.cloud.kms.v1.SingleTenantHsmInstance.unrefreshed_duration_until_disable] - * has passed. The - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] - * must be in the - * [ACTIVE][google.cloud.kms.v1.SingleTenantHsmInstance.State.ACTIVE] state - * to perform this operation. - * - * Generated from protobuf field .google.cloud.kms.v1.SingleTenantHsmInstanceProposal.RefreshSingleTenantHsmInstance refresh_single_tenant_hsm_instance = 17; - * @param \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal\RefreshSingleTenantHsmInstance $var - * @return $this - */ - public function setRefreshSingleTenantHsmInstance($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal\RefreshSingleTenantHsmInstance::class); - $this->writeOneof(17, $var); - - return $this; - } - - /** - * @return string - */ - public function getApprovalParameters() - { - return $this->whichOneof("approval_parameters"); - } - - /** - * @return string - */ - public function getExpiration() - { - return $this->whichOneof("expiration"); - } - - /** - * @return string - */ - public function getOperation() - { - return $this->whichOneof("operation"); - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/AddQuorumMember.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/AddQuorumMember.php deleted file mode 100644 index aa7966fe73a6..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/AddQuorumMember.php +++ /dev/null @@ -1,82 +0,0 @@ -google.cloud.kms.v1.SingleTenantHsmInstanceProposal.AddQuorumMember - */ -class AddQuorumMember extends \Google\Protobuf\Internal\Message -{ - /** - * 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. - * - * Generated from protobuf field string two_factor_public_key_pem = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $two_factor_public_key_pem = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $two_factor_public_key_pem - * 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. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\HsmManagement::initOnce(); - parent::__construct($data); - } - - /** - * 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. - * - * Generated from protobuf field string two_factor_public_key_pem = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getTwoFactorPublicKeyPem() - { - return $this->two_factor_public_key_pem; - } - - /** - * 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. - * - * Generated from protobuf field string two_factor_public_key_pem = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setTwoFactorPublicKeyPem($var) - { - GPBUtil::checkString($var, True); - $this->two_factor_public_key_pem = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AddQuorumMember::class, \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal_AddQuorumMember::class); - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/DeleteSingleTenantHsmInstance.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/DeleteSingleTenantHsmInstance.php deleted file mode 100644 index e112a1f037de..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/DeleteSingleTenantHsmInstance.php +++ /dev/null @@ -1,47 +0,0 @@ -google.cloud.kms.v1.SingleTenantHsmInstanceProposal.DeleteSingleTenantHsmInstance - */ -class DeleteSingleTenantHsmInstance extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\HsmManagement::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DeleteSingleTenantHsmInstance::class, \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal_DeleteSingleTenantHsmInstance::class); - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/DisableSingleTenantHsmInstance.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/DisableSingleTenantHsmInstance.php deleted file mode 100644 index 99bc2ff1725c..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/DisableSingleTenantHsmInstance.php +++ /dev/null @@ -1,41 +0,0 @@ -google.cloud.kms.v1.SingleTenantHsmInstanceProposal.DisableSingleTenantHsmInstance - */ -class DisableSingleTenantHsmInstance extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\HsmManagement::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DisableSingleTenantHsmInstance::class, \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal_DisableSingleTenantHsmInstance::class); - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/EnableSingleTenantHsmInstance.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/EnableSingleTenantHsmInstance.php deleted file mode 100644 index db5b8cb8ad66..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/EnableSingleTenantHsmInstance.php +++ /dev/null @@ -1,41 +0,0 @@ -google.cloud.kms.v1.SingleTenantHsmInstanceProposal.EnableSingleTenantHsmInstance - */ -class EnableSingleTenantHsmInstance extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\HsmManagement::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(EnableSingleTenantHsmInstance::class, \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal_EnableSingleTenantHsmInstance::class); - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/QuorumParameters.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/QuorumParameters.php deleted file mode 100644 index 03cadd5d29da..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/QuorumParameters.php +++ /dev/null @@ -1,163 +0,0 @@ -google.cloud.kms.v1.SingleTenantHsmInstanceProposal.QuorumParameters - */ -class QuorumParameters extends \Google\Protobuf\Internal\Message -{ - /** - * 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. - * - * Generated from protobuf field int32 required_approver_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $required_approver_count = 0; - /** - * 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. - * - * Generated from protobuf field repeated .google.cloud.kms.v1.Challenge challenges = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $challenges; - /** - * Output only. The public keys associated with the 2FA keys that have - * already approved the - * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * by signing the challenge. - * - * Generated from protobuf field repeated string approved_two_factor_public_key_pems = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $approved_two_factor_public_key_pems; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $required_approver_count - * 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. - * @type array<\Google\Cloud\Kms\V1\Challenge>|\Google\Protobuf\Internal\RepeatedField $challenges - * 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. - * @type array|\Google\Protobuf\Internal\RepeatedField $approved_two_factor_public_key_pems - * Output only. The public keys associated with the 2FA keys that have - * already approved the - * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * by signing the challenge. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\HsmManagement::initOnce(); - parent::__construct($data); - } - - /** - * 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. - * - * Generated from protobuf field int32 required_approver_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getRequiredApproverCount() - { - return $this->required_approver_count; - } - - /** - * 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. - * - * Generated from protobuf field int32 required_approver_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setRequiredApproverCount($var) - { - GPBUtil::checkInt32($var); - $this->required_approver_count = $var; - - return $this; - } - - /** - * 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. - * - * Generated from protobuf field repeated .google.cloud.kms.v1.Challenge challenges = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getChallenges() - { - return $this->challenges; - } - - /** - * 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. - * - * Generated from protobuf field repeated .google.cloud.kms.v1.Challenge challenges = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\Kms\V1\Challenge>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setChallenges($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Kms\V1\Challenge::class); - $this->challenges = $arr; - - return $this; - } - - /** - * Output only. The public keys associated with the 2FA keys that have - * already approved the - * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * by signing the challenge. - * - * Generated from protobuf field repeated string approved_two_factor_public_key_pems = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getApprovedTwoFactorPublicKeyPems() - { - return $this->approved_two_factor_public_key_pems; - } - - /** - * Output only. The public keys associated with the 2FA keys that have - * already approved the - * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * by signing the challenge. - * - * Generated from protobuf field repeated string approved_two_factor_public_key_pems = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setApprovedTwoFactorPublicKeyPems($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->approved_two_factor_public_key_pems = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(QuorumParameters::class, \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal_QuorumParameters::class); - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/RefreshSingleTenantHsmInstance.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/RefreshSingleTenantHsmInstance.php deleted file mode 100644 index 88afd250cc8d..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/RefreshSingleTenantHsmInstance.php +++ /dev/null @@ -1,46 +0,0 @@ -google.cloud.kms.v1.SingleTenantHsmInstanceProposal.RefreshSingleTenantHsmInstance - */ -class RefreshSingleTenantHsmInstance extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\HsmManagement::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RefreshSingleTenantHsmInstance::class, \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal_RefreshSingleTenantHsmInstance::class); - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/RegisterTwoFactorAuthKeys.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/RegisterTwoFactorAuthKeys.php deleted file mode 100644 index 2347fd3c40b8..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/RegisterTwoFactorAuthKeys.php +++ /dev/null @@ -1,134 +0,0 @@ -google.cloud.kms.v1.SingleTenantHsmInstanceProposal.RegisterTwoFactorAuthKeys - */ -class RegisterTwoFactorAuthKeys extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The required numbers of approvers to set for the - * [SingleTenantHsmInstance][google.cloud.kms.v1.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][google.cloud.kms.v1.SingleTenantHsmInstance.QuorumAuth.total_approver_count] - * - 1. - * - * Generated from protobuf field int32 required_approver_count = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $required_approver_count = 0; - /** - * Required. The public keys associated with the 2FA keys for M of N quorum - * auth. Public keys must be associated with RSA 2048 keys. - * - * Generated from protobuf field repeated string two_factor_public_key_pems = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private $two_factor_public_key_pems; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $required_approver_count - * Required. The required numbers of approvers to set for the - * [SingleTenantHsmInstance][google.cloud.kms.v1.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][google.cloud.kms.v1.SingleTenantHsmInstance.QuorumAuth.total_approver_count] - * - 1. - * @type array|\Google\Protobuf\Internal\RepeatedField $two_factor_public_key_pems - * Required. The public keys associated with the 2FA keys for M of N quorum - * auth. Public keys must be associated with RSA 2048 keys. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\HsmManagement::initOnce(); - parent::__construct($data); - } - - /** - * Required. The required numbers of approvers to set for the - * [SingleTenantHsmInstance][google.cloud.kms.v1.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][google.cloud.kms.v1.SingleTenantHsmInstance.QuorumAuth.total_approver_count] - * - 1. - * - * Generated from protobuf field int32 required_approver_count = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getRequiredApproverCount() - { - return $this->required_approver_count; - } - - /** - * Required. The required numbers of approvers to set for the - * [SingleTenantHsmInstance][google.cloud.kms.v1.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][google.cloud.kms.v1.SingleTenantHsmInstance.QuorumAuth.total_approver_count] - * - 1. - * - * Generated from protobuf field int32 required_approver_count = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setRequiredApproverCount($var) - { - GPBUtil::checkInt32($var); - $this->required_approver_count = $var; - - return $this; - } - - /** - * Required. The public keys associated with the 2FA keys for M of N quorum - * auth. Public keys must be associated with RSA 2048 keys. - * - * Generated from protobuf field repeated string two_factor_public_key_pems = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTwoFactorPublicKeyPems() - { - return $this->two_factor_public_key_pems; - } - - /** - * Required. The public keys associated with the 2FA keys for M of N quorum - * auth. Public keys must be associated with RSA 2048 keys. - * - * Generated from protobuf field repeated string two_factor_public_key_pems = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTwoFactorPublicKeyPems($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->two_factor_public_key_pems = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RegisterTwoFactorAuthKeys::class, \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal_RegisterTwoFactorAuthKeys::class); - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/RemoveQuorumMember.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/RemoveQuorumMember.php deleted file mode 100644 index 57cd5125cd94..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/RemoveQuorumMember.php +++ /dev/null @@ -1,82 +0,0 @@ -google.cloud.kms.v1.SingleTenantHsmInstanceProposal.RemoveQuorumMember - */ -class RemoveQuorumMember extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The public key associated with the 2FA key for the quorum - * member to remove. Public keys must be associated with RSA 2048 keys. - * - * Generated from protobuf field string two_factor_public_key_pem = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $two_factor_public_key_pem = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $two_factor_public_key_pem - * Required. The public key associated with the 2FA key for the quorum - * member to remove. Public keys must be associated with RSA 2048 keys. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\HsmManagement::initOnce(); - parent::__construct($data); - } - - /** - * Required. The public key associated with the 2FA key for the quorum - * member to remove. Public keys must be associated with RSA 2048 keys. - * - * Generated from protobuf field string two_factor_public_key_pem = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getTwoFactorPublicKeyPem() - { - return $this->two_factor_public_key_pem; - } - - /** - * Required. The public key associated with the 2FA key for the quorum - * member to remove. Public keys must be associated with RSA 2048 keys. - * - * Generated from protobuf field string two_factor_public_key_pem = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setTwoFactorPublicKeyPem($var) - { - GPBUtil::checkString($var, True); - $this->two_factor_public_key_pem = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RemoveQuorumMember::class, \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal_RemoveQuorumMember::class); - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/RequiredActionQuorumParameters.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/RequiredActionQuorumParameters.php deleted file mode 100644 index 7270c63ad9a4..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/RequiredActionQuorumParameters.php +++ /dev/null @@ -1,201 +0,0 @@ -google.cloud.kms.v1.SingleTenantHsmInstanceProposal.RequiredActionQuorumParameters - */ -class RequiredActionQuorumParameters extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. A list of specific challenges that must be signed. - * For some operations, this will contain a single challenge. - * - * Generated from protobuf field repeated .google.cloud.kms.v1.Challenge required_challenges = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $required_challenges; - /** - * 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. - * - * Generated from protobuf field int32 required_approver_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $required_approver_count = 0; - /** - * 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. - * - * Generated from protobuf field repeated .google.cloud.kms.v1.Challenge quorum_challenges = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $quorum_challenges; - /** - * Output only. The public keys associated with the 2FA keys that have - * already approved the - * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * by signing the challenge. - * - * Generated from protobuf field repeated string approved_two_factor_public_key_pems = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $approved_two_factor_public_key_pems; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Kms\V1\Challenge>|\Google\Protobuf\Internal\RepeatedField $required_challenges - * Output only. A list of specific challenges that must be signed. - * For some operations, this will contain a single challenge. - * @type int $required_approver_count - * 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. - * @type array<\Google\Cloud\Kms\V1\Challenge>|\Google\Protobuf\Internal\RepeatedField $quorum_challenges - * 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. - * @type array|\Google\Protobuf\Internal\RepeatedField $approved_two_factor_public_key_pems - * Output only. The public keys associated with the 2FA keys that have - * already approved the - * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * by signing the challenge. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\HsmManagement::initOnce(); - parent::__construct($data); - } - - /** - * Output only. A list of specific challenges that must be signed. - * For some operations, this will contain a single challenge. - * - * Generated from protobuf field repeated .google.cloud.kms.v1.Challenge required_challenges = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRequiredChallenges() - { - return $this->required_challenges; - } - - /** - * Output only. A list of specific challenges that must be signed. - * For some operations, this will contain a single challenge. - * - * Generated from protobuf field repeated .google.cloud.kms.v1.Challenge required_challenges = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\Kms\V1\Challenge>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRequiredChallenges($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Kms\V1\Challenge::class); - $this->required_challenges = $arr; - - return $this; - } - - /** - * 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. - * - * Generated from protobuf field int32 required_approver_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getRequiredApproverCount() - { - return $this->required_approver_count; - } - - /** - * 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. - * - * Generated from protobuf field int32 required_approver_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setRequiredApproverCount($var) - { - GPBUtil::checkInt32($var); - $this->required_approver_count = $var; - - return $this; - } - - /** - * 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. - * - * Generated from protobuf field repeated .google.cloud.kms.v1.Challenge quorum_challenges = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getQuorumChallenges() - { - return $this->quorum_challenges; - } - - /** - * 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. - * - * Generated from protobuf field repeated .google.cloud.kms.v1.Challenge quorum_challenges = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\Kms\V1\Challenge>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setQuorumChallenges($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Kms\V1\Challenge::class); - $this->quorum_challenges = $arr; - - return $this; - } - - /** - * Output only. The public keys associated with the 2FA keys that have - * already approved the - * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * by signing the challenge. - * - * Generated from protobuf field repeated string approved_two_factor_public_key_pems = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getApprovedTwoFactorPublicKeyPems() - { - return $this->approved_two_factor_public_key_pems; - } - - /** - * Output only. The public keys associated with the 2FA keys that have - * already approved the - * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * by signing the challenge. - * - * Generated from protobuf field repeated string approved_two_factor_public_key_pems = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setApprovedTwoFactorPublicKeyPems($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->approved_two_factor_public_key_pems = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RequiredActionQuorumParameters::class, \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal_RequiredActionQuorumParameters::class); - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/State.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/State.php deleted file mode 100644 index 088ffacade97..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/SingleTenantHsmInstanceProposal/State.php +++ /dev/null @@ -1,114 +0,0 @@ -google.cloud.kms.v1.SingleTenantHsmInstanceProposal.State - */ -class State -{ - /** - * Not specified. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The - * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * is being created. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * The - * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * is pending approval. - * - * Generated from protobuf enum PENDING = 2; - */ - const PENDING = 2; - /** - * The - * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * has been approved. - * - * Generated from protobuf enum APPROVED = 3; - */ - const APPROVED = 3; - /** - * The - * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * is being executed. - * - * Generated from protobuf enum RUNNING = 4; - */ - const RUNNING = 4; - /** - * The - * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * has been executed successfully. - * - * Generated from protobuf enum SUCCEEDED = 5; - */ - const SUCCEEDED = 5; - /** - * The - * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * has failed. - * - * Generated from protobuf enum FAILED = 6; - */ - const FAILED = 6; - /** - * The - * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * has been deleted and will be purged after the purge_time. - * - * Generated from protobuf enum DELETED = 7; - */ - const DELETED = 7; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::PENDING => 'PENDING', - self::APPROVED => 'APPROVED', - self::RUNNING => 'RUNNING', - self::SUCCEEDED => 'SUCCEEDED', - self::FAILED => 'FAILED', - self::DELETED => 'DELETED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal_State::class); - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateAutokeyConfigRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateAutokeyConfigRequest.php deleted file mode 100644 index 28b4dc1f3e6d..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateAutokeyConfigRequest.php +++ /dev/null @@ -1,152 +0,0 @@ -google.cloud.kms.v1.UpdateAutokeyConfigRequest - */ -class UpdateAutokeyConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig] with values to - * update. - * - * Generated from protobuf field .google.cloud.kms.v1.AutokeyConfig autokey_config = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $autokey_config = null; - /** - * Required. Masks which fields of the - * [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig] to update, e.g. - * `keyProject`. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\Kms\V1\AutokeyConfig $autokeyConfig Required. [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig] with values to - * update. - * @param \Google\Protobuf\FieldMask $updateMask Required. Masks which fields of the - * [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig] to update, e.g. - * `keyProject`. - * - * @return \Google\Cloud\Kms\V1\UpdateAutokeyConfigRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Kms\V1\AutokeyConfig $autokeyConfig, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setAutokeyConfig($autokeyConfig) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Kms\V1\AutokeyConfig $autokey_config - * Required. [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig] with values to - * update. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Masks which fields of the - * [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig] to update, e.g. - * `keyProject`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\AutokeyAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig] with values to - * update. - * - * Generated from protobuf field .google.cloud.kms.v1.AutokeyConfig autokey_config = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Kms\V1\AutokeyConfig|null - */ - public function getAutokeyConfig() - { - return $this->autokey_config; - } - - public function hasAutokeyConfig() - { - return isset($this->autokey_config); - } - - public function clearAutokeyConfig() - { - unset($this->autokey_config); - } - - /** - * Required. [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig] with values to - * update. - * - * Generated from protobuf field .google.cloud.kms.v1.AutokeyConfig autokey_config = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Kms\V1\AutokeyConfig $var - * @return $this - */ - public function setAutokeyConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\AutokeyConfig::class); - $this->autokey_config = $var; - - return $this; - } - - /** - * Required. Masks which fields of the - * [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig] to update, e.g. - * `keyProject`. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. Masks which fields of the - * [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig] to update, e.g. - * `keyProject`. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateCryptoKeyPrimaryVersionRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateCryptoKeyPrimaryVersionRequest.php deleted file mode 100644 index 1a9161832a5e..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateCryptoKeyPrimaryVersionRequest.php +++ /dev/null @@ -1,128 +0,0 @@ -google.cloud.kms.v1.UpdateCryptoKeyPrimaryVersionRequest - */ -class UpdateCryptoKeyPrimaryVersionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] to update. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. The id of the child - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use as primary. - * - * Generated from protobuf field string crypto_key_version_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $crypto_key_version_id = ''; - - /** - * @param string $name Required. The resource name of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] to update. Please see - * {@see KeyManagementServiceClient::cryptoKeyName()} for help formatting this field. - * @param string $cryptoKeyVersionId Required. The id of the child - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use as primary. - * - * @return \Google\Cloud\Kms\V1\UpdateCryptoKeyPrimaryVersionRequest - * - * @experimental - */ - public static function build(string $name, string $cryptoKeyVersionId): self - { - return (new self()) - ->setName($name) - ->setCryptoKeyVersionId($cryptoKeyVersionId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] to update. - * @type string $crypto_key_version_id - * Required. The id of the child - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use as primary. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] to update. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] to update. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. The id of the child - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use as primary. - * - * Generated from protobuf field string crypto_key_version_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getCryptoKeyVersionId() - { - return $this->crypto_key_version_id; - } - - /** - * Required. The id of the child - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use as primary. - * - * Generated from protobuf field string crypto_key_version_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setCryptoKeyVersionId($var) - { - GPBUtil::checkString($var, True); - $this->crypto_key_version_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateCryptoKeyRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateCryptoKeyRequest.php deleted file mode 100644 index b11e974dbe70..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateCryptoKeyRequest.php +++ /dev/null @@ -1,137 +0,0 @@ -google.cloud.kms.v1.UpdateCryptoKeyRequest - */ -class UpdateCryptoKeyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. [CryptoKey][google.cloud.kms.v1.CryptoKey] with updated values. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKey crypto_key = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $crypto_key = null; - /** - * Required. List of fields to be updated in this request. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\Kms\V1\CryptoKey $cryptoKey Required. [CryptoKey][google.cloud.kms.v1.CryptoKey] with updated values. - * @param \Google\Protobuf\FieldMask $updateMask Required. List of fields to be updated in this request. - * - * @return \Google\Cloud\Kms\V1\UpdateCryptoKeyRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Kms\V1\CryptoKey $cryptoKey, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setCryptoKey($cryptoKey) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Kms\V1\CryptoKey $crypto_key - * Required. [CryptoKey][google.cloud.kms.v1.CryptoKey] with updated values. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. List of fields to be updated in this request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. [CryptoKey][google.cloud.kms.v1.CryptoKey] with updated values. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKey crypto_key = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Kms\V1\CryptoKey|null - */ - public function getCryptoKey() - { - return $this->crypto_key; - } - - public function hasCryptoKey() - { - return isset($this->crypto_key); - } - - public function clearCryptoKey() - { - unset($this->crypto_key); - } - - /** - * Required. [CryptoKey][google.cloud.kms.v1.CryptoKey] with updated values. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKey crypto_key = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Kms\V1\CryptoKey $var - * @return $this - */ - public function setCryptoKey($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\CryptoKey::class); - $this->crypto_key = $var; - - return $this; - } - - /** - * Required. List of fields to be updated in this request. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. List of fields to be updated in this request. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateCryptoKeyVersionRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateCryptoKeyVersionRequest.php deleted file mode 100644 index c91c56d8b516..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateCryptoKeyVersionRequest.php +++ /dev/null @@ -1,142 +0,0 @@ -google.cloud.kms.v1.UpdateCryptoKeyVersionRequest - */ -class UpdateCryptoKeyVersionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with - * updated values. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion crypto_key_version = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $crypto_key_version = null; - /** - * Required. List of fields to be updated in this request. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\Kms\V1\CryptoKeyVersion $cryptoKeyVersion Required. [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with - * updated values. - * @param \Google\Protobuf\FieldMask $updateMask Required. List of fields to be updated in this request. - * - * @return \Google\Cloud\Kms\V1\UpdateCryptoKeyVersionRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Kms\V1\CryptoKeyVersion $cryptoKeyVersion, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setCryptoKeyVersion($cryptoKeyVersion) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Kms\V1\CryptoKeyVersion $crypto_key_version - * Required. [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with - * updated values. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. List of fields to be updated in this request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with - * updated values. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion crypto_key_version = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Kms\V1\CryptoKeyVersion|null - */ - public function getCryptoKeyVersion() - { - return $this->crypto_key_version; - } - - public function hasCryptoKeyVersion() - { - return isset($this->crypto_key_version); - } - - public function clearCryptoKeyVersion() - { - unset($this->crypto_key_version); - } - - /** - * Required. [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with - * updated values. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion crypto_key_version = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Kms\V1\CryptoKeyVersion $var - * @return $this - */ - public function setCryptoKeyVersion($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\CryptoKeyVersion::class); - $this->crypto_key_version = $var; - - return $this; - } - - /** - * Required. List of fields to be updated in this request. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. List of fields to be updated in this request. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateEkmConfigRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateEkmConfigRequest.php deleted file mode 100644 index e33d285b04a2..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateEkmConfigRequest.php +++ /dev/null @@ -1,137 +0,0 @@ -google.cloud.kms.v1.UpdateEkmConfigRequest - */ -class UpdateEkmConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. [EkmConfig][google.cloud.kms.v1.EkmConfig] with updated values. - * - * Generated from protobuf field .google.cloud.kms.v1.EkmConfig ekm_config = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $ekm_config = null; - /** - * Required. List of fields to be updated in this request. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\Kms\V1\EkmConfig $ekmConfig Required. [EkmConfig][google.cloud.kms.v1.EkmConfig] with updated values. - * @param \Google\Protobuf\FieldMask $updateMask Required. List of fields to be updated in this request. - * - * @return \Google\Cloud\Kms\V1\UpdateEkmConfigRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Kms\V1\EkmConfig $ekmConfig, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setEkmConfig($ekmConfig) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Kms\V1\EkmConfig $ekm_config - * Required. [EkmConfig][google.cloud.kms.v1.EkmConfig] with updated values. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. List of fields to be updated in this request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\EkmService::initOnce(); - parent::__construct($data); - } - - /** - * Required. [EkmConfig][google.cloud.kms.v1.EkmConfig] with updated values. - * - * Generated from protobuf field .google.cloud.kms.v1.EkmConfig ekm_config = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Kms\V1\EkmConfig|null - */ - public function getEkmConfig() - { - return $this->ekm_config; - } - - public function hasEkmConfig() - { - return isset($this->ekm_config); - } - - public function clearEkmConfig() - { - unset($this->ekm_config); - } - - /** - * Required. [EkmConfig][google.cloud.kms.v1.EkmConfig] with updated values. - * - * Generated from protobuf field .google.cloud.kms.v1.EkmConfig ekm_config = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Kms\V1\EkmConfig $var - * @return $this - */ - public function setEkmConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\EkmConfig::class); - $this->ekm_config = $var; - - return $this; - } - - /** - * Required. List of fields to be updated in this request. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. List of fields to be updated in this request. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateEkmConnectionRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateEkmConnectionRequest.php deleted file mode 100644 index 0a77d3a6ab24..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateEkmConnectionRequest.php +++ /dev/null @@ -1,142 +0,0 @@ -google.cloud.kms.v1.UpdateEkmConnectionRequest - */ -class UpdateEkmConnectionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. [EkmConnection][google.cloud.kms.v1.EkmConnection] with updated - * values. - * - * Generated from protobuf field .google.cloud.kms.v1.EkmConnection ekm_connection = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $ekm_connection = null; - /** - * Required. List of fields to be updated in this request. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\Kms\V1\EkmConnection $ekmConnection Required. [EkmConnection][google.cloud.kms.v1.EkmConnection] with updated - * values. - * @param \Google\Protobuf\FieldMask $updateMask Required. List of fields to be updated in this request. - * - * @return \Google\Cloud\Kms\V1\UpdateEkmConnectionRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Kms\V1\EkmConnection $ekmConnection, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setEkmConnection($ekmConnection) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Kms\V1\EkmConnection $ekm_connection - * Required. [EkmConnection][google.cloud.kms.v1.EkmConnection] with updated - * values. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. List of fields to be updated in this request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\EkmService::initOnce(); - parent::__construct($data); - } - - /** - * Required. [EkmConnection][google.cloud.kms.v1.EkmConnection] with updated - * values. - * - * Generated from protobuf field .google.cloud.kms.v1.EkmConnection ekm_connection = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Kms\V1\EkmConnection|null - */ - public function getEkmConnection() - { - return $this->ekm_connection; - } - - public function hasEkmConnection() - { - return isset($this->ekm_connection); - } - - public function clearEkmConnection() - { - unset($this->ekm_connection); - } - - /** - * Required. [EkmConnection][google.cloud.kms.v1.EkmConnection] with updated - * values. - * - * Generated from protobuf field .google.cloud.kms.v1.EkmConnection ekm_connection = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Kms\V1\EkmConnection $var - * @return $this - */ - public function setEkmConnection($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\EkmConnection::class); - $this->ekm_connection = $var; - - return $this; - } - - /** - * Required. List of fields to be updated in this request. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. List of fields to be updated in this request. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/VerifyConnectivityRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/VerifyConnectivityRequest.php deleted file mode 100644 index 7ad43869a480..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/VerifyConnectivityRequest.php +++ /dev/null @@ -1,87 +0,0 @@ -google.cloud.kms.v1.VerifyConnectivityRequest - */ -class VerifyConnectivityRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The [name][google.cloud.kms.v1.EkmConnection.name] of the - * [EkmConnection][google.cloud.kms.v1.EkmConnection] to verify. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The [name][google.cloud.kms.v1.EkmConnection.name] of the - * [EkmConnection][google.cloud.kms.v1.EkmConnection] to verify. Please see - * {@see EkmServiceClient::ekmConnectionName()} for help formatting this field. - * - * @return \Google\Cloud\Kms\V1\VerifyConnectivityRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The [name][google.cloud.kms.v1.EkmConnection.name] of the - * [EkmConnection][google.cloud.kms.v1.EkmConnection] to verify. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\EkmService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The [name][google.cloud.kms.v1.EkmConnection.name] of the - * [EkmConnection][google.cloud.kms.v1.EkmConnection] to verify. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The [name][google.cloud.kms.v1.EkmConnection.name] of the - * [EkmConnection][google.cloud.kms.v1.EkmConnection] to verify. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/VerifyConnectivityResponse.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/VerifyConnectivityResponse.php deleted file mode 100644 index 4221f23c7637..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/VerifyConnectivityResponse.php +++ /dev/null @@ -1,34 +0,0 @@ -google.cloud.kms.v1.VerifyConnectivityResponse - */ -class VerifyConnectivityResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\EkmService::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/Kms/v1/samples/V1/AutokeyAdminClient/get_autokey_config.php b/owl-bot-staging/Kms/v1/samples/V1/AutokeyAdminClient/get_autokey_config.php deleted file mode 100644 index d177cd4f40ac..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/AutokeyAdminClient/get_autokey_config.php +++ /dev/null @@ -1,74 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var AutokeyConfig $response */ - $response = $autokeyAdminClient->getAutokeyConfig($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = AutokeyAdminClient::autokeyConfigName('[FOLDER]'); - - get_autokey_config_sample($formattedName); -} -// [END cloudkms_v1_generated_AutokeyAdmin_GetAutokeyConfig_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/AutokeyAdminClient/get_iam_policy.php b/owl-bot-staging/Kms/v1/samples/V1/AutokeyAdminClient/get_iam_policy.php deleted file mode 100644 index cfc2130680ce..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/AutokeyAdminClient/get_iam_policy.php +++ /dev/null @@ -1,72 +0,0 @@ -setResource($resource); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $autokeyAdminClient->getIamPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - get_iam_policy_sample($resource); -} -// [END cloudkms_v1_generated_AutokeyAdmin_GetIamPolicy_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/AutokeyAdminClient/get_location.php b/owl-bot-staging/Kms/v1/samples/V1/AutokeyAdminClient/get_location.php deleted file mode 100644 index 313d3fd27aec..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/AutokeyAdminClient/get_location.php +++ /dev/null @@ -1,57 +0,0 @@ -getLocation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END cloudkms_v1_generated_AutokeyAdmin_GetLocation_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/AutokeyAdminClient/list_locations.php b/owl-bot-staging/Kms/v1/samples/V1/AutokeyAdminClient/list_locations.php deleted file mode 100644 index abfc6a305644..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/AutokeyAdminClient/list_locations.php +++ /dev/null @@ -1,69 +0,0 @@ -listLocations($request); - - /** @var Location $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END cloudkms_v1_generated_AutokeyAdmin_ListLocations_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/AutokeyAdminClient/set_iam_policy.php b/owl-bot-staging/Kms/v1/samples/V1/AutokeyAdminClient/set_iam_policy.php deleted file mode 100644 index a4b890ba94fb..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/AutokeyAdminClient/set_iam_policy.php +++ /dev/null @@ -1,77 +0,0 @@ -setResource($resource) - ->setPolicy($policy); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $autokeyAdminClient->setIamPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - set_iam_policy_sample($resource); -} -// [END cloudkms_v1_generated_AutokeyAdmin_SetIamPolicy_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/AutokeyAdminClient/show_effective_autokey_config.php b/owl-bot-staging/Kms/v1/samples/V1/AutokeyAdminClient/show_effective_autokey_config.php deleted file mode 100644 index 562f33a407d3..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/AutokeyAdminClient/show_effective_autokey_config.php +++ /dev/null @@ -1,73 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var ShowEffectiveAutokeyConfigResponse $response */ - $response = $autokeyAdminClient->showEffectiveAutokeyConfig($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = AutokeyAdminClient::projectName('[PROJECT]'); - - show_effective_autokey_config_sample($formattedParent); -} -// [END cloudkms_v1_generated_AutokeyAdmin_ShowEffectiveAutokeyConfig_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/AutokeyAdminClient/test_iam_permissions.php b/owl-bot-staging/Kms/v1/samples/V1/AutokeyAdminClient/test_iam_permissions.php deleted file mode 100644 index 808d985cd079..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/AutokeyAdminClient/test_iam_permissions.php +++ /dev/null @@ -1,84 +0,0 @@ -setResource($resource) - ->setPermissions($permissions); - - // Call the API and handle any network failures. - try { - /** @var TestIamPermissionsResponse $response */ - $response = $autokeyAdminClient->testIamPermissions($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - $permissionsElement = '[PERMISSIONS]'; - - test_iam_permissions_sample($resource, $permissionsElement); -} -// [END cloudkms_v1_generated_AutokeyAdmin_TestIamPermissions_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/AutokeyAdminClient/update_autokey_config.php b/owl-bot-staging/Kms/v1/samples/V1/AutokeyAdminClient/update_autokey_config.php deleted file mode 100644 index 0fb3c3cfaaa1..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/AutokeyAdminClient/update_autokey_config.php +++ /dev/null @@ -1,68 +0,0 @@ -setAutokeyConfig($autokeyConfig) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var AutokeyConfig $response */ - $response = $autokeyAdminClient->updateAutokeyConfig($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END cloudkms_v1_generated_AutokeyAdmin_UpdateAutokeyConfig_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/AutokeyClient/create_key_handle.php b/owl-bot-staging/Kms/v1/samples/V1/AutokeyClient/create_key_handle.php deleted file mode 100644 index be2161924f3f..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/AutokeyClient/create_key_handle.php +++ /dev/null @@ -1,101 +0,0 @@ -setResourceTypeSelector($keyHandleResourceTypeSelector); - $request = (new CreateKeyHandleRequest()) - ->setParent($formattedParent) - ->setKeyHandle($keyHandle); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $autokeyClient->createKeyHandle($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var KeyHandle $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = AutokeyClient::locationName('[PROJECT]', '[LOCATION]'); - $keyHandleResourceTypeSelector = '[RESOURCE_TYPE_SELECTOR]'; - - create_key_handle_sample($formattedParent, $keyHandleResourceTypeSelector); -} -// [END cloudkms_v1_generated_Autokey_CreateKeyHandle_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/AutokeyClient/get_iam_policy.php b/owl-bot-staging/Kms/v1/samples/V1/AutokeyClient/get_iam_policy.php deleted file mode 100644 index 99c46bdd8f62..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/AutokeyClient/get_iam_policy.php +++ /dev/null @@ -1,72 +0,0 @@ -setResource($resource); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $autokeyClient->getIamPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - get_iam_policy_sample($resource); -} -// [END cloudkms_v1_generated_Autokey_GetIamPolicy_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/AutokeyClient/get_key_handle.php b/owl-bot-staging/Kms/v1/samples/V1/AutokeyClient/get_key_handle.php deleted file mode 100644 index 49490346aa27..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/AutokeyClient/get_key_handle.php +++ /dev/null @@ -1,73 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var KeyHandle $response */ - $response = $autokeyClient->getKeyHandle($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = AutokeyClient::keyHandleName('[PROJECT]', '[LOCATION]', '[KEY_HANDLE]'); - - get_key_handle_sample($formattedName); -} -// [END cloudkms_v1_generated_Autokey_GetKeyHandle_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/AutokeyClient/get_location.php b/owl-bot-staging/Kms/v1/samples/V1/AutokeyClient/get_location.php deleted file mode 100644 index d23052e76e68..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/AutokeyClient/get_location.php +++ /dev/null @@ -1,57 +0,0 @@ -getLocation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END cloudkms_v1_generated_Autokey_GetLocation_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/AutokeyClient/list_key_handles.php b/owl-bot-staging/Kms/v1/samples/V1/AutokeyClient/list_key_handles.php deleted file mode 100644 index 0d93a6139373..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/AutokeyClient/list_key_handles.php +++ /dev/null @@ -1,78 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $autokeyClient->listKeyHandles($request); - - /** @var KeyHandle $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = AutokeyClient::locationName('[PROJECT]', '[LOCATION]'); - - list_key_handles_sample($formattedParent); -} -// [END cloudkms_v1_generated_Autokey_ListKeyHandles_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/AutokeyClient/list_locations.php b/owl-bot-staging/Kms/v1/samples/V1/AutokeyClient/list_locations.php deleted file mode 100644 index 8a0c1817b5de..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/AutokeyClient/list_locations.php +++ /dev/null @@ -1,69 +0,0 @@ -listLocations($request); - - /** @var Location $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END cloudkms_v1_generated_Autokey_ListLocations_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/AutokeyClient/set_iam_policy.php b/owl-bot-staging/Kms/v1/samples/V1/AutokeyClient/set_iam_policy.php deleted file mode 100644 index 8aa83ef77ec0..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/AutokeyClient/set_iam_policy.php +++ /dev/null @@ -1,77 +0,0 @@ -setResource($resource) - ->setPolicy($policy); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $autokeyClient->setIamPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - set_iam_policy_sample($resource); -} -// [END cloudkms_v1_generated_Autokey_SetIamPolicy_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/AutokeyClient/test_iam_permissions.php b/owl-bot-staging/Kms/v1/samples/V1/AutokeyClient/test_iam_permissions.php deleted file mode 100644 index a7fb7048708a..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/AutokeyClient/test_iam_permissions.php +++ /dev/null @@ -1,84 +0,0 @@ -setResource($resource) - ->setPermissions($permissions); - - // Call the API and handle any network failures. - try { - /** @var TestIamPermissionsResponse $response */ - $response = $autokeyClient->testIamPermissions($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - $permissionsElement = '[PERMISSIONS]'; - - test_iam_permissions_sample($resource, $permissionsElement); -} -// [END cloudkms_v1_generated_Autokey_TestIamPermissions_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/create_ekm_connection.php b/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/create_ekm_connection.php deleted file mode 100644 index 39734fabe8d6..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/create_ekm_connection.php +++ /dev/null @@ -1,80 +0,0 @@ -setParent($formattedParent) - ->setEkmConnectionId($ekmConnectionId) - ->setEkmConnection($ekmConnection); - - // Call the API and handle any network failures. - try { - /** @var EkmConnection $response */ - $response = $ekmServiceClient->createEkmConnection($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = EkmServiceClient::locationName('[PROJECT]', '[LOCATION]'); - $ekmConnectionId = '[EKM_CONNECTION_ID]'; - - create_ekm_connection_sample($formattedParent, $ekmConnectionId); -} -// [END cloudkms_v1_generated_EkmService_CreateEkmConnection_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/get_ekm_config.php b/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/get_ekm_config.php deleted file mode 100644 index 5d0335e595d0..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/get_ekm_config.php +++ /dev/null @@ -1,73 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var EkmConfig $response */ - $response = $ekmServiceClient->getEkmConfig($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = EkmServiceClient::ekmConfigName('[PROJECT]', '[LOCATION]'); - - get_ekm_config_sample($formattedName); -} -// [END cloudkms_v1_generated_EkmService_GetEkmConfig_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/get_ekm_connection.php b/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/get_ekm_connection.php deleted file mode 100644 index 9361574c244c..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/get_ekm_connection.php +++ /dev/null @@ -1,73 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var EkmConnection $response */ - $response = $ekmServiceClient->getEkmConnection($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = EkmServiceClient::ekmConnectionName('[PROJECT]', '[LOCATION]', '[EKM_CONNECTION]'); - - get_ekm_connection_sample($formattedName); -} -// [END cloudkms_v1_generated_EkmService_GetEkmConnection_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/get_iam_policy.php b/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/get_iam_policy.php deleted file mode 100644 index da8a9fc7e627..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/get_iam_policy.php +++ /dev/null @@ -1,72 +0,0 @@ -setResource($resource); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $ekmServiceClient->getIamPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - get_iam_policy_sample($resource); -} -// [END cloudkms_v1_generated_EkmService_GetIamPolicy_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/get_location.php b/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/get_location.php deleted file mode 100644 index 36b24b6d0ef4..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/get_location.php +++ /dev/null @@ -1,57 +0,0 @@ -getLocation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END cloudkms_v1_generated_EkmService_GetLocation_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/list_ekm_connections.php b/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/list_ekm_connections.php deleted file mode 100644 index 89edbeb1f779..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/list_ekm_connections.php +++ /dev/null @@ -1,78 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $ekmServiceClient->listEkmConnections($request); - - /** @var EkmConnection $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = EkmServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - list_ekm_connections_sample($formattedParent); -} -// [END cloudkms_v1_generated_EkmService_ListEkmConnections_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/list_locations.php b/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/list_locations.php deleted file mode 100644 index 3e7e5aefad1b..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/list_locations.php +++ /dev/null @@ -1,69 +0,0 @@ -listLocations($request); - - /** @var Location $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END cloudkms_v1_generated_EkmService_ListLocations_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/set_iam_policy.php b/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/set_iam_policy.php deleted file mode 100644 index b0a707b7b540..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/set_iam_policy.php +++ /dev/null @@ -1,77 +0,0 @@ -setResource($resource) - ->setPolicy($policy); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $ekmServiceClient->setIamPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - set_iam_policy_sample($resource); -} -// [END cloudkms_v1_generated_EkmService_SetIamPolicy_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/test_iam_permissions.php b/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/test_iam_permissions.php deleted file mode 100644 index 36bcc82c8fef..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/test_iam_permissions.php +++ /dev/null @@ -1,84 +0,0 @@ -setResource($resource) - ->setPermissions($permissions); - - // Call the API and handle any network failures. - try { - /** @var TestIamPermissionsResponse $response */ - $response = $ekmServiceClient->testIamPermissions($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - $permissionsElement = '[PERMISSIONS]'; - - test_iam_permissions_sample($resource, $permissionsElement); -} -// [END cloudkms_v1_generated_EkmService_TestIamPermissions_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/update_ekm_config.php b/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/update_ekm_config.php deleted file mode 100644 index bf323f584109..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/update_ekm_config.php +++ /dev/null @@ -1,63 +0,0 @@ -setEkmConfig($ekmConfig) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var EkmConfig $response */ - $response = $ekmServiceClient->updateEkmConfig($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END cloudkms_v1_generated_EkmService_UpdateEkmConfig_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/update_ekm_connection.php b/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/update_ekm_connection.php deleted file mode 100644 index a5e7dde39658..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/update_ekm_connection.php +++ /dev/null @@ -1,62 +0,0 @@ -setEkmConnection($ekmConnection) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var EkmConnection $response */ - $response = $ekmServiceClient->updateEkmConnection($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END cloudkms_v1_generated_EkmService_UpdateEkmConnection_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/verify_connectivity.php b/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/verify_connectivity.php deleted file mode 100644 index 3c596c035bb9..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/verify_connectivity.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var VerifyConnectivityResponse $response */ - $response = $ekmServiceClient->verifyConnectivity($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = EkmServiceClient::ekmConnectionName('[PROJECT]', '[LOCATION]', '[EKM_CONNECTION]'); - - verify_connectivity_sample($formattedName); -} -// [END cloudkms_v1_generated_EkmService_VerifyConnectivity_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/approve_single_tenant_hsm_instance_proposal.php b/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/approve_single_tenant_hsm_instance_proposal.php deleted file mode 100644 index 9ba2ff7205e9..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/approve_single_tenant_hsm_instance_proposal.php +++ /dev/null @@ -1,106 +0,0 @@ -setSignedChallenge($quorumReplyChallengeRepliesSignedChallenge) - ->setPublicKeyPem($quorumReplyChallengeRepliesPublicKeyPem); - $quorumReplyChallengeReplies = [$challengeReply,]; - $quorumReply = (new QuorumReply()) - ->setChallengeReplies($quorumReplyChallengeReplies); - $request = (new ApproveSingleTenantHsmInstanceProposalRequest()) - ->setName($formattedName) - ->setQuorumReply($quorumReply); - - // Call the API and handle any network failures. - try { - /** @var ApproveSingleTenantHsmInstanceProposalResponse $response */ - $response = $hsmManagementClient->approveSingleTenantHsmInstanceProposal($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = HsmManagementClient::singleTenantHsmInstanceProposalName( - '[PROJECT]', - '[LOCATION]', - '[SINGLE_TENANT_HSM_INSTANCE]', - '[PROPOSAL]' - ); - $quorumReplyChallengeRepliesSignedChallenge = '...'; - $quorumReplyChallengeRepliesPublicKeyPem = '[PUBLIC_KEY_PEM]'; - - approve_single_tenant_hsm_instance_proposal_sample( - $formattedName, - $quorumReplyChallengeRepliesSignedChallenge, - $quorumReplyChallengeRepliesPublicKeyPem - ); -} -// [END cloudkms_v1_generated_HsmManagement_ApproveSingleTenantHsmInstanceProposal_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/create_single_tenant_hsm_instance.php b/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/create_single_tenant_hsm_instance.php deleted file mode 100644 index 5205bd296ab8..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/create_single_tenant_hsm_instance.php +++ /dev/null @@ -1,104 +0,0 @@ -setTotalApproverCount($singleTenantHsmInstanceQuorumAuthTotalApproverCount); - $singleTenantHsmInstance = (new SingleTenantHsmInstance()) - ->setQuorumAuth($singleTenantHsmInstanceQuorumAuth); - $request = (new CreateSingleTenantHsmInstanceRequest()) - ->setParent($formattedParent) - ->setSingleTenantHsmInstance($singleTenantHsmInstance); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $hsmManagementClient->createSingleTenantHsmInstance($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var SingleTenantHsmInstance $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = HsmManagementClient::locationName('[PROJECT]', '[LOCATION]'); - $singleTenantHsmInstanceQuorumAuthTotalApproverCount = 0; - - create_single_tenant_hsm_instance_sample( - $formattedParent, - $singleTenantHsmInstanceQuorumAuthTotalApproverCount - ); -} -// [END cloudkms_v1_generated_HsmManagement_CreateSingleTenantHsmInstance_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/create_single_tenant_hsm_instance_proposal.php b/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/create_single_tenant_hsm_instance_proposal.php deleted file mode 100644 index fcf3a1d17483..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/create_single_tenant_hsm_instance_proposal.php +++ /dev/null @@ -1,95 +0,0 @@ -setParent($formattedParent) - ->setSingleTenantHsmInstanceProposal($singleTenantHsmInstanceProposal); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $hsmManagementClient->createSingleTenantHsmInstanceProposal($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var SingleTenantHsmInstanceProposal $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = HsmManagementClient::singleTenantHsmInstanceName( - '[PROJECT]', - '[LOCATION]', - '[SINGLE_TENANT_HSM_INSTANCE]' - ); - - create_single_tenant_hsm_instance_proposal_sample($formattedParent); -} -// [END cloudkms_v1_generated_HsmManagement_CreateSingleTenantHsmInstanceProposal_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/delete_single_tenant_hsm_instance_proposal.php b/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/delete_single_tenant_hsm_instance_proposal.php deleted file mode 100644 index 7ae09872bc2d..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/delete_single_tenant_hsm_instance_proposal.php +++ /dev/null @@ -1,78 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $hsmManagementClient->deleteSingleTenantHsmInstanceProposal($request); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = HsmManagementClient::singleTenantHsmInstanceProposalName( - '[PROJECT]', - '[LOCATION]', - '[SINGLE_TENANT_HSM_INSTANCE]', - '[PROPOSAL]' - ); - - delete_single_tenant_hsm_instance_proposal_sample($formattedName); -} -// [END cloudkms_v1_generated_HsmManagement_DeleteSingleTenantHsmInstanceProposal_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/execute_single_tenant_hsm_instance_proposal.php b/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/execute_single_tenant_hsm_instance_proposal.php deleted file mode 100644 index 366b599149cb..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/execute_single_tenant_hsm_instance_proposal.php +++ /dev/null @@ -1,97 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $hsmManagementClient->executeSingleTenantHsmInstanceProposal($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ExecuteSingleTenantHsmInstanceProposalResponse $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = HsmManagementClient::singleTenantHsmInstanceProposalName( - '[PROJECT]', - '[LOCATION]', - '[SINGLE_TENANT_HSM_INSTANCE]', - '[PROPOSAL]' - ); - - execute_single_tenant_hsm_instance_proposal_sample($formattedName); -} -// [END cloudkms_v1_generated_HsmManagement_ExecuteSingleTenantHsmInstanceProposal_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/get_iam_policy.php b/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/get_iam_policy.php deleted file mode 100644 index 2a4568f9fbbd..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/get_iam_policy.php +++ /dev/null @@ -1,72 +0,0 @@ -setResource($resource); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $hsmManagementClient->getIamPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - get_iam_policy_sample($resource); -} -// [END cloudkms_v1_generated_HsmManagement_GetIamPolicy_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/get_location.php b/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/get_location.php deleted file mode 100644 index 4d7ab2647ef2..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/get_location.php +++ /dev/null @@ -1,57 +0,0 @@ -getLocation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END cloudkms_v1_generated_HsmManagement_GetLocation_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/get_single_tenant_hsm_instance.php b/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/get_single_tenant_hsm_instance.php deleted file mode 100644 index 3a7369e75730..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/get_single_tenant_hsm_instance.php +++ /dev/null @@ -1,78 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var SingleTenantHsmInstance $response */ - $response = $hsmManagementClient->getSingleTenantHsmInstance($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = HsmManagementClient::singleTenantHsmInstanceName( - '[PROJECT]', - '[LOCATION]', - '[SINGLE_TENANT_HSM_INSTANCE]' - ); - - get_single_tenant_hsm_instance_sample($formattedName); -} -// [END cloudkms_v1_generated_HsmManagement_GetSingleTenantHsmInstance_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/get_single_tenant_hsm_instance_proposal.php b/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/get_single_tenant_hsm_instance_proposal.php deleted file mode 100644 index fb7b8689f650..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/get_single_tenant_hsm_instance_proposal.php +++ /dev/null @@ -1,80 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var SingleTenantHsmInstanceProposal $response */ - $response = $hsmManagementClient->getSingleTenantHsmInstanceProposal($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = HsmManagementClient::singleTenantHsmInstanceProposalName( - '[PROJECT]', - '[LOCATION]', - '[SINGLE_TENANT_HSM_INSTANCE]', - '[PROPOSAL]' - ); - - get_single_tenant_hsm_instance_proposal_sample($formattedName); -} -// [END cloudkms_v1_generated_HsmManagement_GetSingleTenantHsmInstanceProposal_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/list_locations.php b/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/list_locations.php deleted file mode 100644 index 44e25ec558c7..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/list_locations.php +++ /dev/null @@ -1,69 +0,0 @@ -listLocations($request); - - /** @var Location $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END cloudkms_v1_generated_HsmManagement_ListLocations_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/list_single_tenant_hsm_instance_proposals.php b/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/list_single_tenant_hsm_instance_proposals.php deleted file mode 100644 index fe2f9f673af9..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/list_single_tenant_hsm_instance_proposals.php +++ /dev/null @@ -1,84 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $hsmManagementClient->listSingleTenantHsmInstanceProposals($request); - - /** @var SingleTenantHsmInstanceProposal $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = HsmManagementClient::singleTenantHsmInstanceName( - '[PROJECT]', - '[LOCATION]', - '[SINGLE_TENANT_HSM_INSTANCE]' - ); - - list_single_tenant_hsm_instance_proposals_sample($formattedParent); -} -// [END cloudkms_v1_generated_HsmManagement_ListSingleTenantHsmInstanceProposals_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/list_single_tenant_hsm_instances.php b/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/list_single_tenant_hsm_instances.php deleted file mode 100644 index cfde582acac2..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/list_single_tenant_hsm_instances.php +++ /dev/null @@ -1,79 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $hsmManagementClient->listSingleTenantHsmInstances($request); - - /** @var SingleTenantHsmInstance $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = HsmManagementClient::locationName('[PROJECT]', '[LOCATION]'); - - list_single_tenant_hsm_instances_sample($formattedParent); -} -// [END cloudkms_v1_generated_HsmManagement_ListSingleTenantHsmInstances_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/set_iam_policy.php b/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/set_iam_policy.php deleted file mode 100644 index cbcc043dbf4e..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/set_iam_policy.php +++ /dev/null @@ -1,77 +0,0 @@ -setResource($resource) - ->setPolicy($policy); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $hsmManagementClient->setIamPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - set_iam_policy_sample($resource); -} -// [END cloudkms_v1_generated_HsmManagement_SetIamPolicy_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/test_iam_permissions.php b/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/test_iam_permissions.php deleted file mode 100644 index ef6d081647ee..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/HsmManagementClient/test_iam_permissions.php +++ /dev/null @@ -1,84 +0,0 @@ -setResource($resource) - ->setPermissions($permissions); - - // Call the API and handle any network failures. - try { - /** @var TestIamPermissionsResponse $response */ - $response = $hsmManagementClient->testIamPermissions($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - $permissionsElement = '[PERMISSIONS]'; - - test_iam_permissions_sample($resource, $permissionsElement); -} -// [END cloudkms_v1_generated_HsmManagement_TestIamPermissions_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/asymmetric_decrypt.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/asymmetric_decrypt.php deleted file mode 100644 index 182d0f9bf897..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/asymmetric_decrypt.php +++ /dev/null @@ -1,88 +0,0 @@ -setName($formattedName) - ->setCiphertext($ciphertext); - - // Call the API and handle any network failures. - try { - /** @var AsymmetricDecryptResponse $response */ - $response = $keyManagementServiceClient->asymmetricDecrypt($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = KeyManagementServiceClient::cryptoKeyVersionName( - '[PROJECT]', - '[LOCATION]', - '[KEY_RING]', - '[CRYPTO_KEY]', - '[CRYPTO_KEY_VERSION]' - ); - $ciphertext = '...'; - - asymmetric_decrypt_sample($formattedName, $ciphertext); -} -// [END cloudkms_v1_generated_KeyManagementService_AsymmetricDecrypt_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/asymmetric_sign.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/asymmetric_sign.php deleted file mode 100644 index 79016510198f..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/asymmetric_sign.php +++ /dev/null @@ -1,86 +0,0 @@ -setName($formattedName) - ->setDigest($digest); - - // Call the API and handle any network failures. - try { - /** @var AsymmetricSignResponse $response */ - $response = $keyManagementServiceClient->asymmetricSign($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = KeyManagementServiceClient::cryptoKeyVersionName( - '[PROJECT]', - '[LOCATION]', - '[KEY_RING]', - '[CRYPTO_KEY]', - '[CRYPTO_KEY_VERSION]' - ); - - asymmetric_sign_sample($formattedName); -} -// [END cloudkms_v1_generated_KeyManagementService_AsymmetricSign_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/create_crypto_key.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/create_crypto_key.php deleted file mode 100644 index e72dac741ec1..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/create_crypto_key.php +++ /dev/null @@ -1,83 +0,0 @@ -setParent($formattedParent) - ->setCryptoKeyId($cryptoKeyId) - ->setCryptoKey($cryptoKey); - - // Call the API and handle any network failures. - try { - /** @var CryptoKey $response */ - $response = $keyManagementServiceClient->createCryptoKey($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = KeyManagementServiceClient::keyRingName('[PROJECT]', '[LOCATION]', '[KEY_RING]'); - $cryptoKeyId = '[CRYPTO_KEY_ID]'; - - create_crypto_key_sample($formattedParent, $cryptoKeyId); -} -// [END cloudkms_v1_generated_KeyManagementService_CreateCryptoKey_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/create_crypto_key_version.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/create_crypto_key_version.php deleted file mode 100644 index e207e2730242..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/create_crypto_key_version.php +++ /dev/null @@ -1,85 +0,0 @@ -setParent($formattedParent) - ->setCryptoKeyVersion($cryptoKeyVersion); - - // Call the API and handle any network failures. - try { - /** @var CryptoKeyVersion $response */ - $response = $keyManagementServiceClient->createCryptoKeyVersion($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = KeyManagementServiceClient::cryptoKeyName( - '[PROJECT]', - '[LOCATION]', - '[KEY_RING]', - '[CRYPTO_KEY]' - ); - - create_crypto_key_version_sample($formattedParent); -} -// [END cloudkms_v1_generated_KeyManagementService_CreateCryptoKeyVersion_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/create_import_job.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/create_import_job.php deleted file mode 100644 index 87db85e33ccf..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/create_import_job.php +++ /dev/null @@ -1,106 +0,0 @@ -setImportMethod($importJobImportMethod) - ->setProtectionLevel($importJobProtectionLevel); - $request = (new CreateImportJobRequest()) - ->setParent($formattedParent) - ->setImportJobId($importJobId) - ->setImportJob($importJob); - - // Call the API and handle any network failures. - try { - /** @var ImportJob $response */ - $response = $keyManagementServiceClient->createImportJob($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = KeyManagementServiceClient::keyRingName('[PROJECT]', '[LOCATION]', '[KEY_RING]'); - $importJobId = '[IMPORT_JOB_ID]'; - $importJobImportMethod = ImportMethod::IMPORT_METHOD_UNSPECIFIED; - $importJobProtectionLevel = ProtectionLevel::PROTECTION_LEVEL_UNSPECIFIED; - - create_import_job_sample( - $formattedParent, - $importJobId, - $importJobImportMethod, - $importJobProtectionLevel - ); -} -// [END cloudkms_v1_generated_KeyManagementService_CreateImportJob_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/create_key_ring.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/create_key_ring.php deleted file mode 100644 index 2af54e78ea90..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/create_key_ring.php +++ /dev/null @@ -1,80 +0,0 @@ -setParent($formattedParent) - ->setKeyRingId($keyRingId) - ->setKeyRing($keyRing); - - // Call the API and handle any network failures. - try { - /** @var KeyRing $response */ - $response = $keyManagementServiceClient->createKeyRing($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = KeyManagementServiceClient::locationName('[PROJECT]', '[LOCATION]'); - $keyRingId = '[KEY_RING_ID]'; - - create_key_ring_sample($formattedParent, $keyRingId); -} -// [END cloudkms_v1_generated_KeyManagementService_CreateKeyRing_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/decapsulate.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/decapsulate.php deleted file mode 100644 index 70fbf5e4812d..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/decapsulate.php +++ /dev/null @@ -1,88 +0,0 @@ -setName($formattedName) - ->setCiphertext($ciphertext); - - // Call the API and handle any network failures. - try { - /** @var DecapsulateResponse $response */ - $response = $keyManagementServiceClient->decapsulate($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = KeyManagementServiceClient::cryptoKeyVersionName( - '[PROJECT]', - '[LOCATION]', - '[KEY_RING]', - '[CRYPTO_KEY]', - '[CRYPTO_KEY_VERSION]' - ); - $ciphertext = '...'; - - decapsulate_sample($formattedName, $ciphertext); -} -// [END cloudkms_v1_generated_KeyManagementService_Decapsulate_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/decrypt.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/decrypt.php deleted file mode 100644 index 236e3354be4d..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/decrypt.php +++ /dev/null @@ -1,85 +0,0 @@ -setName($formattedName) - ->setCiphertext($ciphertext); - - // Call the API and handle any network failures. - try { - /** @var DecryptResponse $response */ - $response = $keyManagementServiceClient->decrypt($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = KeyManagementServiceClient::cryptoKeyName( - '[PROJECT]', - '[LOCATION]', - '[KEY_RING]', - '[CRYPTO_KEY]' - ); - $ciphertext = '...'; - - decrypt_sample($formattedName, $ciphertext); -} -// [END cloudkms_v1_generated_KeyManagementService_Decrypt_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/delete_crypto_key.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/delete_crypto_key.php deleted file mode 100644 index 9c6daef4996e..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/delete_crypto_key.php +++ /dev/null @@ -1,91 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $keyManagementServiceClient->deleteCryptoKey($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = KeyManagementServiceClient::cryptoKeyName( - '[PROJECT]', - '[LOCATION]', - '[KEY_RING]', - '[CRYPTO_KEY]' - ); - - delete_crypto_key_sample($formattedName); -} -// [END cloudkms_v1_generated_KeyManagementService_DeleteCryptoKey_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/delete_crypto_key_version.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/delete_crypto_key_version.php deleted file mode 100644 index 611b7b987497..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/delete_crypto_key_version.php +++ /dev/null @@ -1,97 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $keyManagementServiceClient->deleteCryptoKeyVersion($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = KeyManagementServiceClient::cryptoKeyVersionName( - '[PROJECT]', - '[LOCATION]', - '[KEY_RING]', - '[CRYPTO_KEY]', - '[CRYPTO_KEY_VERSION]' - ); - - delete_crypto_key_version_sample($formattedName); -} -// [END cloudkms_v1_generated_KeyManagementService_DeleteCryptoKeyVersion_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/destroy_crypto_key_version.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/destroy_crypto_key_version.php deleted file mode 100644 index 7e7f8dfdf034..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/destroy_crypto_key_version.php +++ /dev/null @@ -1,98 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var CryptoKeyVersion $response */ - $response = $keyManagementServiceClient->destroyCryptoKeyVersion($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = KeyManagementServiceClient::cryptoKeyVersionName( - '[PROJECT]', - '[LOCATION]', - '[KEY_RING]', - '[CRYPTO_KEY]', - '[CRYPTO_KEY_VERSION]' - ); - - destroy_crypto_key_version_sample($formattedName); -} -// [END cloudkms_v1_generated_KeyManagementService_DestroyCryptoKeyVersion_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/encrypt.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/encrypt.php deleted file mode 100644 index f68cdbab3abf..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/encrypt.php +++ /dev/null @@ -1,92 +0,0 @@ -setName($name) - ->setPlaintext($plaintext); - - // Call the API and handle any network failures. - try { - /** @var EncryptResponse $response */ - $response = $keyManagementServiceClient->encrypt($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $name = '[NAME]'; - $plaintext = '...'; - - encrypt_sample($name, $plaintext); -} -// [END cloudkms_v1_generated_KeyManagementService_Encrypt_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/generate_random_bytes.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/generate_random_bytes.php deleted file mode 100644 index 623886589358..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/generate_random_bytes.php +++ /dev/null @@ -1,58 +0,0 @@ -generateRandomBytes($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END cloudkms_v1_generated_KeyManagementService_GenerateRandomBytes_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_crypto_key.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_crypto_key.php deleted file mode 100644 index 17133dfe6770..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_crypto_key.php +++ /dev/null @@ -1,79 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var CryptoKey $response */ - $response = $keyManagementServiceClient->getCryptoKey($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = KeyManagementServiceClient::cryptoKeyName( - '[PROJECT]', - '[LOCATION]', - '[KEY_RING]', - '[CRYPTO_KEY]' - ); - - get_crypto_key_sample($formattedName); -} -// [END cloudkms_v1_generated_KeyManagementService_GetCryptoKey_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_crypto_key_version.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_crypto_key_version.php deleted file mode 100644 index bc6deb40e810..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_crypto_key_version.php +++ /dev/null @@ -1,79 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var CryptoKeyVersion $response */ - $response = $keyManagementServiceClient->getCryptoKeyVersion($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = KeyManagementServiceClient::cryptoKeyVersionName( - '[PROJECT]', - '[LOCATION]', - '[KEY_RING]', - '[CRYPTO_KEY]', - '[CRYPTO_KEY_VERSION]' - ); - - get_crypto_key_version_sample($formattedName); -} -// [END cloudkms_v1_generated_KeyManagementService_GetCryptoKeyVersion_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_iam_policy.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_iam_policy.php deleted file mode 100644 index a9751e8e18eb..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_iam_policy.php +++ /dev/null @@ -1,72 +0,0 @@ -setResource($resource); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $keyManagementServiceClient->getIamPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - get_iam_policy_sample($resource); -} -// [END cloudkms_v1_generated_KeyManagementService_GetIamPolicy_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_import_job.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_import_job.php deleted file mode 100644 index 2c7c843c8646..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_import_job.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var ImportJob $response */ - $response = $keyManagementServiceClient->getImportJob($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = KeyManagementServiceClient::importJobName( - '[PROJECT]', - '[LOCATION]', - '[KEY_RING]', - '[IMPORT_JOB]' - ); - - get_import_job_sample($formattedName); -} -// [END cloudkms_v1_generated_KeyManagementService_GetImportJob_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_key_ring.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_key_ring.php deleted file mode 100644 index db3efbae18ca..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_key_ring.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var KeyRing $response */ - $response = $keyManagementServiceClient->getKeyRing($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = KeyManagementServiceClient::keyRingName('[PROJECT]', '[LOCATION]', '[KEY_RING]'); - - get_key_ring_sample($formattedName); -} -// [END cloudkms_v1_generated_KeyManagementService_GetKeyRing_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_location.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_location.php deleted file mode 100644 index f83e59c97894..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_location.php +++ /dev/null @@ -1,57 +0,0 @@ -getLocation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END cloudkms_v1_generated_KeyManagementService_GetLocation_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_public_key.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_public_key.php deleted file mode 100644 index 4a31fb703223..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_public_key.php +++ /dev/null @@ -1,83 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var PublicKey $response */ - $response = $keyManagementServiceClient->getPublicKey($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = KeyManagementServiceClient::cryptoKeyVersionName( - '[PROJECT]', - '[LOCATION]', - '[KEY_RING]', - '[CRYPTO_KEY]', - '[CRYPTO_KEY_VERSION]' - ); - - get_public_key_sample($formattedName); -} -// [END cloudkms_v1_generated_KeyManagementService_GetPublicKey_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_retired_resource.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_retired_resource.php deleted file mode 100644 index c552d042d410..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_retired_resource.php +++ /dev/null @@ -1,78 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var RetiredResource $response */ - $response = $keyManagementServiceClient->getRetiredResource($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = KeyManagementServiceClient::retiredResourceName( - '[PROJECT]', - '[LOCATION]', - '[RETIRED_RESOURCE]' - ); - - get_retired_resource_sample($formattedName); -} -// [END cloudkms_v1_generated_KeyManagementService_GetRetiredResource_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/import_crypto_key_version.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/import_crypto_key_version.php deleted file mode 100644 index cc2cc250ac92..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/import_crypto_key_version.php +++ /dev/null @@ -1,103 +0,0 @@ -setParent($formattedParent) - ->setAlgorithm($algorithm) - ->setImportJob($importJob); - - // Call the API and handle any network failures. - try { - /** @var CryptoKeyVersion $response */ - $response = $keyManagementServiceClient->importCryptoKeyVersion($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = KeyManagementServiceClient::cryptoKeyName( - '[PROJECT]', - '[LOCATION]', - '[KEY_RING]', - '[CRYPTO_KEY]' - ); - $algorithm = CryptoKeyVersionAlgorithm::CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED; - $importJob = '[IMPORT_JOB]'; - - import_crypto_key_version_sample($formattedParent, $algorithm, $importJob); -} -// [END cloudkms_v1_generated_KeyManagementService_ImportCryptoKeyVersion_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_crypto_key_versions.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_crypto_key_versions.php deleted file mode 100644 index da69102bb348..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_crypto_key_versions.php +++ /dev/null @@ -1,83 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $keyManagementServiceClient->listCryptoKeyVersions($request); - - /** @var CryptoKeyVersion $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = KeyManagementServiceClient::cryptoKeyName( - '[PROJECT]', - '[LOCATION]', - '[KEY_RING]', - '[CRYPTO_KEY]' - ); - - list_crypto_key_versions_sample($formattedParent); -} -// [END cloudkms_v1_generated_KeyManagementService_ListCryptoKeyVersions_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_crypto_keys.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_crypto_keys.php deleted file mode 100644 index b69ff939a120..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_crypto_keys.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $keyManagementServiceClient->listCryptoKeys($request); - - /** @var CryptoKey $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = KeyManagementServiceClient::keyRingName('[PROJECT]', '[LOCATION]', '[KEY_RING]'); - - list_crypto_keys_sample($formattedParent); -} -// [END cloudkms_v1_generated_KeyManagementService_ListCryptoKeys_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_import_jobs.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_import_jobs.php deleted file mode 100644 index fb969eb61db7..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_import_jobs.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $keyManagementServiceClient->listImportJobs($request); - - /** @var ImportJob $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = KeyManagementServiceClient::keyRingName('[PROJECT]', '[LOCATION]', '[KEY_RING]'); - - list_import_jobs_sample($formattedParent); -} -// [END cloudkms_v1_generated_KeyManagementService_ListImportJobs_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_key_rings.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_key_rings.php deleted file mode 100644 index 4ddae61ad91a..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_key_rings.php +++ /dev/null @@ -1,78 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $keyManagementServiceClient->listKeyRings($request); - - /** @var KeyRing $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = KeyManagementServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - list_key_rings_sample($formattedParent); -} -// [END cloudkms_v1_generated_KeyManagementService_ListKeyRings_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_locations.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_locations.php deleted file mode 100644 index eb1a063c8f1a..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_locations.php +++ /dev/null @@ -1,69 +0,0 @@ -listLocations($request); - - /** @var Location $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END cloudkms_v1_generated_KeyManagementService_ListLocations_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_retired_resources.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_retired_resources.php deleted file mode 100644 index 9229d578bafe..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_retired_resources.php +++ /dev/null @@ -1,80 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $keyManagementServiceClient->listRetiredResources($request); - - /** @var RetiredResource $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = KeyManagementServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - list_retired_resources_sample($formattedParent); -} -// [END cloudkms_v1_generated_KeyManagementService_ListRetiredResources_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/mac_sign.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/mac_sign.php deleted file mode 100644 index e4176ade1d22..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/mac_sign.php +++ /dev/null @@ -1,85 +0,0 @@ -setName($formattedName) - ->setData($data); - - // Call the API and handle any network failures. - try { - /** @var MacSignResponse $response */ - $response = $keyManagementServiceClient->macSign($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = KeyManagementServiceClient::cryptoKeyVersionName( - '[PROJECT]', - '[LOCATION]', - '[KEY_RING]', - '[CRYPTO_KEY]', - '[CRYPTO_KEY_VERSION]' - ); - $data = '...'; - - mac_sign_sample($formattedName, $data); -} -// [END cloudkms_v1_generated_KeyManagementService_MacSign_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/mac_verify.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/mac_verify.php deleted file mode 100644 index 97f20f09929d..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/mac_verify.php +++ /dev/null @@ -1,90 +0,0 @@ -setName($formattedName) - ->setData($data) - ->setMac($mac); - - // Call the API and handle any network failures. - try { - /** @var MacVerifyResponse $response */ - $response = $keyManagementServiceClient->macVerify($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = KeyManagementServiceClient::cryptoKeyVersionName( - '[PROJECT]', - '[LOCATION]', - '[KEY_RING]', - '[CRYPTO_KEY]', - '[CRYPTO_KEY_VERSION]' - ); - $data = '...'; - $mac = '...'; - - mac_verify_sample($formattedName, $data, $mac); -} -// [END cloudkms_v1_generated_KeyManagementService_MacVerify_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/raw_decrypt.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/raw_decrypt.php deleted file mode 100644 index 40e08ceee581..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/raw_decrypt.php +++ /dev/null @@ -1,84 +0,0 @@ -setName($name) - ->setCiphertext($ciphertext) - ->setInitializationVector($initializationVector); - - // Call the API and handle any network failures. - try { - /** @var RawDecryptResponse $response */ - $response = $keyManagementServiceClient->rawDecrypt($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $name = '[NAME]'; - $ciphertext = '...'; - $initializationVector = '...'; - - raw_decrypt_sample($name, $ciphertext, $initializationVector); -} -// [END cloudkms_v1_generated_KeyManagementService_RawDecrypt_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/raw_encrypt.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/raw_encrypt.php deleted file mode 100644 index 00ea7c7023f0..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/raw_encrypt.php +++ /dev/null @@ -1,88 +0,0 @@ -setName($name) - ->setPlaintext($plaintext); - - // Call the API and handle any network failures. - try { - /** @var RawEncryptResponse $response */ - $response = $keyManagementServiceClient->rawEncrypt($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $name = '[NAME]'; - $plaintext = '...'; - - raw_encrypt_sample($name, $plaintext); -} -// [END cloudkms_v1_generated_KeyManagementService_RawEncrypt_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/restore_crypto_key_version.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/restore_crypto_key_version.php deleted file mode 100644 index 4076a23dd0e1..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/restore_crypto_key_version.php +++ /dev/null @@ -1,86 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var CryptoKeyVersion $response */ - $response = $keyManagementServiceClient->restoreCryptoKeyVersion($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = KeyManagementServiceClient::cryptoKeyVersionName( - '[PROJECT]', - '[LOCATION]', - '[KEY_RING]', - '[CRYPTO_KEY]', - '[CRYPTO_KEY_VERSION]' - ); - - restore_crypto_key_version_sample($formattedName); -} -// [END cloudkms_v1_generated_KeyManagementService_RestoreCryptoKeyVersion_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/set_iam_policy.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/set_iam_policy.php deleted file mode 100644 index 5d9e43c625bc..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/set_iam_policy.php +++ /dev/null @@ -1,77 +0,0 @@ -setResource($resource) - ->setPolicy($policy); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $keyManagementServiceClient->setIamPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - set_iam_policy_sample($resource); -} -// [END cloudkms_v1_generated_KeyManagementService_SetIamPolicy_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/test_iam_permissions.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/test_iam_permissions.php deleted file mode 100644 index ff01be37bd92..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/test_iam_permissions.php +++ /dev/null @@ -1,84 +0,0 @@ -setResource($resource) - ->setPermissions($permissions); - - // Call the API and handle any network failures. - try { - /** @var TestIamPermissionsResponse $response */ - $response = $keyManagementServiceClient->testIamPermissions($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - $permissionsElement = '[PERMISSIONS]'; - - test_iam_permissions_sample($resource, $permissionsElement); -} -// [END cloudkms_v1_generated_KeyManagementService_TestIamPermissions_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/update_crypto_key.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/update_crypto_key.php deleted file mode 100644 index 9dfd58b44670..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/update_crypto_key.php +++ /dev/null @@ -1,62 +0,0 @@ -setCryptoKey($cryptoKey) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var CryptoKey $response */ - $response = $keyManagementServiceClient->updateCryptoKey($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END cloudkms_v1_generated_KeyManagementService_UpdateCryptoKey_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/update_crypto_key_primary_version.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/update_crypto_key_primary_version.php deleted file mode 100644 index 0bb435995448..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/update_crypto_key_primary_version.php +++ /dev/null @@ -1,88 +0,0 @@ -setName($formattedName) - ->setCryptoKeyVersionId($cryptoKeyVersionId); - - // Call the API and handle any network failures. - try { - /** @var CryptoKey $response */ - $response = $keyManagementServiceClient->updateCryptoKeyPrimaryVersion($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = KeyManagementServiceClient::cryptoKeyName( - '[PROJECT]', - '[LOCATION]', - '[KEY_RING]', - '[CRYPTO_KEY]' - ); - $cryptoKeyVersionId = '[CRYPTO_KEY_VERSION_ID]'; - - update_crypto_key_primary_version_sample($formattedName, $cryptoKeyVersionId); -} -// [END cloudkms_v1_generated_KeyManagementService_UpdateCryptoKeyPrimaryVersion_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/update_crypto_key_version.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/update_crypto_key_version.php deleted file mode 100644 index 706386ccd5c1..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/update_crypto_key_version.php +++ /dev/null @@ -1,73 +0,0 @@ -setCryptoKeyVersion($cryptoKeyVersion) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var CryptoKeyVersion $response */ - $response = $keyManagementServiceClient->updateCryptoKeyVersion($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END cloudkms_v1_generated_KeyManagementService_UpdateCryptoKeyVersion_sync] diff --git a/owl-bot-staging/Kms/v1/src/V1/Client/AutokeyAdminClient.php b/owl-bot-staging/Kms/v1/src/V1/Client/AutokeyAdminClient.php deleted file mode 100644 index e76144ea7eb4..000000000000 --- a/owl-bot-staging/Kms/v1/src/V1/Client/AutokeyAdminClient.php +++ /dev/null @@ -1,536 +0,0 @@ - getAutokeyConfigAsync(GetAutokeyConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface showEffectiveAutokeyConfigAsync(ShowEffectiveAutokeyConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateAutokeyConfigAsync(UpdateAutokeyConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) - */ -final class AutokeyAdminClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.kms.v1.AutokeyAdmin'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'cloudkms.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'cloudkms.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/cloudkms', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/autokey_admin_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/autokey_admin_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/autokey_admin_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/autokey_admin_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a - * autokey_config resource. - * - * @param string $folder - * - * @return string The formatted autokey_config resource. - */ - public static function autokeyConfigName(string $folder): string - { - return self::getPathTemplate('autokeyConfig')->render([ - 'folder' => $folder, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * folder_autokeyConfig resource. - * - * @param string $folder - * - * @return string The formatted folder_autokeyConfig resource. - */ - public static function folderAutokeyConfigName(string $folder): string - { - return self::getPathTemplate('folderAutokeyConfig')->render([ - 'folder' => $folder, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a project - * resource. - * - * @param string $project - * - * @return string The formatted project resource. - */ - public static function projectName(string $project): string - { - return self::getPathTemplate('project')->render([ - 'project' => $project, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_autokeyConfig resource. - * - * @param string $project - * - * @return string The formatted project_autokeyConfig resource. - */ - public static function projectAutokeyConfigName(string $project): string - { - return self::getPathTemplate('projectAutokeyConfig')->render([ - 'project' => $project, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - autokeyConfig: folders/{folder}/autokeyConfig - * - folderAutokeyConfig: folders/{folder}/autokeyConfig - * - project: projects/{project} - * - projectAutokeyConfig: projects/{project}/autokeyConfig - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param ?string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array|ClientOptions $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'cloudkms.googleapis.com:443'. - * @type FetchAuthTokenInterface|CredentialsWrapper $credentials - * This option should only be used with a pre-constructed - * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that - * when one of these objects are provided, any settings in $credentialsConfig will - * be ignored. - * **Important**: If you are providing a path to a credentials file, or a decoded - * credentials file as a PHP array, this usage is now DEPRECATED. Providing an - * unvalidated credential configuration to Google APIs can compromise the security - * of your systems and data. It is recommended to create the credentials explicitly - * ``` - * use Google\Auth\Credentials\ServiceAccountCredentials; - * use Google\Cloud\Kms\V1\AutokeyAdminClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new AutokeyAdminClient(['credentials' => $creds]); - * ``` - * {@see - * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * @type string $universeDomain - * The service domain for the client. Defaults to 'googleapis.com'. - * } - * - * @throws ValidationException - */ - public function __construct(array|ClientOptions $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Returns the [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig] for a folder - * or project. - * - * The async variant is {@see AutokeyAdminClient::getAutokeyConfigAsync()} . - * - * @example samples/V1/AutokeyAdminClient/get_autokey_config.php - * - * @param GetAutokeyConfigRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return AutokeyConfig - * - * @throws ApiException Thrown if the API call fails. - */ - public function getAutokeyConfig(GetAutokeyConfigRequest $request, array $callOptions = []): AutokeyConfig - { - return $this->startApiCall('GetAutokeyConfig', $request, $callOptions)->wait(); - } - - /** - * Returns the effective Cloud KMS Autokey configuration for a given project. - * - * The async variant is - * {@see AutokeyAdminClient::showEffectiveAutokeyConfigAsync()} . - * - * @example samples/V1/AutokeyAdminClient/show_effective_autokey_config.php - * - * @param ShowEffectiveAutokeyConfigRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ShowEffectiveAutokeyConfigResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function showEffectiveAutokeyConfig(ShowEffectiveAutokeyConfigRequest $request, array $callOptions = []): ShowEffectiveAutokeyConfigResponse - { - return $this->startApiCall('ShowEffectiveAutokeyConfig', $request, $callOptions)->wait(); - } - - /** - * Updates the [AutokeyConfig][google.cloud.kms.v1.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][google.cloud.kms.v1.KeyHandle] creation in the folder's - * descendant projects will use this configuration to determine where to - * create the resulting [CryptoKey][google.cloud.kms.v1.CryptoKey]. - * - * The async variant is {@see AutokeyAdminClient::updateAutokeyConfigAsync()} . - * - * @example samples/V1/AutokeyAdminClient/update_autokey_config.php - * - * @param UpdateAutokeyConfigRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return AutokeyConfig - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateAutokeyConfig(UpdateAutokeyConfigRequest $request, array $callOptions = []): AutokeyConfig - { - return $this->startApiCall('UpdateAutokeyConfig', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see AutokeyAdminClient::getLocationAsync()} . - * - * @example samples/V1/AutokeyAdminClient/get_location.php - * - * @param GetLocationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Location - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLocation(GetLocationRequest $request, array $callOptions = []): Location - { - return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); - } - - /** - * Lists information about the supported locations for this service. - This method can be called in two ways: - - * **List all public locations:** Use the path `GET /v1/locations`. - * **List project-visible locations:** Use the path - `GET /v1/projects/{project_id}/locations`. This may include public - locations as well as private or other locations specifically visible - to the project. - * - * The async variant is {@see AutokeyAdminClient::listLocationsAsync()} . - * - * @example samples/V1/AutokeyAdminClient/list_locations.php - * - * @param ListLocationsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLocations', $request, $callOptions); - } - - /** - * Gets the access control policy for a resource. Returns an empty policy - if the resource exists and does not have a policy set. - * - * The async variant is {@see AutokeyAdminClient::getIamPolicyAsync()} . - * - * @example samples/V1/AutokeyAdminClient/get_iam_policy.php - * - * @param GetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Sets the access control policy on the specified resource. Replaces - any existing policy. - - Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` - errors. - * - * The async variant is {@see AutokeyAdminClient::setIamPolicyAsync()} . - * - * @example samples/V1/AutokeyAdminClient/set_iam_policy.php - * - * @param SetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * 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. - * - * The async variant is {@see AutokeyAdminClient::testIamPermissionsAsync()} . - * - * @example samples/V1/AutokeyAdminClient/test_iam_permissions.php - * - * @param TestIamPermissionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TestIamPermissionsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse - { - return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/Kms/v1/src/V1/Client/AutokeyClient.php b/owl-bot-staging/Kms/v1/src/V1/Client/AutokeyClient.php deleted file mode 100644 index 5bd926303f91..000000000000 --- a/owl-bot-staging/Kms/v1/src/V1/Client/AutokeyClient.php +++ /dev/null @@ -1,591 +0,0 @@ - createKeyHandleAsync(CreateKeyHandleRequest $request, array $optionalArgs = []) - * @method PromiseInterface getKeyHandleAsync(GetKeyHandleRequest $request, array $optionalArgs = []) - * @method PromiseInterface listKeyHandlesAsync(ListKeyHandlesRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) - */ -final class AutokeyClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.kms.v1.Autokey'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'cloudkms.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'cloudkms.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/cloudkms', - ]; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/autokey_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/autokey_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/autokey_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/autokey_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = $this->descriptors[$methodName]['longRunning'] ?? []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Create the default operation client for the service. - * - * @param array $options ClientOptions for the client. - * - * @return OperationsClient - */ - private function createOperationsClient(array $options) - { - // Unset client-specific configuration options - unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); - - if (isset($options['operationsClient'])) { - return $options['operationsClient']; - } - - return new OperationsClient($options); - } - - /** - * Formats a string containing the fully-qualified path to represent a crypto_key - * resource. - * - * @param string $project - * @param string $location - * @param string $keyRing - * @param string $cryptoKey - * - * @return string The formatted crypto_key resource. - */ - public static function cryptoKeyName(string $project, string $location, string $keyRing, string $cryptoKey): string - { - return self::getPathTemplate('cryptoKey')->render([ - 'project' => $project, - 'location' => $location, - 'key_ring' => $keyRing, - 'crypto_key' => $cryptoKey, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a key_handle - * resource. - * - * @param string $project - * @param string $location - * @param string $keyHandle - * - * @return string The formatted key_handle resource. - */ - public static function keyHandleName(string $project, string $location, string $keyHandle): string - { - return self::getPathTemplate('keyHandle')->render([ - 'project' => $project, - 'location' => $location, - 'key_handle' => $keyHandle, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName(string $project, string $location): string - { - return self::getPathTemplate('location')->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - cryptoKey: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key} - * - keyHandle: projects/{project}/locations/{location}/keyHandles/{key_handle} - * - location: projects/{project}/locations/{location} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param ?string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array|ClientOptions $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'cloudkms.googleapis.com:443'. - * @type FetchAuthTokenInterface|CredentialsWrapper $credentials - * This option should only be used with a pre-constructed - * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that - * when one of these objects are provided, any settings in $credentialsConfig will - * be ignored. - * **Important**: If you are providing a path to a credentials file, or a decoded - * credentials file as a PHP array, this usage is now DEPRECATED. Providing an - * unvalidated credential configuration to Google APIs can compromise the security - * of your systems and data. It is recommended to create the credentials explicitly - * ``` - * use Google\Auth\Credentials\ServiceAccountCredentials; - * use Google\Cloud\Kms\V1\AutokeyClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new AutokeyClient(['credentials' => $creds]); - * ``` - * {@see - * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * @type string $universeDomain - * The service domain for the client. Defaults to 'googleapis.com'. - * } - * - * @throws ValidationException - */ - public function __construct(array|ClientOptions $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates a new [KeyHandle][google.cloud.kms.v1.KeyHandle], triggering the - * provisioning of a new [CryptoKey][google.cloud.kms.v1.CryptoKey] for CMEK - * use with the given resource type in the configured key project and the same - * location. [GetOperation][google.longrunning.Operations.GetOperation] should - * be used to resolve the resulting long-running operation and get the - * resulting [KeyHandle][google.cloud.kms.v1.KeyHandle] and - * [CryptoKey][google.cloud.kms.v1.CryptoKey]. - * - * The async variant is {@see AutokeyClient::createKeyHandleAsync()} . - * - * @example samples/V1/AutokeyClient/create_key_handle.php - * - * @param CreateKeyHandleRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createKeyHandle(CreateKeyHandleRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateKeyHandle', $request, $callOptions)->wait(); - } - - /** - * Returns the [KeyHandle][google.cloud.kms.v1.KeyHandle]. - * - * The async variant is {@see AutokeyClient::getKeyHandleAsync()} . - * - * @example samples/V1/AutokeyClient/get_key_handle.php - * - * @param GetKeyHandleRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return KeyHandle - * - * @throws ApiException Thrown if the API call fails. - */ - public function getKeyHandle(GetKeyHandleRequest $request, array $callOptions = []): KeyHandle - { - return $this->startApiCall('GetKeyHandle', $request, $callOptions)->wait(); - } - - /** - * Lists [KeyHandles][google.cloud.kms.v1.KeyHandle]. - * - * The async variant is {@see AutokeyClient::listKeyHandlesAsync()} . - * - * @example samples/V1/AutokeyClient/list_key_handles.php - * - * @param ListKeyHandlesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listKeyHandles(ListKeyHandlesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListKeyHandles', $request, $callOptions); - } - - /** - * Gets information about a location. - * - * The async variant is {@see AutokeyClient::getLocationAsync()} . - * - * @example samples/V1/AutokeyClient/get_location.php - * - * @param GetLocationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Location - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLocation(GetLocationRequest $request, array $callOptions = []): Location - { - return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); - } - - /** - * Lists information about the supported locations for this service. - This method can be called in two ways: - - * **List all public locations:** Use the path `GET /v1/locations`. - * **List project-visible locations:** Use the path - `GET /v1/projects/{project_id}/locations`. This may include public - locations as well as private or other locations specifically visible - to the project. - * - * The async variant is {@see AutokeyClient::listLocationsAsync()} . - * - * @example samples/V1/AutokeyClient/list_locations.php - * - * @param ListLocationsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLocations', $request, $callOptions); - } - - /** - * Gets the access control policy for a resource. Returns an empty policy - if the resource exists and does not have a policy set. - * - * The async variant is {@see AutokeyClient::getIamPolicyAsync()} . - * - * @example samples/V1/AutokeyClient/get_iam_policy.php - * - * @param GetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Sets the access control policy on the specified resource. Replaces - any existing policy. - - Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` - errors. - * - * The async variant is {@see AutokeyClient::setIamPolicyAsync()} . - * - * @example samples/V1/AutokeyClient/set_iam_policy.php - * - * @param SetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * 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. - * - * The async variant is {@see AutokeyClient::testIamPermissionsAsync()} . - * - * @example samples/V1/AutokeyClient/test_iam_permissions.php - * - * @param TestIamPermissionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TestIamPermissionsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse - { - return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/Kms/v1/src/V1/Client/EkmServiceClient.php b/owl-bot-staging/Kms/v1/src/V1/Client/EkmServiceClient.php deleted file mode 100644 index deb75945fd61..000000000000 --- a/owl-bot-staging/Kms/v1/src/V1/Client/EkmServiceClient.php +++ /dev/null @@ -1,658 +0,0 @@ - createEkmConnectionAsync(CreateEkmConnectionRequest $request, array $optionalArgs = []) - * @method PromiseInterface getEkmConfigAsync(GetEkmConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface getEkmConnectionAsync(GetEkmConnectionRequest $request, array $optionalArgs = []) - * @method PromiseInterface listEkmConnectionsAsync(ListEkmConnectionsRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateEkmConfigAsync(UpdateEkmConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateEkmConnectionAsync(UpdateEkmConnectionRequest $request, array $optionalArgs = []) - * @method PromiseInterface verifyConnectivityAsync(VerifyConnectivityRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) - */ -final class EkmServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.kms.v1.EkmService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'cloudkms.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'cloudkms.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/cloudkms', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/ekm_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/ekm_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/ekm_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/ekm_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a ekm_config - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted ekm_config resource. - */ - public static function ekmConfigName(string $project, string $location): string - { - return self::getPathTemplate('ekmConfig')->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * ekm_connection resource. - * - * @param string $project - * @param string $location - * @param string $ekmConnection - * - * @return string The formatted ekm_connection resource. - */ - public static function ekmConnectionName(string $project, string $location, string $ekmConnection): string - { - return self::getPathTemplate('ekmConnection')->render([ - 'project' => $project, - 'location' => $location, - 'ekm_connection' => $ekmConnection, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName(string $project, string $location): string - { - return self::getPathTemplate('location')->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a service - * resource. - * - * @param string $project - * @param string $location - * @param string $namespace - * @param string $service - * - * @return string The formatted service resource. - */ - public static function serviceName(string $project, string $location, string $namespace, string $service): string - { - return self::getPathTemplate('service')->render([ - 'project' => $project, - 'location' => $location, - 'namespace' => $namespace, - 'service' => $service, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - ekmConfig: projects/{project}/locations/{location}/ekmConfig - * - ekmConnection: projects/{project}/locations/{location}/ekmConnections/{ekm_connection} - * - location: projects/{project}/locations/{location} - * - service: projects/{project}/locations/{location}/namespaces/{namespace}/services/{service} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param ?string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array|ClientOptions $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'cloudkms.googleapis.com:443'. - * @type FetchAuthTokenInterface|CredentialsWrapper $credentials - * This option should only be used with a pre-constructed - * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that - * when one of these objects are provided, any settings in $credentialsConfig will - * be ignored. - * **Important**: If you are providing a path to a credentials file, or a decoded - * credentials file as a PHP array, this usage is now DEPRECATED. Providing an - * unvalidated credential configuration to Google APIs can compromise the security - * of your systems and data. It is recommended to create the credentials explicitly - * ``` - * use Google\Auth\Credentials\ServiceAccountCredentials; - * use Google\Cloud\Kms\V1\EkmServiceClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new EkmServiceClient(['credentials' => $creds]); - * ``` - * {@see - * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * @type string $universeDomain - * The service domain for the client. Defaults to 'googleapis.com'. - * } - * - * @throws ValidationException - */ - public function __construct(array|ClientOptions $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates a new [EkmConnection][google.cloud.kms.v1.EkmConnection] in a given - * Project and Location. - * - * The async variant is {@see EkmServiceClient::createEkmConnectionAsync()} . - * - * @example samples/V1/EkmServiceClient/create_ekm_connection.php - * - * @param CreateEkmConnectionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return EkmConnection - * - * @throws ApiException Thrown if the API call fails. - */ - public function createEkmConnection(CreateEkmConnectionRequest $request, array $callOptions = []): EkmConnection - { - return $this->startApiCall('CreateEkmConnection', $request, $callOptions)->wait(); - } - - /** - * Returns the [EkmConfig][google.cloud.kms.v1.EkmConfig] singleton resource - * for a given project and location. - * - * The async variant is {@see EkmServiceClient::getEkmConfigAsync()} . - * - * @example samples/V1/EkmServiceClient/get_ekm_config.php - * - * @param GetEkmConfigRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return EkmConfig - * - * @throws ApiException Thrown if the API call fails. - */ - public function getEkmConfig(GetEkmConfigRequest $request, array $callOptions = []): EkmConfig - { - return $this->startApiCall('GetEkmConfig', $request, $callOptions)->wait(); - } - - /** - * Returns metadata for a given - * [EkmConnection][google.cloud.kms.v1.EkmConnection]. - * - * The async variant is {@see EkmServiceClient::getEkmConnectionAsync()} . - * - * @example samples/V1/EkmServiceClient/get_ekm_connection.php - * - * @param GetEkmConnectionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return EkmConnection - * - * @throws ApiException Thrown if the API call fails. - */ - public function getEkmConnection(GetEkmConnectionRequest $request, array $callOptions = []): EkmConnection - { - return $this->startApiCall('GetEkmConnection', $request, $callOptions)->wait(); - } - - /** - * Lists [EkmConnections][google.cloud.kms.v1.EkmConnection]. - * - * The async variant is {@see EkmServiceClient::listEkmConnectionsAsync()} . - * - * @example samples/V1/EkmServiceClient/list_ekm_connections.php - * - * @param ListEkmConnectionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listEkmConnections(ListEkmConnectionsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListEkmConnections', $request, $callOptions); - } - - /** - * Updates the [EkmConfig][google.cloud.kms.v1.EkmConfig] singleton resource - * for a given project and location. - * - * The async variant is {@see EkmServiceClient::updateEkmConfigAsync()} . - * - * @example samples/V1/EkmServiceClient/update_ekm_config.php - * - * @param UpdateEkmConfigRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return EkmConfig - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateEkmConfig(UpdateEkmConfigRequest $request, array $callOptions = []): EkmConfig - { - return $this->startApiCall('UpdateEkmConfig', $request, $callOptions)->wait(); - } - - /** - * Updates an [EkmConnection][google.cloud.kms.v1.EkmConnection]'s metadata. - * - * The async variant is {@see EkmServiceClient::updateEkmConnectionAsync()} . - * - * @example samples/V1/EkmServiceClient/update_ekm_connection.php - * - * @param UpdateEkmConnectionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return EkmConnection - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateEkmConnection(UpdateEkmConnectionRequest $request, array $callOptions = []): EkmConnection - { - return $this->startApiCall('UpdateEkmConnection', $request, $callOptions)->wait(); - } - - /** - * Verifies that Cloud KMS can successfully connect to the external key - * manager specified by an [EkmConnection][google.cloud.kms.v1.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. - * - * The async variant is {@see EkmServiceClient::verifyConnectivityAsync()} . - * - * @example samples/V1/EkmServiceClient/verify_connectivity.php - * - * @param VerifyConnectivityRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return VerifyConnectivityResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function verifyConnectivity(VerifyConnectivityRequest $request, array $callOptions = []): VerifyConnectivityResponse - { - return $this->startApiCall('VerifyConnectivity', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see EkmServiceClient::getLocationAsync()} . - * - * @example samples/V1/EkmServiceClient/get_location.php - * - * @param GetLocationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Location - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLocation(GetLocationRequest $request, array $callOptions = []): Location - { - return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); - } - - /** - * Lists information about the supported locations for this service. - This method can be called in two ways: - - * **List all public locations:** Use the path `GET /v1/locations`. - * **List project-visible locations:** Use the path - `GET /v1/projects/{project_id}/locations`. This may include public - locations as well as private or other locations specifically visible - to the project. - * - * The async variant is {@see EkmServiceClient::listLocationsAsync()} . - * - * @example samples/V1/EkmServiceClient/list_locations.php - * - * @param ListLocationsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLocations', $request, $callOptions); - } - - /** - * Gets the access control policy for a resource. Returns an empty policy - if the resource exists and does not have a policy set. - * - * The async variant is {@see EkmServiceClient::getIamPolicyAsync()} . - * - * @example samples/V1/EkmServiceClient/get_iam_policy.php - * - * @param GetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Sets the access control policy on the specified resource. Replaces - any existing policy. - - Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` - errors. - * - * The async variant is {@see EkmServiceClient::setIamPolicyAsync()} . - * - * @example samples/V1/EkmServiceClient/set_iam_policy.php - * - * @param SetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * 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. - * - * The async variant is {@see EkmServiceClient::testIamPermissionsAsync()} . - * - * @example samples/V1/EkmServiceClient/test_iam_permissions.php - * - * @param TestIamPermissionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TestIamPermissionsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse - { - return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/Kms/v1/src/V1/Client/HsmManagementClient.php b/owl-bot-staging/Kms/v1/src/V1/Client/HsmManagementClient.php deleted file mode 100644 index 8ef8ca892d3d..000000000000 --- a/owl-bot-staging/Kms/v1/src/V1/Client/HsmManagementClient.php +++ /dev/null @@ -1,776 +0,0 @@ - approveSingleTenantHsmInstanceProposalAsync(ApproveSingleTenantHsmInstanceProposalRequest $request, array $optionalArgs = []) - * @method PromiseInterface createSingleTenantHsmInstanceAsync(CreateSingleTenantHsmInstanceRequest $request, array $optionalArgs = []) - * @method PromiseInterface createSingleTenantHsmInstanceProposalAsync(CreateSingleTenantHsmInstanceProposalRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteSingleTenantHsmInstanceProposalAsync(DeleteSingleTenantHsmInstanceProposalRequest $request, array $optionalArgs = []) - * @method PromiseInterface executeSingleTenantHsmInstanceProposalAsync(ExecuteSingleTenantHsmInstanceProposalRequest $request, array $optionalArgs = []) - * @method PromiseInterface getSingleTenantHsmInstanceAsync(GetSingleTenantHsmInstanceRequest $request, array $optionalArgs = []) - * @method PromiseInterface getSingleTenantHsmInstanceProposalAsync(GetSingleTenantHsmInstanceProposalRequest $request, array $optionalArgs = []) - * @method PromiseInterface listSingleTenantHsmInstanceProposalsAsync(ListSingleTenantHsmInstanceProposalsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listSingleTenantHsmInstancesAsync(ListSingleTenantHsmInstancesRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) - */ -final class HsmManagementClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.kms.v1.HsmManagement'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'cloudkms.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'cloudkms.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/cloudkms', - ]; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/hsm_management_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/hsm_management_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/hsm_management_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/hsm_management_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = $this->descriptors[$methodName]['longRunning'] ?? []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Create the default operation client for the service. - * - * @param array $options ClientOptions for the client. - * - * @return OperationsClient - */ - private function createOperationsClient(array $options) - { - // Unset client-specific configuration options - unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); - - if (isset($options['operationsClient'])) { - return $options['operationsClient']; - } - - return new OperationsClient($options); - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName(string $project, string $location): string - { - return self::getPathTemplate('location')->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * single_tenant_hsm_instance resource. - * - * @param string $project - * @param string $location - * @param string $singleTenantHsmInstance - * - * @return string The formatted single_tenant_hsm_instance resource. - */ - public static function singleTenantHsmInstanceName(string $project, string $location, string $singleTenantHsmInstance): string - { - return self::getPathTemplate('singleTenantHsmInstance')->render([ - 'project' => $project, - 'location' => $location, - 'single_tenant_hsm_instance' => $singleTenantHsmInstance, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * single_tenant_hsm_instance_proposal resource. - * - * @param string $project - * @param string $location - * @param string $singleTenantHsmInstance - * @param string $proposal - * - * @return string The formatted single_tenant_hsm_instance_proposal resource. - */ - public static function singleTenantHsmInstanceProposalName(string $project, string $location, string $singleTenantHsmInstance, string $proposal): string - { - return self::getPathTemplate('singleTenantHsmInstanceProposal')->render([ - 'project' => $project, - 'location' => $location, - 'single_tenant_hsm_instance' => $singleTenantHsmInstance, - 'proposal' => $proposal, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - location: projects/{project}/locations/{location} - * - singleTenantHsmInstance: projects/{project}/locations/{location}/singleTenantHsmInstances/{single_tenant_hsm_instance} - * - singleTenantHsmInstanceProposal: projects/{project}/locations/{location}/singleTenantHsmInstances/{single_tenant_hsm_instance}/proposals/{proposal} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param ?string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array|ClientOptions $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'cloudkms.googleapis.com:443'. - * @type FetchAuthTokenInterface|CredentialsWrapper $credentials - * This option should only be used with a pre-constructed - * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that - * when one of these objects are provided, any settings in $credentialsConfig will - * be ignored. - * **Important**: If you are providing a path to a credentials file, or a decoded - * credentials file as a PHP array, this usage is now DEPRECATED. Providing an - * unvalidated credential configuration to Google APIs can compromise the security - * of your systems and data. It is recommended to create the credentials explicitly - * ``` - * use Google\Auth\Credentials\ServiceAccountCredentials; - * use Google\Cloud\Kms\V1\HsmManagementClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new HsmManagementClient(['credentials' => $creds]); - * ``` - * {@see - * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * @type string $universeDomain - * The service domain for the client. Defaults to 'googleapis.com'. - * } - * - * @throws ValidationException - */ - public function __construct(array|ClientOptions $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Approves a - * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * for a given - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. The - * proposal must be in the - * [PENDING][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.State.PENDING] - * state. - * - * The async variant is - * {@see HsmManagementClient::approveSingleTenantHsmInstanceProposalAsync()} . - * - * @example samples/V1/HsmManagementClient/approve_single_tenant_hsm_instance_proposal.php - * - * @param ApproveSingleTenantHsmInstanceProposalRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ApproveSingleTenantHsmInstanceProposalResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function approveSingleTenantHsmInstanceProposal(ApproveSingleTenantHsmInstanceProposalRequest $request, array $callOptions = []): ApproveSingleTenantHsmInstanceProposalResponse - { - return $this->startApiCall('ApproveSingleTenantHsmInstanceProposal', $request, $callOptions)->wait(); - } - - /** - * Creates a new - * [SingleTenantHsmInstance][google.cloud.kms.v1.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. - * - * The async variant is - * {@see HsmManagementClient::createSingleTenantHsmInstanceAsync()} . - * - * @example samples/V1/HsmManagementClient/create_single_tenant_hsm_instance.php - * - * @param CreateSingleTenantHsmInstanceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createSingleTenantHsmInstance(CreateSingleTenantHsmInstanceRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateSingleTenantHsmInstance', $request, $callOptions)->wait(); - } - - /** - * Creates a new - * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * for a given - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. - * - * The async variant is - * {@see HsmManagementClient::createSingleTenantHsmInstanceProposalAsync()} . - * - * @example samples/V1/HsmManagementClient/create_single_tenant_hsm_instance_proposal.php - * - * @param CreateSingleTenantHsmInstanceProposalRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createSingleTenantHsmInstanceProposal(CreateSingleTenantHsmInstanceProposalRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateSingleTenantHsmInstanceProposal', $request, $callOptions)->wait(); - } - - /** - * Deletes a - * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal]. - * - * The async variant is - * {@see HsmManagementClient::deleteSingleTenantHsmInstanceProposalAsync()} . - * - * @example samples/V1/HsmManagementClient/delete_single_tenant_hsm_instance_proposal.php - * - * @param DeleteSingleTenantHsmInstanceProposalRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteSingleTenantHsmInstanceProposal(DeleteSingleTenantHsmInstanceProposalRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteSingleTenantHsmInstanceProposal', $request, $callOptions)->wait(); - } - - /** - * Executes a - * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] - * for a given - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. The - * proposal must be in the - * [APPROVED][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.State.APPROVED] - * state. - * - * The async variant is - * {@see HsmManagementClient::executeSingleTenantHsmInstanceProposalAsync()} . - * - * @example samples/V1/HsmManagementClient/execute_single_tenant_hsm_instance_proposal.php - * - * @param ExecuteSingleTenantHsmInstanceProposalRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function executeSingleTenantHsmInstanceProposal(ExecuteSingleTenantHsmInstanceProposalRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('ExecuteSingleTenantHsmInstanceProposal', $request, $callOptions)->wait(); - } - - /** - * Returns metadata for a given - * [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. - * - * The async variant is - * {@see HsmManagementClient::getSingleTenantHsmInstanceAsync()} . - * - * @example samples/V1/HsmManagementClient/get_single_tenant_hsm_instance.php - * - * @param GetSingleTenantHsmInstanceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return SingleTenantHsmInstance - * - * @throws ApiException Thrown if the API call fails. - */ - public function getSingleTenantHsmInstance(GetSingleTenantHsmInstanceRequest $request, array $callOptions = []): SingleTenantHsmInstance - { - return $this->startApiCall('GetSingleTenantHsmInstance', $request, $callOptions)->wait(); - } - - /** - * Returns metadata for a given - * [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal]. - * - * The async variant is - * {@see HsmManagementClient::getSingleTenantHsmInstanceProposalAsync()} . - * - * @example samples/V1/HsmManagementClient/get_single_tenant_hsm_instance_proposal.php - * - * @param GetSingleTenantHsmInstanceProposalRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return SingleTenantHsmInstanceProposal - * - * @throws ApiException Thrown if the API call fails. - */ - public function getSingleTenantHsmInstanceProposal(GetSingleTenantHsmInstanceProposalRequest $request, array $callOptions = []): SingleTenantHsmInstanceProposal - { - return $this->startApiCall('GetSingleTenantHsmInstanceProposal', $request, $callOptions)->wait(); - } - - /** - * Lists - * [SingleTenantHsmInstanceProposals][google.cloud.kms.v1.SingleTenantHsmInstanceProposal]. - * - * The async variant is - * {@see HsmManagementClient::listSingleTenantHsmInstanceProposalsAsync()} . - * - * @example samples/V1/HsmManagementClient/list_single_tenant_hsm_instance_proposals.php - * - * @param ListSingleTenantHsmInstanceProposalsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listSingleTenantHsmInstanceProposals(ListSingleTenantHsmInstanceProposalsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListSingleTenantHsmInstanceProposals', $request, $callOptions); - } - - /** - * Lists - * [SingleTenantHsmInstances][google.cloud.kms.v1.SingleTenantHsmInstance]. - * - * The async variant is - * {@see HsmManagementClient::listSingleTenantHsmInstancesAsync()} . - * - * @example samples/V1/HsmManagementClient/list_single_tenant_hsm_instances.php - * - * @param ListSingleTenantHsmInstancesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listSingleTenantHsmInstances(ListSingleTenantHsmInstancesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListSingleTenantHsmInstances', $request, $callOptions); - } - - /** - * Gets information about a location. - * - * The async variant is {@see HsmManagementClient::getLocationAsync()} . - * - * @example samples/V1/HsmManagementClient/get_location.php - * - * @param GetLocationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Location - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLocation(GetLocationRequest $request, array $callOptions = []): Location - { - return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); - } - - /** - * Lists information about the supported locations for this service. - This method can be called in two ways: - - * **List all public locations:** Use the path `GET /v1/locations`. - * **List project-visible locations:** Use the path - `GET /v1/projects/{project_id}/locations`. This may include public - locations as well as private or other locations specifically visible - to the project. - * - * The async variant is {@see HsmManagementClient::listLocationsAsync()} . - * - * @example samples/V1/HsmManagementClient/list_locations.php - * - * @param ListLocationsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLocations', $request, $callOptions); - } - - /** - * Gets the access control policy for a resource. Returns an empty policy - if the resource exists and does not have a policy set. - * - * The async variant is {@see HsmManagementClient::getIamPolicyAsync()} . - * - * @example samples/V1/HsmManagementClient/get_iam_policy.php - * - * @param GetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Sets the access control policy on the specified resource. Replaces - any existing policy. - - Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` - errors. - * - * The async variant is {@see HsmManagementClient::setIamPolicyAsync()} . - * - * @example samples/V1/HsmManagementClient/set_iam_policy.php - * - * @param SetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * 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. - * - * The async variant is {@see HsmManagementClient::testIamPermissionsAsync()} . - * - * @example samples/V1/HsmManagementClient/test_iam_permissions.php - * - * @param TestIamPermissionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TestIamPermissionsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse - { - return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/Kms/v1/src/V1/Client/KeyManagementServiceClient.php b/owl-bot-staging/Kms/v1/src/V1/Client/KeyManagementServiceClient.php deleted file mode 100644 index 6807a2830a54..000000000000 --- a/owl-bot-staging/Kms/v1/src/V1/Client/KeyManagementServiceClient.php +++ /dev/null @@ -1,1639 +0,0 @@ - asymmetricDecryptAsync(AsymmetricDecryptRequest $request, array $optionalArgs = []) - * @method PromiseInterface asymmetricSignAsync(AsymmetricSignRequest $request, array $optionalArgs = []) - * @method PromiseInterface createCryptoKeyAsync(CreateCryptoKeyRequest $request, array $optionalArgs = []) - * @method PromiseInterface createCryptoKeyVersionAsync(CreateCryptoKeyVersionRequest $request, array $optionalArgs = []) - * @method PromiseInterface createImportJobAsync(CreateImportJobRequest $request, array $optionalArgs = []) - * @method PromiseInterface createKeyRingAsync(CreateKeyRingRequest $request, array $optionalArgs = []) - * @method PromiseInterface decapsulateAsync(DecapsulateRequest $request, array $optionalArgs = []) - * @method PromiseInterface decryptAsync(DecryptRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteCryptoKeyAsync(DeleteCryptoKeyRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteCryptoKeyVersionAsync(DeleteCryptoKeyVersionRequest $request, array $optionalArgs = []) - * @method PromiseInterface destroyCryptoKeyVersionAsync(DestroyCryptoKeyVersionRequest $request, array $optionalArgs = []) - * @method PromiseInterface encryptAsync(EncryptRequest $request, array $optionalArgs = []) - * @method PromiseInterface generateRandomBytesAsync(GenerateRandomBytesRequest $request, array $optionalArgs = []) - * @method PromiseInterface getCryptoKeyAsync(GetCryptoKeyRequest $request, array $optionalArgs = []) - * @method PromiseInterface getCryptoKeyVersionAsync(GetCryptoKeyVersionRequest $request, array $optionalArgs = []) - * @method PromiseInterface getImportJobAsync(GetImportJobRequest $request, array $optionalArgs = []) - * @method PromiseInterface getKeyRingAsync(GetKeyRingRequest $request, array $optionalArgs = []) - * @method PromiseInterface getPublicKeyAsync(GetPublicKeyRequest $request, array $optionalArgs = []) - * @method PromiseInterface getRetiredResourceAsync(GetRetiredResourceRequest $request, array $optionalArgs = []) - * @method PromiseInterface importCryptoKeyVersionAsync(ImportCryptoKeyVersionRequest $request, array $optionalArgs = []) - * @method PromiseInterface listCryptoKeyVersionsAsync(ListCryptoKeyVersionsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listCryptoKeysAsync(ListCryptoKeysRequest $request, array $optionalArgs = []) - * @method PromiseInterface listImportJobsAsync(ListImportJobsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listKeyRingsAsync(ListKeyRingsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listRetiredResourcesAsync(ListRetiredResourcesRequest $request, array $optionalArgs = []) - * @method PromiseInterface macSignAsync(MacSignRequest $request, array $optionalArgs = []) - * @method PromiseInterface macVerifyAsync(MacVerifyRequest $request, array $optionalArgs = []) - * @method PromiseInterface rawDecryptAsync(RawDecryptRequest $request, array $optionalArgs = []) - * @method PromiseInterface rawEncryptAsync(RawEncryptRequest $request, array $optionalArgs = []) - * @method PromiseInterface restoreCryptoKeyVersionAsync(RestoreCryptoKeyVersionRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateCryptoKeyAsync(UpdateCryptoKeyRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateCryptoKeyPrimaryVersionAsync(UpdateCryptoKeyPrimaryVersionRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateCryptoKeyVersionAsync(UpdateCryptoKeyVersionRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) - */ -final class KeyManagementServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.kms.v1.KeyManagementService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'cloudkms.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'cloudkms.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/cloudkms', - ]; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/key_management_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/key_management_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/key_management_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/key_management_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = $this->descriptors[$methodName]['longRunning'] ?? []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Create the default operation client for the service. - * - * @param array $options ClientOptions for the client. - * - * @return OperationsClient - */ - private function createOperationsClient(array $options) - { - // Unset client-specific configuration options - unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); - - if (isset($options['operationsClient'])) { - return $options['operationsClient']; - } - - return new OperationsClient($options); - } - - /** - * Formats a string containing the fully-qualified path to represent a crypto_key - * resource. - * - * @param string $project - * @param string $location - * @param string $keyRing - * @param string $cryptoKey - * - * @return string The formatted crypto_key resource. - */ - public static function cryptoKeyName(string $project, string $location, string $keyRing, string $cryptoKey): string - { - return self::getPathTemplate('cryptoKey')->render([ - 'project' => $project, - 'location' => $location, - 'key_ring' => $keyRing, - 'crypto_key' => $cryptoKey, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * crypto_key_version resource. - * - * @param string $project - * @param string $location - * @param string $keyRing - * @param string $cryptoKey - * @param string $cryptoKeyVersion - * - * @return string The formatted crypto_key_version resource. - */ - public static function cryptoKeyVersionName(string $project, string $location, string $keyRing, string $cryptoKey, string $cryptoKeyVersion): string - { - return self::getPathTemplate('cryptoKeyVersion')->render([ - 'project' => $project, - 'location' => $location, - 'key_ring' => $keyRing, - 'crypto_key' => $cryptoKey, - 'crypto_key_version' => $cryptoKeyVersion, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a import_job - * resource. - * - * @param string $project - * @param string $location - * @param string $keyRing - * @param string $importJob - * - * @return string The formatted import_job resource. - */ - public static function importJobName(string $project, string $location, string $keyRing, string $importJob): string - { - return self::getPathTemplate('importJob')->render([ - 'project' => $project, - 'location' => $location, - 'key_ring' => $keyRing, - 'import_job' => $importJob, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a key_ring - * resource. - * - * @param string $project - * @param string $location - * @param string $keyRing - * - * @return string The formatted key_ring resource. - */ - public static function keyRingName(string $project, string $location, string $keyRing): string - { - return self::getPathTemplate('keyRing')->render([ - 'project' => $project, - 'location' => $location, - 'key_ring' => $keyRing, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName(string $project, string $location): string - { - return self::getPathTemplate('location')->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * retired_resource resource. - * - * @param string $project - * @param string $location - * @param string $retiredResource - * - * @return string The formatted retired_resource resource. - */ - public static function retiredResourceName(string $project, string $location, string $retiredResource): string - { - return self::getPathTemplate('retiredResource')->render([ - 'project' => $project, - 'location' => $location, - 'retired_resource' => $retiredResource, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - cryptoKey: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key} - * - cryptoKeyVersion: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version} - * - importJob: projects/{project}/locations/{location}/keyRings/{key_ring}/importJobs/{import_job} - * - keyRing: projects/{project}/locations/{location}/keyRings/{key_ring} - * - location: projects/{project}/locations/{location} - * - retiredResource: projects/{project}/locations/{location}/retiredResources/{retired_resource} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param ?string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array|ClientOptions $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'cloudkms.googleapis.com:443'. - * @type FetchAuthTokenInterface|CredentialsWrapper $credentials - * This option should only be used with a pre-constructed - * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that - * when one of these objects are provided, any settings in $credentialsConfig will - * be ignored. - * **Important**: If you are providing a path to a credentials file, or a decoded - * credentials file as a PHP array, this usage is now DEPRECATED. Providing an - * unvalidated credential configuration to Google APIs can compromise the security - * of your systems and data. It is recommended to create the credentials explicitly - * ``` - * use Google\Auth\Credentials\ServiceAccountCredentials; - * use Google\Cloud\Kms\V1\KeyManagementServiceClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new KeyManagementServiceClient(['credentials' => $creds]); - * ``` - * {@see - * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * @type string $universeDomain - * The service domain for the client. Defaults to 'googleapis.com'. - * } - * - * @throws ValidationException - */ - public function __construct(array|ClientOptions $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Decrypts data that was encrypted with a public key retrieved from - * [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey] - * corresponding to a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] - * with [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] - * ASYMMETRIC_DECRYPT. - * - * The async variant is {@see KeyManagementServiceClient::asymmetricDecryptAsync()} - * . - * - * @example samples/V1/KeyManagementServiceClient/asymmetric_decrypt.php - * - * @param AsymmetricDecryptRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return AsymmetricDecryptResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function asymmetricDecrypt(AsymmetricDecryptRequest $request, array $callOptions = []): AsymmetricDecryptResponse - { - return $this->startApiCall('AsymmetricDecrypt', $request, $callOptions)->wait(); - } - - /** - * Signs data using a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] - * with [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] - * ASYMMETRIC_SIGN, producing a signature that can be verified with the public - * key retrieved from - * [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey]. - * - * The async variant is {@see KeyManagementServiceClient::asymmetricSignAsync()} . - * - * @example samples/V1/KeyManagementServiceClient/asymmetric_sign.php - * - * @param AsymmetricSignRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return AsymmetricSignResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function asymmetricSign(AsymmetricSignRequest $request, array $callOptions = []): AsymmetricSignResponse - { - return $this->startApiCall('AsymmetricSign', $request, $callOptions)->wait(); - } - - /** - * Create a new [CryptoKey][google.cloud.kms.v1.CryptoKey] within a - * [KeyRing][google.cloud.kms.v1.KeyRing]. - * - * [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] and - * [CryptoKey.version_template.algorithm][google.cloud.kms.v1.CryptoKeyVersionTemplate.algorithm] - * are required. - * - * The async variant is {@see KeyManagementServiceClient::createCryptoKeyAsync()} . - * - * @example samples/V1/KeyManagementServiceClient/create_crypto_key.php - * - * @param CreateCryptoKeyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return CryptoKey - * - * @throws ApiException Thrown if the API call fails. - */ - public function createCryptoKey(CreateCryptoKeyRequest $request, array $callOptions = []): CryptoKey - { - return $this->startApiCall('CreateCryptoKey', $request, $callOptions)->wait(); - } - - /** - * Create a new [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in a - * [CryptoKey][google.cloud.kms.v1.CryptoKey]. - * - * The server will assign the next sequential id. If unset, - * [state][google.cloud.kms.v1.CryptoKeyVersion.state] will be set to - * [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED]. - * - * The async variant is - * {@see KeyManagementServiceClient::createCryptoKeyVersionAsync()} . - * - * @example samples/V1/KeyManagementServiceClient/create_crypto_key_version.php - * - * @param CreateCryptoKeyVersionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return CryptoKeyVersion - * - * @throws ApiException Thrown if the API call fails. - */ - public function createCryptoKeyVersion(CreateCryptoKeyVersionRequest $request, array $callOptions = []): CryptoKeyVersion - { - return $this->startApiCall('CreateCryptoKeyVersion', $request, $callOptions)->wait(); - } - - /** - * Create a new [ImportJob][google.cloud.kms.v1.ImportJob] within a - * [KeyRing][google.cloud.kms.v1.KeyRing]. - * - * [ImportJob.import_method][google.cloud.kms.v1.ImportJob.import_method] is - * required. - * - * The async variant is {@see KeyManagementServiceClient::createImportJobAsync()} . - * - * @example samples/V1/KeyManagementServiceClient/create_import_job.php - * - * @param CreateImportJobRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ImportJob - * - * @throws ApiException Thrown if the API call fails. - */ - public function createImportJob(CreateImportJobRequest $request, array $callOptions = []): ImportJob - { - return $this->startApiCall('CreateImportJob', $request, $callOptions)->wait(); - } - - /** - * Create a new [KeyRing][google.cloud.kms.v1.KeyRing] in a given Project and - * Location. - * - * The async variant is {@see KeyManagementServiceClient::createKeyRingAsync()} . - * - * @example samples/V1/KeyManagementServiceClient/create_key_ring.php - * - * @param CreateKeyRingRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return KeyRing - * - * @throws ApiException Thrown if the API call fails. - */ - public function createKeyRing(CreateKeyRingRequest $request, array $callOptions = []): KeyRing - { - return $this->startApiCall('CreateKeyRing', $request, $callOptions)->wait(); - } - - /** - * Decapsulates data that was encapsulated with a public key retrieved from - * [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey] - * corresponding to a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] - * with [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] - * KEY_ENCAPSULATION. - * - * The async variant is {@see KeyManagementServiceClient::decapsulateAsync()} . - * - * @example samples/V1/KeyManagementServiceClient/decapsulate.php - * - * @param DecapsulateRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return DecapsulateResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function decapsulate(DecapsulateRequest $request, array $callOptions = []): DecapsulateResponse - { - return $this->startApiCall('Decapsulate', $request, $callOptions)->wait(); - } - - /** - * Decrypts data that was protected by - * [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt]. The - * [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] must be - * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]. - * - * The async variant is {@see KeyManagementServiceClient::decryptAsync()} . - * - * @example samples/V1/KeyManagementServiceClient/decrypt.php - * - * @param DecryptRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return DecryptResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function decrypt(DecryptRequest $request, array $callOptions = []): DecryptResponse - { - return $this->startApiCall('Decrypt', $request, $callOptions)->wait(); - } - - /** - * Permanently deletes the given [CryptoKey][google.cloud.kms.v1.CryptoKey]. - * All child [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] must - * have been previously deleted using - * [KeyManagementService.DeleteCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.DeleteCryptoKeyVersion]. - * The specified crypto key will be immediately and permanently deleted upon - * calling this method. This action cannot be undone. - * - * The async variant is {@see KeyManagementServiceClient::deleteCryptoKeyAsync()} . - * - * @example samples/V1/KeyManagementServiceClient/delete_crypto_key.php - * - * @param DeleteCryptoKeyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteCryptoKey(DeleteCryptoKeyRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteCryptoKey', $request, $callOptions)->wait(); - } - - /** - * Permanently deletes the given - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. Only possible if - * the version has not been previously imported and if its - * [state][google.cloud.kms.v1.CryptoKeyVersion.state] is one of - * [DESTROYED][CryptoKeyVersionState.DESTROYED], - * [IMPORT_FAILED][CryptoKeyVersionState.IMPORT_FAILED], or - * [GENERATION_FAILED][CryptoKeyVersionState.GENERATION_FAILED]. - * Successfully imported - * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] cannot be deleted - * at this time. The specified version will be immediately and permanently - * deleted upon calling this method. This action cannot be undone. - * - * The async variant is - * {@see KeyManagementServiceClient::deleteCryptoKeyVersionAsync()} . - * - * @example samples/V1/KeyManagementServiceClient/delete_crypto_key_version.php - * - * @param DeleteCryptoKeyVersionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteCryptoKeyVersion(DeleteCryptoKeyVersionRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteCryptoKeyVersion', $request, $callOptions)->wait(); - } - - /** - * Schedule a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] for - * destruction. - * - * Upon calling this method, - * [CryptoKeyVersion.state][google.cloud.kms.v1.CryptoKeyVersion.state] will - * be set to - * [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED], - * and [destroy_time][google.cloud.kms.v1.CryptoKeyVersion.destroy_time] will - * be set to the time - * [destroy_scheduled_duration][google.cloud.kms.v1.CryptoKey.destroy_scheduled_duration] - * in the future. At that time, the - * [state][google.cloud.kms.v1.CryptoKeyVersion.state] will automatically - * change to - * [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED], - * and the key material will be irrevocably destroyed. - * - * Before the - * [destroy_time][google.cloud.kms.v1.CryptoKeyVersion.destroy_time] is - * reached, - * [RestoreCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.RestoreCryptoKeyVersion] - * may be called to reverse the process. - * - * The async variant is - * {@see KeyManagementServiceClient::destroyCryptoKeyVersionAsync()} . - * - * @example samples/V1/KeyManagementServiceClient/destroy_crypto_key_version.php - * - * @param DestroyCryptoKeyVersionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return CryptoKeyVersion - * - * @throws ApiException Thrown if the API call fails. - */ - public function destroyCryptoKeyVersion(DestroyCryptoKeyVersionRequest $request, array $callOptions = []): CryptoKeyVersion - { - return $this->startApiCall('DestroyCryptoKeyVersion', $request, $callOptions)->wait(); - } - - /** - * Encrypts data, so that it can only be recovered by a call to - * [Decrypt][google.cloud.kms.v1.KeyManagementService.Decrypt]. The - * [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] must be - * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]. - * - * The async variant is {@see KeyManagementServiceClient::encryptAsync()} . - * - * @example samples/V1/KeyManagementServiceClient/encrypt.php - * - * @param EncryptRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return EncryptResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function encrypt(EncryptRequest $request, array $callOptions = []): EncryptResponse - { - return $this->startApiCall('Encrypt', $request, $callOptions)->wait(); - } - - /** - * Generate random bytes using the Cloud KMS randomness source in the provided - * location. - * - * The async variant is - * {@see KeyManagementServiceClient::generateRandomBytesAsync()} . - * - * @example samples/V1/KeyManagementServiceClient/generate_random_bytes.php - * - * @param GenerateRandomBytesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return GenerateRandomBytesResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function generateRandomBytes(GenerateRandomBytesRequest $request, array $callOptions = []): GenerateRandomBytesResponse - { - return $this->startApiCall('GenerateRandomBytes', $request, $callOptions)->wait(); - } - - /** - * Returns metadata for a given [CryptoKey][google.cloud.kms.v1.CryptoKey], as - * well as its [primary][google.cloud.kms.v1.CryptoKey.primary] - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. - * - * The async variant is {@see KeyManagementServiceClient::getCryptoKeyAsync()} . - * - * @example samples/V1/KeyManagementServiceClient/get_crypto_key.php - * - * @param GetCryptoKeyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return CryptoKey - * - * @throws ApiException Thrown if the API call fails. - */ - public function getCryptoKey(GetCryptoKeyRequest $request, array $callOptions = []): CryptoKey - { - return $this->startApiCall('GetCryptoKey', $request, $callOptions)->wait(); - } - - /** - * Returns metadata for a given - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. - * - * The async variant is - * {@see KeyManagementServiceClient::getCryptoKeyVersionAsync()} . - * - * @example samples/V1/KeyManagementServiceClient/get_crypto_key_version.php - * - * @param GetCryptoKeyVersionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return CryptoKeyVersion - * - * @throws ApiException Thrown if the API call fails. - */ - public function getCryptoKeyVersion(GetCryptoKeyVersionRequest $request, array $callOptions = []): CryptoKeyVersion - { - return $this->startApiCall('GetCryptoKeyVersion', $request, $callOptions)->wait(); - } - - /** - * Returns metadata for a given [ImportJob][google.cloud.kms.v1.ImportJob]. - * - * The async variant is {@see KeyManagementServiceClient::getImportJobAsync()} . - * - * @example samples/V1/KeyManagementServiceClient/get_import_job.php - * - * @param GetImportJobRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ImportJob - * - * @throws ApiException Thrown if the API call fails. - */ - public function getImportJob(GetImportJobRequest $request, array $callOptions = []): ImportJob - { - return $this->startApiCall('GetImportJob', $request, $callOptions)->wait(); - } - - /** - * Returns metadata for a given [KeyRing][google.cloud.kms.v1.KeyRing]. - * - * The async variant is {@see KeyManagementServiceClient::getKeyRingAsync()} . - * - * @example samples/V1/KeyManagementServiceClient/get_key_ring.php - * - * @param GetKeyRingRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return KeyRing - * - * @throws ApiException Thrown if the API call fails. - */ - public function getKeyRing(GetKeyRingRequest $request, array $callOptions = []): KeyRing - { - return $this->startApiCall('GetKeyRing', $request, $callOptions)->wait(); - } - - /** - * Returns the public key for the given - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. The - * [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] must be - * [ASYMMETRIC_SIGN][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ASYMMETRIC_SIGN] - * or - * [ASYMMETRIC_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ASYMMETRIC_DECRYPT]. - * - * The async variant is {@see KeyManagementServiceClient::getPublicKeyAsync()} . - * - * @example samples/V1/KeyManagementServiceClient/get_public_key.php - * - * @param GetPublicKeyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PublicKey - * - * @throws ApiException Thrown if the API call fails. - */ - public function getPublicKey(GetPublicKeyRequest $request, array $callOptions = []): PublicKey - { - return $this->startApiCall('GetPublicKey', $request, $callOptions)->wait(); - } - - /** - * Retrieves a specific [RetiredResource][google.cloud.kms.v1.RetiredResource] - * resource, which represents the record of a deleted - * [CryptoKey][google.cloud.kms.v1.CryptoKey]. - * - * The async variant is - * {@see KeyManagementServiceClient::getRetiredResourceAsync()} . - * - * @example samples/V1/KeyManagementServiceClient/get_retired_resource.php - * - * @param GetRetiredResourceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return RetiredResource - * - * @throws ApiException Thrown if the API call fails. - */ - public function getRetiredResource(GetRetiredResourceRequest $request, array $callOptions = []): RetiredResource - { - return $this->startApiCall('GetRetiredResource', $request, $callOptions)->wait(); - } - - /** - * Import wrapped key material into a - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. - * - * All requests must specify a [CryptoKey][google.cloud.kms.v1.CryptoKey]. If - * a [CryptoKeyVersion][google.cloud.kms.v1.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][google.cloud.kms.v1.CryptoKey]. - * - * The async variant is - * {@see KeyManagementServiceClient::importCryptoKeyVersionAsync()} . - * - * @example samples/V1/KeyManagementServiceClient/import_crypto_key_version.php - * - * @param ImportCryptoKeyVersionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return CryptoKeyVersion - * - * @throws ApiException Thrown if the API call fails. - */ - public function importCryptoKeyVersion(ImportCryptoKeyVersionRequest $request, array $callOptions = []): CryptoKeyVersion - { - return $this->startApiCall('ImportCryptoKeyVersion', $request, $callOptions)->wait(); - } - - /** - * Lists [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. - * - * The async variant is - * {@see KeyManagementServiceClient::listCryptoKeyVersionsAsync()} . - * - * @example samples/V1/KeyManagementServiceClient/list_crypto_key_versions.php - * - * @param ListCryptoKeyVersionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listCryptoKeyVersions(ListCryptoKeyVersionsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListCryptoKeyVersions', $request, $callOptions); - } - - /** - * Lists [CryptoKeys][google.cloud.kms.v1.CryptoKey]. - * - * The async variant is {@see KeyManagementServiceClient::listCryptoKeysAsync()} . - * - * @example samples/V1/KeyManagementServiceClient/list_crypto_keys.php - * - * @param ListCryptoKeysRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listCryptoKeys(ListCryptoKeysRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListCryptoKeys', $request, $callOptions); - } - - /** - * Lists [ImportJobs][google.cloud.kms.v1.ImportJob]. - * - * The async variant is {@see KeyManagementServiceClient::listImportJobsAsync()} . - * - * @example samples/V1/KeyManagementServiceClient/list_import_jobs.php - * - * @param ListImportJobsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listImportJobs(ListImportJobsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListImportJobs', $request, $callOptions); - } - - /** - * Lists [KeyRings][google.cloud.kms.v1.KeyRing]. - * - * The async variant is {@see KeyManagementServiceClient::listKeyRingsAsync()} . - * - * @example samples/V1/KeyManagementServiceClient/list_key_rings.php - * - * @param ListKeyRingsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listKeyRings(ListKeyRingsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListKeyRings', $request, $callOptions); - } - - /** - * Lists the [RetiredResources][google.cloud.kms.v1.RetiredResource] which are - * the records of deleted [CryptoKeys][google.cloud.kms.v1.CryptoKey]. - * RetiredResources prevent the reuse of these resource names after deletion. - * - * The async variant is - * {@see KeyManagementServiceClient::listRetiredResourcesAsync()} . - * - * @example samples/V1/KeyManagementServiceClient/list_retired_resources.php - * - * @param ListRetiredResourcesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listRetiredResources(ListRetiredResourcesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListRetiredResources', $request, $callOptions); - } - - /** - * Signs data using a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] - * with [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] MAC, - * producing a tag that can be verified by another source with the same key. - * - * The async variant is {@see KeyManagementServiceClient::macSignAsync()} . - * - * @example samples/V1/KeyManagementServiceClient/mac_sign.php - * - * @param MacSignRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return MacSignResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function macSign(MacSignRequest $request, array $callOptions = []): MacSignResponse - { - return $this->startApiCall('MacSign', $request, $callOptions)->wait(); - } - - /** - * Verifies MAC tag using a - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with - * [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] MAC, and returns - * a response that indicates whether or not the verification was successful. - * - * The async variant is {@see KeyManagementServiceClient::macVerifyAsync()} . - * - * @example samples/V1/KeyManagementServiceClient/mac_verify.php - * - * @param MacVerifyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return MacVerifyResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function macVerify(MacVerifyRequest $request, array $callOptions = []): MacVerifyResponse - { - return $this->startApiCall('MacVerify', $request, $callOptions)->wait(); - } - - /** - * Decrypts data that was originally encrypted using a raw cryptographic - * mechanism. The [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] - * must be - * [RAW_ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.RAW_ENCRYPT_DECRYPT]. - * - * The async variant is {@see KeyManagementServiceClient::rawDecryptAsync()} . - * - * @example samples/V1/KeyManagementServiceClient/raw_decrypt.php - * - * @param RawDecryptRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return RawDecryptResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function rawDecrypt(RawDecryptRequest $request, array $callOptions = []): RawDecryptResponse - { - return $this->startApiCall('RawDecrypt', $request, $callOptions)->wait(); - } - - /** - * Encrypts data using portable cryptographic primitives. Most users should - * choose [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt] and - * [Decrypt][google.cloud.kms.v1.KeyManagementService.Decrypt] rather than - * their raw counterparts. The - * [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] must be - * [RAW_ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.RAW_ENCRYPT_DECRYPT]. - * - * The async variant is {@see KeyManagementServiceClient::rawEncryptAsync()} . - * - * @example samples/V1/KeyManagementServiceClient/raw_encrypt.php - * - * @param RawEncryptRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return RawEncryptResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function rawEncrypt(RawEncryptRequest $request, array $callOptions = []): RawEncryptResponse - { - return $this->startApiCall('RawEncrypt', $request, $callOptions)->wait(); - } - - /** - * Restore a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in the - * [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED] - * state. - * - * Upon restoration of the CryptoKeyVersion, - * [state][google.cloud.kms.v1.CryptoKeyVersion.state] will be set to - * [DISABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DISABLED], - * and [destroy_time][google.cloud.kms.v1.CryptoKeyVersion.destroy_time] will - * be cleared. - * - * The async variant is - * {@see KeyManagementServiceClient::restoreCryptoKeyVersionAsync()} . - * - * @example samples/V1/KeyManagementServiceClient/restore_crypto_key_version.php - * - * @param RestoreCryptoKeyVersionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return CryptoKeyVersion - * - * @throws ApiException Thrown if the API call fails. - */ - public function restoreCryptoKeyVersion(RestoreCryptoKeyVersionRequest $request, array $callOptions = []): CryptoKeyVersion - { - return $this->startApiCall('RestoreCryptoKeyVersion', $request, $callOptions)->wait(); - } - - /** - * Update a [CryptoKey][google.cloud.kms.v1.CryptoKey]. - * - * The async variant is {@see KeyManagementServiceClient::updateCryptoKeyAsync()} . - * - * @example samples/V1/KeyManagementServiceClient/update_crypto_key.php - * - * @param UpdateCryptoKeyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return CryptoKey - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateCryptoKey(UpdateCryptoKeyRequest $request, array $callOptions = []): CryptoKey - { - return $this->startApiCall('UpdateCryptoKey', $request, $callOptions)->wait(); - } - - /** - * Update the version of a [CryptoKey][google.cloud.kms.v1.CryptoKey] that - * will be used in - * [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt]. - * - * Returns an error if called on a key whose purpose is not - * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]. - * - * The async variant is - * {@see KeyManagementServiceClient::updateCryptoKeyPrimaryVersionAsync()} . - * - * @example samples/V1/KeyManagementServiceClient/update_crypto_key_primary_version.php - * - * @param UpdateCryptoKeyPrimaryVersionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return CryptoKey - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateCryptoKeyPrimaryVersion(UpdateCryptoKeyPrimaryVersionRequest $request, array $callOptions = []): CryptoKey - { - return $this->startApiCall('UpdateCryptoKeyPrimaryVersion', $request, $callOptions)->wait(); - } - - /** - * Update a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s - * metadata. - * - * [state][google.cloud.kms.v1.CryptoKeyVersion.state] may be changed between - * [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED] - * and - * [DISABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DISABLED] - * using this method. See - * [DestroyCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.DestroyCryptoKeyVersion] - * and - * [RestoreCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.RestoreCryptoKeyVersion] - * to move between other states. - * - * The async variant is - * {@see KeyManagementServiceClient::updateCryptoKeyVersionAsync()} . - * - * @example samples/V1/KeyManagementServiceClient/update_crypto_key_version.php - * - * @param UpdateCryptoKeyVersionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return CryptoKeyVersion - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateCryptoKeyVersion(UpdateCryptoKeyVersionRequest $request, array $callOptions = []): CryptoKeyVersion - { - return $this->startApiCall('UpdateCryptoKeyVersion', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see KeyManagementServiceClient::getLocationAsync()} . - * - * @example samples/V1/KeyManagementServiceClient/get_location.php - * - * @param GetLocationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Location - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLocation(GetLocationRequest $request, array $callOptions = []): Location - { - return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); - } - - /** - * Lists information about the supported locations for this service. - This method can be called in two ways: - - * **List all public locations:** Use the path `GET /v1/locations`. - * **List project-visible locations:** Use the path - `GET /v1/projects/{project_id}/locations`. This may include public - locations as well as private or other locations specifically visible - to the project. - * - * The async variant is {@see KeyManagementServiceClient::listLocationsAsync()} . - * - * @example samples/V1/KeyManagementServiceClient/list_locations.php - * - * @param ListLocationsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLocations', $request, $callOptions); - } - - /** - * Gets the access control policy for a resource. Returns an empty policy - if the resource exists and does not have a policy set. - * - * The async variant is {@see KeyManagementServiceClient::getIamPolicyAsync()} . - * - * @example samples/V1/KeyManagementServiceClient/get_iam_policy.php - * - * @param GetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Sets the access control policy on the specified resource. Replaces - any existing policy. - - Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` - errors. - * - * The async variant is {@see KeyManagementServiceClient::setIamPolicyAsync()} . - * - * @example samples/V1/KeyManagementServiceClient/set_iam_policy.php - * - * @param SetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * 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. - * - * The async variant is - * {@see KeyManagementServiceClient::testIamPermissionsAsync()} . - * - * @example samples/V1/KeyManagementServiceClient/test_iam_permissions.php - * - * @param TestIamPermissionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TestIamPermissionsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse - { - return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/Kms/v1/src/V1/gapic_metadata.json b/owl-bot-staging/Kms/v1/src/V1/gapic_metadata.json deleted file mode 100644 index 72857cb3c3fc..000000000000 --- a/owl-bot-staging/Kms/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,454 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.kms.v1", - "libraryPackage": "Google\\Cloud\\Kms\\V1", - "services": { - "Autokey": { - "clients": { - "grpc": { - "libraryClient": "AutokeyGapicClient", - "rpcs": { - "CreateKeyHandle": { - "methods": [ - "createKeyHandle" - ] - }, - "GetKeyHandle": { - "methods": [ - "getKeyHandle" - ] - }, - "ListKeyHandles": { - "methods": [ - "listKeyHandles" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - }, - "GetIamPolicy": { - "methods": [ - "getIamPolicy" - ] - }, - "SetIamPolicy": { - "methods": [ - "setIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - } - } - } - } - }, - "AutokeyAdmin": { - "clients": { - "grpc": { - "libraryClient": "AutokeyAdminGapicClient", - "rpcs": { - "GetAutokeyConfig": { - "methods": [ - "getAutokeyConfig" - ] - }, - "ShowEffectiveAutokeyConfig": { - "methods": [ - "showEffectiveAutokeyConfig" - ] - }, - "UpdateAutokeyConfig": { - "methods": [ - "updateAutokeyConfig" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - }, - "GetIamPolicy": { - "methods": [ - "getIamPolicy" - ] - }, - "SetIamPolicy": { - "methods": [ - "setIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - } - } - } - } - }, - "EkmService": { - "clients": { - "grpc": { - "libraryClient": "EkmServiceGapicClient", - "rpcs": { - "CreateEkmConnection": { - "methods": [ - "createEkmConnection" - ] - }, - "GetEkmConfig": { - "methods": [ - "getEkmConfig" - ] - }, - "GetEkmConnection": { - "methods": [ - "getEkmConnection" - ] - }, - "ListEkmConnections": { - "methods": [ - "listEkmConnections" - ] - }, - "UpdateEkmConfig": { - "methods": [ - "updateEkmConfig" - ] - }, - "UpdateEkmConnection": { - "methods": [ - "updateEkmConnection" - ] - }, - "VerifyConnectivity": { - "methods": [ - "verifyConnectivity" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - }, - "GetIamPolicy": { - "methods": [ - "getIamPolicy" - ] - }, - "SetIamPolicy": { - "methods": [ - "setIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - } - } - } - } - }, - "HsmManagement": { - "clients": { - "grpc": { - "libraryClient": "HsmManagementGapicClient", - "rpcs": { - "ApproveSingleTenantHsmInstanceProposal": { - "methods": [ - "approveSingleTenantHsmInstanceProposal" - ] - }, - "CreateSingleTenantHsmInstance": { - "methods": [ - "createSingleTenantHsmInstance" - ] - }, - "CreateSingleTenantHsmInstanceProposal": { - "methods": [ - "createSingleTenantHsmInstanceProposal" - ] - }, - "DeleteSingleTenantHsmInstanceProposal": { - "methods": [ - "deleteSingleTenantHsmInstanceProposal" - ] - }, - "ExecuteSingleTenantHsmInstanceProposal": { - "methods": [ - "executeSingleTenantHsmInstanceProposal" - ] - }, - "GetSingleTenantHsmInstance": { - "methods": [ - "getSingleTenantHsmInstance" - ] - }, - "GetSingleTenantHsmInstanceProposal": { - "methods": [ - "getSingleTenantHsmInstanceProposal" - ] - }, - "ListSingleTenantHsmInstanceProposals": { - "methods": [ - "listSingleTenantHsmInstanceProposals" - ] - }, - "ListSingleTenantHsmInstances": { - "methods": [ - "listSingleTenantHsmInstances" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - }, - "GetIamPolicy": { - "methods": [ - "getIamPolicy" - ] - }, - "SetIamPolicy": { - "methods": [ - "setIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - } - } - } - } - }, - "KeyManagementService": { - "clients": { - "grpc": { - "libraryClient": "KeyManagementServiceGapicClient", - "rpcs": { - "AsymmetricDecrypt": { - "methods": [ - "asymmetricDecrypt" - ] - }, - "AsymmetricSign": { - "methods": [ - "asymmetricSign" - ] - }, - "CreateCryptoKey": { - "methods": [ - "createCryptoKey" - ] - }, - "CreateCryptoKeyVersion": { - "methods": [ - "createCryptoKeyVersion" - ] - }, - "CreateImportJob": { - "methods": [ - "createImportJob" - ] - }, - "CreateKeyRing": { - "methods": [ - "createKeyRing" - ] - }, - "Decapsulate": { - "methods": [ - "decapsulate" - ] - }, - "Decrypt": { - "methods": [ - "decrypt" - ] - }, - "DeleteCryptoKey": { - "methods": [ - "deleteCryptoKey" - ] - }, - "DeleteCryptoKeyVersion": { - "methods": [ - "deleteCryptoKeyVersion" - ] - }, - "DestroyCryptoKeyVersion": { - "methods": [ - "destroyCryptoKeyVersion" - ] - }, - "Encrypt": { - "methods": [ - "encrypt" - ] - }, - "GenerateRandomBytes": { - "methods": [ - "generateRandomBytes" - ] - }, - "GetCryptoKey": { - "methods": [ - "getCryptoKey" - ] - }, - "GetCryptoKeyVersion": { - "methods": [ - "getCryptoKeyVersion" - ] - }, - "GetImportJob": { - "methods": [ - "getImportJob" - ] - }, - "GetKeyRing": { - "methods": [ - "getKeyRing" - ] - }, - "GetPublicKey": { - "methods": [ - "getPublicKey" - ] - }, - "GetRetiredResource": { - "methods": [ - "getRetiredResource" - ] - }, - "ImportCryptoKeyVersion": { - "methods": [ - "importCryptoKeyVersion" - ] - }, - "ListCryptoKeyVersions": { - "methods": [ - "listCryptoKeyVersions" - ] - }, - "ListCryptoKeys": { - "methods": [ - "listCryptoKeys" - ] - }, - "ListImportJobs": { - "methods": [ - "listImportJobs" - ] - }, - "ListKeyRings": { - "methods": [ - "listKeyRings" - ] - }, - "ListRetiredResources": { - "methods": [ - "listRetiredResources" - ] - }, - "MacSign": { - "methods": [ - "macSign" - ] - }, - "MacVerify": { - "methods": [ - "macVerify" - ] - }, - "RawDecrypt": { - "methods": [ - "rawDecrypt" - ] - }, - "RawEncrypt": { - "methods": [ - "rawEncrypt" - ] - }, - "RestoreCryptoKeyVersion": { - "methods": [ - "restoreCryptoKeyVersion" - ] - }, - "UpdateCryptoKey": { - "methods": [ - "updateCryptoKey" - ] - }, - "UpdateCryptoKeyPrimaryVersion": { - "methods": [ - "updateCryptoKeyPrimaryVersion" - ] - }, - "UpdateCryptoKeyVersion": { - "methods": [ - "updateCryptoKeyVersion" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - }, - "GetIamPolicy": { - "methods": [ - "getIamPolicy" - ] - }, - "SetIamPolicy": { - "methods": [ - "setIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/Kms/v1/src/V1/resources/autokey_admin_client_config.json b/owl-bot-staging/Kms/v1/src/V1/resources/autokey_admin_client_config.json deleted file mode 100644 index b331d4cc45bf..000000000000 --- a/owl-bot-staging/Kms/v1/src/V1/resources/autokey_admin_client_config.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "interfaces": { - "google.cloud.kms.v1.AutokeyAdmin": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE", - "DEADLINE_EXCEEDED" - ] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "GetAutokeyConfig": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ShowEffectiveAutokeyConfig": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateAutokeyConfig": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetLocation": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListLocations": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "SetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "TestIamPermissions": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - } - } - } - } -} diff --git a/owl-bot-staging/Kms/v1/src/V1/resources/autokey_admin_descriptor_config.php b/owl-bot-staging/Kms/v1/src/V1/resources/autokey_admin_descriptor_config.php deleted file mode 100644 index ec6cac155324..000000000000 --- a/owl-bot-staging/Kms/v1/src/V1/resources/autokey_admin_descriptor_config.php +++ /dev/null @@ -1,144 +0,0 @@ - [ - 'google.cloud.kms.v1.AutokeyAdmin' => [ - 'GetAutokeyConfig' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Kms\V1\AutokeyConfig', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ShowEffectiveAutokeyConfig' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Kms\V1\ShowEffectiveAutokeyConfigResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateAutokeyConfig' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Kms\V1\AutokeyConfig', - 'headerParams' => [ - [ - 'keyName' => 'autokey_config.name', - 'fieldAccessors' => [ - 'getAutokeyConfig', - 'getName', - ], - ], - ], - ], - 'GetLocation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Location\Location', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'GetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'SetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'TestIamPermissions' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'templateMap' => [ - 'autokeyConfig' => 'folders/{folder}/autokeyConfig', - 'folderAutokeyConfig' => 'folders/{folder}/autokeyConfig', - 'project' => 'projects/{project}', - 'projectAutokeyConfig' => 'projects/{project}/autokeyConfig', - ], - ], - ], -]; diff --git a/owl-bot-staging/Kms/v1/src/V1/resources/autokey_admin_rest_client_config.php b/owl-bot-staging/Kms/v1/src/V1/resources/autokey_admin_rest_client_config.php deleted file mode 100644 index 5eb15ff9ef13..000000000000 --- a/owl-bot-staging/Kms/v1/src/V1/resources/autokey_admin_rest_client_config.php +++ /dev/null @@ -1,219 +0,0 @@ - [ - 'google.cloud.kms.v1.AutokeyAdmin' => [ - 'GetAutokeyConfig' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=folders/*/autokeyConfig}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/autokeyConfig}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ShowEffectiveAutokeyConfig' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*}:showEffectiveAutokeyConfig', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateAutokeyConfig' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{autokey_config.name=folders/*/autokeyConfig}', - 'body' => 'autokey_config', - 'additionalBindings' => [ - [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{autokey_config.name=projects/*/autokeyConfig}', - 'body' => 'autokey_config', - 'queryParams' => [ - 'update_mask', - ], - ], - ], - 'placeholders' => [ - 'autokey_config.name' => [ - 'getters' => [ - 'getAutokeyConfig', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - ], - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.iam.v1.IAMPolicy' => [ - 'GetIamPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*}:getIamPolicy', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/cryptoKeys/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/importJobs/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConfig}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConnections/*}:getIamPolicy', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*}:setIamPolicy', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/cryptoKeys/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/importJobs/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConfig}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConnections/*}:setIamPolicy', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*}:testIamPermissions', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/cryptoKeys/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/importJobs/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConfig}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConnections/*}:testIamPermissions', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Kms/v1/src/V1/resources/autokey_client_config.json b/owl-bot-staging/Kms/v1/src/V1/resources/autokey_client_config.json deleted file mode 100644 index 77a418964d09..000000000000 --- a/owl-bot-staging/Kms/v1/src/V1/resources/autokey_client_config.json +++ /dev/null @@ -1,85 +0,0 @@ -{ - "interfaces": { - "google.cloud.kms.v1.Autokey": { - "retry_codes": { - "no_retry_codes": [], - "no_retry_1_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE", - "DEADLINE_EXCEEDED" - ] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "no_retry_1_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "CreateKeyHandle": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetKeyHandle": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListKeyHandles": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetLocation": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListLocations": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "SetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "TestIamPermissions": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - } - } - } - } -} diff --git a/owl-bot-staging/Kms/v1/src/V1/resources/autokey_descriptor_config.php b/owl-bot-staging/Kms/v1/src/V1/resources/autokey_descriptor_config.php deleted file mode 100644 index a7221d84f4d0..000000000000 --- a/owl-bot-staging/Kms/v1/src/V1/resources/autokey_descriptor_config.php +++ /dev/null @@ -1,157 +0,0 @@ - [ - 'google.cloud.kms.v1.Autokey' => [ - 'CreateKeyHandle' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Kms\V1\KeyHandle', - 'metadataReturnType' => '\Google\Cloud\Kms\V1\CreateKeyHandleMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'GetKeyHandle' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Kms\V1\KeyHandle', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListKeyHandles' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getKeyHandles', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Kms\V1\ListKeyHandlesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'GetLocation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Location\Location', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'GetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'SetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'TestIamPermissions' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'templateMap' => [ - 'cryptoKey' => 'projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}', - 'keyHandle' => 'projects/{project}/locations/{location}/keyHandles/{key_handle}', - 'location' => 'projects/{project}/locations/{location}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Kms/v1/src/V1/resources/autokey_rest_client_config.php b/owl-bot-staging/Kms/v1/src/V1/resources/autokey_rest_client_config.php deleted file mode 100644 index fedc6e60b1fc..000000000000 --- a/owl-bot-staging/Kms/v1/src/V1/resources/autokey_rest_client_config.php +++ /dev/null @@ -1,199 +0,0 @@ - [ - 'google.cloud.kms.v1.Autokey' => [ - 'CreateKeyHandle' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/keyHandles', - 'body' => 'key_handle', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'GetKeyHandle' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/keyHandles/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListKeyHandles' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/keyHandles', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - ], - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.iam.v1.IAMPolicy' => [ - 'GetIamPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*}:getIamPolicy', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/cryptoKeys/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/importJobs/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConfig}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConnections/*}:getIamPolicy', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*}:setIamPolicy', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/cryptoKeys/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/importJobs/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConfig}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConnections/*}:setIamPolicy', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*}:testIamPermissions', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/cryptoKeys/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/importJobs/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConfig}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConnections/*}:testIamPermissions', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Kms/v1/src/V1/resources/ekm_service_client_config.json b/owl-bot-staging/Kms/v1/src/V1/resources/ekm_service_client_config.json deleted file mode 100644 index 8fd9c3e0bf3c..000000000000 --- a/owl-bot-staging/Kms/v1/src/V1/resources/ekm_service_client_config.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "interfaces": { - "google.cloud.kms.v1.EkmService": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE", - "DEADLINE_EXCEEDED" - ] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "CreateEkmConnection": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetEkmConfig": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetEkmConnection": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListEkmConnections": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateEkmConfig": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdateEkmConnection": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "VerifyConnectivity": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetLocation": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListLocations": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "SetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "TestIamPermissions": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/Kms/v1/src/V1/resources/ekm_service_descriptor_config.php b/owl-bot-staging/Kms/v1/src/V1/resources/ekm_service_descriptor_config.php deleted file mode 100644 index 5835d781f32f..000000000000 --- a/owl-bot-staging/Kms/v1/src/V1/resources/ekm_service_descriptor_config.php +++ /dev/null @@ -1,201 +0,0 @@ - [ - 'google.cloud.kms.v1.EkmService' => [ - 'CreateEkmConnection' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Kms\V1\EkmConnection', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'GetEkmConfig' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Kms\V1\EkmConfig', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetEkmConnection' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Kms\V1\EkmConnection', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListEkmConnections' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getEkmConnections', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Kms\V1\ListEkmConnectionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateEkmConfig' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Kms\V1\EkmConfig', - 'headerParams' => [ - [ - 'keyName' => 'ekm_config.name', - 'fieldAccessors' => [ - 'getEkmConfig', - 'getName', - ], - ], - ], - ], - 'UpdateEkmConnection' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Kms\V1\EkmConnection', - 'headerParams' => [ - [ - 'keyName' => 'ekm_connection.name', - 'fieldAccessors' => [ - 'getEkmConnection', - 'getName', - ], - ], - ], - ], - 'VerifyConnectivity' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Kms\V1\VerifyConnectivityResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetLocation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Location\Location', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'GetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'SetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'TestIamPermissions' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'templateMap' => [ - 'ekmConfig' => 'projects/{project}/locations/{location}/ekmConfig', - 'ekmConnection' => 'projects/{project}/locations/{location}/ekmConnections/{ekm_connection}', - 'location' => 'projects/{project}/locations/{location}', - 'service' => 'projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Kms/v1/src/V1/resources/ekm_service_rest_client_config.php b/owl-bot-staging/Kms/v1/src/V1/resources/ekm_service_rest_client_config.php deleted file mode 100644 index a3bec12d18ce..000000000000 --- a/owl-bot-staging/Kms/v1/src/V1/resources/ekm_service_rest_client_config.php +++ /dev/null @@ -1,256 +0,0 @@ - [ - 'google.cloud.kms.v1.EkmService' => [ - 'CreateEkmConnection' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/ekmConnections', - 'body' => 'ekm_connection', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'ekm_connection_id', - ], - ], - 'GetEkmConfig' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/ekmConfig}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetEkmConnection' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/ekmConnections/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListEkmConnections' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/ekmConnections', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateEkmConfig' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{ekm_config.name=projects/*/locations/*/ekmConfig}', - 'body' => 'ekm_config', - 'placeholders' => [ - 'ekm_config.name' => [ - 'getters' => [ - 'getEkmConfig', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateEkmConnection' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{ekm_connection.name=projects/*/locations/*/ekmConnections/*}', - 'body' => 'ekm_connection', - 'placeholders' => [ - 'ekm_connection.name' => [ - 'getters' => [ - 'getEkmConnection', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'VerifyConnectivity' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/ekmConnections/*}:verifyConnectivity', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.iam.v1.IAMPolicy' => [ - 'GetIamPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*}:getIamPolicy', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/cryptoKeys/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/importJobs/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConfig}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConnections/*}:getIamPolicy', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*}:setIamPolicy', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/cryptoKeys/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/importJobs/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConfig}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConnections/*}:setIamPolicy', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*}:testIamPermissions', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/cryptoKeys/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/importJobs/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConfig}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConnections/*}:testIamPermissions', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Kms/v1/src/V1/resources/hsm_management_client_config.json b/owl-bot-staging/Kms/v1/src/V1/resources/hsm_management_client_config.json deleted file mode 100644 index 806ba3603014..000000000000 --- a/owl-bot-staging/Kms/v1/src/V1/resources/hsm_management_client_config.json +++ /dev/null @@ -1,105 +0,0 @@ -{ - "interfaces": { - "google.cloud.kms.v1.HsmManagement": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE", - "DEADLINE_EXCEEDED" - ] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "ApproveSingleTenantHsmInstanceProposal": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "CreateSingleTenantHsmInstance": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "CreateSingleTenantHsmInstanceProposal": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteSingleTenantHsmInstanceProposal": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ExecuteSingleTenantHsmInstanceProposal": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetSingleTenantHsmInstance": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetSingleTenantHsmInstanceProposal": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListSingleTenantHsmInstanceProposals": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListSingleTenantHsmInstances": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetLocation": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListLocations": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "SetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "TestIamPermissions": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - } - } - } - } -} diff --git a/owl-bot-staging/Kms/v1/src/V1/resources/hsm_management_descriptor_config.php b/owl-bot-staging/Kms/v1/src/V1/resources/hsm_management_descriptor_config.php deleted file mode 100644 index 5082664c04aa..000000000000 --- a/owl-bot-staging/Kms/v1/src/V1/resources/hsm_management_descriptor_config.php +++ /dev/null @@ -1,251 +0,0 @@ - [ - 'google.cloud.kms.v1.HsmManagement' => [ - 'CreateSingleTenantHsmInstance' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Kms\V1\SingleTenantHsmInstance', - 'metadataReturnType' => '\Google\Cloud\Kms\V1\CreateSingleTenantHsmInstanceMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateSingleTenantHsmInstanceProposal' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal', - 'metadataReturnType' => '\Google\Cloud\Kms\V1\CreateSingleTenantHsmInstanceProposalMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ExecuteSingleTenantHsmInstanceProposal' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Kms\V1\ExecuteSingleTenantHsmInstanceProposalResponse', - 'metadataReturnType' => '\Google\Cloud\Kms\V1\ExecuteSingleTenantHsmInstanceProposalMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ApproveSingleTenantHsmInstanceProposal' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Kms\V1\ApproveSingleTenantHsmInstanceProposalResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteSingleTenantHsmInstanceProposal' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetSingleTenantHsmInstance' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Kms\V1\SingleTenantHsmInstance', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetSingleTenantHsmInstanceProposal' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Kms\V1\SingleTenantHsmInstanceProposal', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListSingleTenantHsmInstanceProposals' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getSingleTenantHsmInstanceProposals', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Kms\V1\ListSingleTenantHsmInstanceProposalsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListSingleTenantHsmInstances' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getSingleTenantHsmInstances', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Kms\V1\ListSingleTenantHsmInstancesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'GetLocation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Location\Location', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'GetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'SetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'TestIamPermissions' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'templateMap' => [ - 'location' => 'projects/{project}/locations/{location}', - 'singleTenantHsmInstance' => 'projects/{project}/locations/{location}/singleTenantHsmInstances/{single_tenant_hsm_instance}', - 'singleTenantHsmInstanceProposal' => 'projects/{project}/locations/{location}/singleTenantHsmInstances/{single_tenant_hsm_instance}/proposals/{proposal}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Kms/v1/src/V1/resources/hsm_management_rest_client_config.php b/owl-bot-staging/Kms/v1/src/V1/resources/hsm_management_rest_client_config.php deleted file mode 100644 index 9bc1e1828a7d..000000000000 --- a/owl-bot-staging/Kms/v1/src/V1/resources/hsm_management_rest_client_config.php +++ /dev/null @@ -1,268 +0,0 @@ - [ - 'google.cloud.kms.v1.HsmManagement' => [ - 'ApproveSingleTenantHsmInstanceProposal' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/singleTenantHsmInstances/*/proposals/*}:approve', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'CreateSingleTenantHsmInstance' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/singleTenantHsmInstances', - 'body' => 'single_tenant_hsm_instance', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateSingleTenantHsmInstanceProposal' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/singleTenantHsmInstances/*}/proposals', - 'body' => 'single_tenant_hsm_instance_proposal', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteSingleTenantHsmInstanceProposal' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/singleTenantHsmInstances/*/proposals/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ExecuteSingleTenantHsmInstanceProposal' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/singleTenantHsmInstances/*/proposals/*}:execute', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetSingleTenantHsmInstance' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/singleTenantHsmInstances/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetSingleTenantHsmInstanceProposal' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/singleTenantHsmInstances/*/proposals/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListSingleTenantHsmInstanceProposals' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/singleTenantHsmInstances/*}/proposals', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListSingleTenantHsmInstances' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/singleTenantHsmInstances', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - ], - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.iam.v1.IAMPolicy' => [ - 'GetIamPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*}:getIamPolicy', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/cryptoKeys/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/importJobs/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConfig}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConnections/*}:getIamPolicy', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*}:setIamPolicy', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/cryptoKeys/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/importJobs/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConfig}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConnections/*}:setIamPolicy', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*}:testIamPermissions', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/cryptoKeys/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/importJobs/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConfig}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConnections/*}:testIamPermissions', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Kms/v1/src/V1/resources/key_management_service_client_config.json b/owl-bot-staging/Kms/v1/src/V1/resources/key_management_service_client_config.json deleted file mode 100644 index 50f258cec721..000000000000 --- a/owl-bot-staging/Kms/v1/src/V1/resources/key_management_service_client_config.json +++ /dev/null @@ -1,235 +0,0 @@ -{ - "interfaces": { - "google.cloud.kms.v1.KeyManagementService": { - "retry_codes": { - "no_retry_codes": [], - "no_retry_1_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE", - "DEADLINE_EXCEEDED" - ] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "no_retry_1_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "AsymmetricDecrypt": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "AsymmetricSign": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "CreateCryptoKey": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "CreateCryptoKeyVersion": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateImportJob": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "CreateKeyRing": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "Decapsulate": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "Decrypt": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteCryptoKey": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteCryptoKeyVersion": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DestroyCryptoKeyVersion": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "Encrypt": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GenerateRandomBytes": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetCryptoKey": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetCryptoKeyVersion": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetImportJob": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetKeyRing": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetPublicKey": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetRetiredResource": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ImportCryptoKeyVersion": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListCryptoKeyVersions": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListCryptoKeys": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListImportJobs": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListKeyRings": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListRetiredResources": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "MacSign": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "MacVerify": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "RawDecrypt": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "RawEncrypt": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "RestoreCryptoKeyVersion": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateCryptoKey": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateCryptoKeyPrimaryVersion": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateCryptoKeyVersion": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetLocation": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListLocations": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "SetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "TestIamPermissions": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/Kms/v1/src/V1/resources/key_management_service_descriptor_config.php b/owl-bot-staging/Kms/v1/src/V1/resources/key_management_service_descriptor_config.php deleted file mode 100644 index 98ac00539531..000000000000 --- a/owl-bot-staging/Kms/v1/src/V1/resources/key_management_service_descriptor_config.php +++ /dev/null @@ -1,561 +0,0 @@ - [ - 'google.cloud.kms.v1.KeyManagementService' => [ - 'DeleteCryptoKey' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Kms\V1\DeleteCryptoKeyMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteCryptoKeyVersion' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Kms\V1\DeleteCryptoKeyVersionMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'AsymmetricDecrypt' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Kms\V1\AsymmetricDecryptResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'AsymmetricSign' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Kms\V1\AsymmetricSignResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'CreateCryptoKey' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Kms\V1\CryptoKey', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateCryptoKeyVersion' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Kms\V1\CryptoKeyVersion', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateImportJob' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Kms\V1\ImportJob', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateKeyRing' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Kms\V1\KeyRing', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'Decapsulate' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Kms\V1\DecapsulateResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'Decrypt' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Kms\V1\DecryptResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DestroyCryptoKeyVersion' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Kms\V1\CryptoKeyVersion', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'Encrypt' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Kms\V1\EncryptResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GenerateRandomBytes' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Kms\V1\GenerateRandomBytesResponse', - 'headerParams' => [ - [ - 'keyName' => 'location', - 'fieldAccessors' => [ - 'getLocation', - ], - ], - ], - ], - 'GetCryptoKey' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Kms\V1\CryptoKey', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetCryptoKeyVersion' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Kms\V1\CryptoKeyVersion', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetImportJob' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Kms\V1\ImportJob', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetKeyRing' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Kms\V1\KeyRing', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetPublicKey' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Kms\V1\PublicKey', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetRetiredResource' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Kms\V1\RetiredResource', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ImportCryptoKeyVersion' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Kms\V1\CryptoKeyVersion', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListCryptoKeyVersions' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getCryptoKeyVersions', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Kms\V1\ListCryptoKeyVersionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListCryptoKeys' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getCryptoKeys', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Kms\V1\ListCryptoKeysResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListImportJobs' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getImportJobs', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Kms\V1\ListImportJobsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListKeyRings' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getKeyRings', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Kms\V1\ListKeyRingsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListRetiredResources' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getRetiredResources', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Kms\V1\ListRetiredResourcesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'MacSign' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Kms\V1\MacSignResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'MacVerify' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Kms\V1\MacVerifyResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'RawDecrypt' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Kms\V1\RawDecryptResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'RawEncrypt' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Kms\V1\RawEncryptResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'RestoreCryptoKeyVersion' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Kms\V1\CryptoKeyVersion', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateCryptoKey' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Kms\V1\CryptoKey', - 'headerParams' => [ - [ - 'keyName' => 'crypto_key.name', - 'fieldAccessors' => [ - 'getCryptoKey', - 'getName', - ], - ], - ], - ], - 'UpdateCryptoKeyPrimaryVersion' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Kms\V1\CryptoKey', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateCryptoKeyVersion' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Kms\V1\CryptoKeyVersion', - 'headerParams' => [ - [ - 'keyName' => 'crypto_key_version.name', - 'fieldAccessors' => [ - 'getCryptoKeyVersion', - 'getName', - ], - ], - ], - ], - 'GetLocation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Location\Location', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'GetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'SetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'TestIamPermissions' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'templateMap' => [ - 'cryptoKey' => 'projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}', - 'cryptoKeyVersion' => 'projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}', - 'importJob' => 'projects/{project}/locations/{location}/keyRings/{key_ring}/importJobs/{import_job}', - 'keyRing' => 'projects/{project}/locations/{location}/keyRings/{key_ring}', - 'location' => 'projects/{project}/locations/{location}', - 'retiredResource' => 'projects/{project}/locations/{location}/retiredResources/{retired_resource}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Kms/v1/src/V1/resources/key_management_service_rest_client_config.php b/owl-bot-staging/Kms/v1/src/V1/resources/key_management_service_rest_client_config.php deleted file mode 100644 index 1172465d9707..000000000000 --- a/owl-bot-staging/Kms/v1/src/V1/resources/key_management_service_rest_client_config.php +++ /dev/null @@ -1,565 +0,0 @@ - [ - 'google.cloud.kms.v1.KeyManagementService' => [ - 'AsymmetricDecrypt' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}:asymmetricDecrypt', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'AsymmetricSign' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}:asymmetricSign', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'CreateCryptoKey' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/keyRings/*}/cryptoKeys', - 'body' => 'crypto_key', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'crypto_key_id', - ], - ], - 'CreateCryptoKeyVersion' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/keyRings/*/cryptoKeys/*}/cryptoKeyVersions', - 'body' => 'crypto_key_version', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateImportJob' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/keyRings/*}/importJobs', - 'body' => 'import_job', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'import_job_id', - ], - ], - 'CreateKeyRing' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/keyRings', - 'body' => 'key_ring', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'key_ring_id', - ], - ], - 'Decapsulate' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}:decapsulate', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'Decrypt' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*}:decrypt', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteCryptoKey' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteCryptoKeyVersion' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DestroyCryptoKeyVersion' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}:destroy', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'Encrypt' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/**}:encrypt', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GenerateRandomBytes' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{location=projects/*/locations/*}:generateRandomBytes', - 'body' => '*', - 'placeholders' => [ - 'location' => [ - 'getters' => [ - 'getLocation', - ], - ], - ], - ], - 'GetCryptoKey' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetCryptoKeyVersion' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetImportJob' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/keyRings/*/importJobs/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetKeyRing' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/keyRings/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetPublicKey' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}/publicKey', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetRetiredResource' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/retiredResources/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ImportCryptoKeyVersion' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/keyRings/*/cryptoKeys/*}/cryptoKeyVersions:import', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListCryptoKeyVersions' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/keyRings/*/cryptoKeys/*}/cryptoKeyVersions', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListCryptoKeys' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/keyRings/*}/cryptoKeys', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListImportJobs' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/keyRings/*}/importJobs', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListKeyRings' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/keyRings', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListRetiredResources' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/retiredResources', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'MacSign' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}:macSign', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'MacVerify' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}:macVerify', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'RawDecrypt' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}:rawDecrypt', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'RawEncrypt' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}:rawEncrypt', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'RestoreCryptoKeyVersion' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}:restore', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpdateCryptoKey' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{crypto_key.name=projects/*/locations/*/keyRings/*/cryptoKeys/*}', - 'body' => 'crypto_key', - 'placeholders' => [ - 'crypto_key.name' => [ - 'getters' => [ - 'getCryptoKey', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateCryptoKeyPrimaryVersion' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*}:updatePrimaryVersion', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpdateCryptoKeyVersion' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{crypto_key_version.name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}', - 'body' => 'crypto_key_version', - 'placeholders' => [ - 'crypto_key_version.name' => [ - 'getters' => [ - 'getCryptoKeyVersion', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - ], - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.iam.v1.IAMPolicy' => [ - 'GetIamPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*}:getIamPolicy', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/cryptoKeys/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/importJobs/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConfig}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConnections/*}:getIamPolicy', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*}:setIamPolicy', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/cryptoKeys/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/importJobs/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConfig}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConnections/*}:setIamPolicy', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*}:testIamPermissions', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/cryptoKeys/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/importJobs/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConfig}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConnections/*}:testIamPermissions', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Kms/v1/tests/Unit/V1/Client/AutokeyAdminClientTest.php b/owl-bot-staging/Kms/v1/tests/Unit/V1/Client/AutokeyAdminClientTest.php deleted file mode 100644 index c102ca5b4c03..000000000000 --- a/owl-bot-staging/Kms/v1/tests/Unit/V1/Client/AutokeyAdminClientTest.php +++ /dev/null @@ -1,644 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return AutokeyAdminClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new AutokeyAdminClient($options); - } - - /** @test */ - public function getAutokeyConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $keyProject = 'keyProject721994041'; - $etag = 'etag3123477'; - $expectedResponse = new AutokeyConfig(); - $expectedResponse->setName($name2); - $expectedResponse->setKeyProject($keyProject); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->autokeyConfigName('[FOLDER]'); - $request = (new GetAutokeyConfigRequest()) - ->setName($formattedName); - $response = $gapicClient->getAutokeyConfig($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.AutokeyAdmin/GetAutokeyConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAutokeyConfigExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->autokeyConfigName('[FOLDER]'); - $request = (new GetAutokeyConfigRequest()) - ->setName($formattedName); - try { - $gapicClient->getAutokeyConfig($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function showEffectiveAutokeyConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $keyProject = 'keyProject721994041'; - $expectedResponse = new ShowEffectiveAutokeyConfigResponse(); - $expectedResponse->setKeyProject($keyProject); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $request = (new ShowEffectiveAutokeyConfigRequest()) - ->setParent($formattedParent); - $response = $gapicClient->showEffectiveAutokeyConfig($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.AutokeyAdmin/ShowEffectiveAutokeyConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function showEffectiveAutokeyConfigExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $request = (new ShowEffectiveAutokeyConfigRequest()) - ->setParent($formattedParent); - try { - $gapicClient->showEffectiveAutokeyConfig($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateAutokeyConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $keyProject = 'keyProject721994041'; - $etag = 'etag3123477'; - $expectedResponse = new AutokeyConfig(); - $expectedResponse->setName($name); - $expectedResponse->setKeyProject($keyProject); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $autokeyConfig = new AutokeyConfig(); - $updateMask = new FieldMask(); - $request = (new UpdateAutokeyConfigRequest()) - ->setAutokeyConfig($autokeyConfig) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateAutokeyConfig($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.AutokeyAdmin/UpdateAutokeyConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getAutokeyConfig(); - $this->assertProtobufEquals($autokeyConfig, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateAutokeyConfigExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $autokeyConfig = new AutokeyConfig(); - $updateMask = new FieldMask(); - $request = (new UpdateAutokeyConfigRequest()) - ->setAutokeyConfig($autokeyConfig) - ->setUpdateMask($updateMask); - try { - $gapicClient->updateAutokeyConfig($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $request = new GetLocationRequest(); - $response = $gapicClient->getLocation($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new GetLocationRequest(); - try { - $gapicClient->getLocation($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $request = new ListLocationsRequest(); - $response = $gapicClient->listLocations($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new ListLocationsRequest(); - try { - $gapicClient->listLocations($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - $response = $gapicClient->getIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - try { - $gapicClient->getIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - $response = $gapicClient->setIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - try { - $gapicClient->setIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TestIamPermissionsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - $response = $gapicClient->testIamPermissions($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPermissions(); - $this->assertProtobufEquals($permissions, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - try { - $gapicClient->testIamPermissions($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAutokeyConfigAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $keyProject = 'keyProject721994041'; - $etag = 'etag3123477'; - $expectedResponse = new AutokeyConfig(); - $expectedResponse->setName($name2); - $expectedResponse->setKeyProject($keyProject); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->autokeyConfigName('[FOLDER]'); - $request = (new GetAutokeyConfigRequest()) - ->setName($formattedName); - $response = $gapicClient->getAutokeyConfigAsync($request)->wait(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.AutokeyAdmin/GetAutokeyConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Kms/v1/tests/Unit/V1/Client/AutokeyClientTest.php b/owl-bot-staging/Kms/v1/tests/Unit/V1/Client/AutokeyClientTest.php deleted file mode 100644 index 9828c533da4b..000000000000 --- a/owl-bot-staging/Kms/v1/tests/Unit/V1/Client/AutokeyClientTest.php +++ /dev/null @@ -1,761 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return AutokeyClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new AutokeyClient($options); - } - - /** @test */ - public function createKeyHandleTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createKeyHandleTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $kmsKey = 'kmsKey-591635343'; - $resourceTypeSelector = 'resourceTypeSelector-455377709'; - $expectedResponse = new KeyHandle(); - $expectedResponse->setName($name); - $expectedResponse->setKmsKey($kmsKey); - $expectedResponse->setResourceTypeSelector($resourceTypeSelector); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createKeyHandleTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $keyHandle = new KeyHandle(); - $keyHandleResourceTypeSelector = 'keyHandleResourceTypeSelector-1310560146'; - $keyHandle->setResourceTypeSelector($keyHandleResourceTypeSelector); - $request = (new CreateKeyHandleRequest()) - ->setParent($formattedParent) - ->setKeyHandle($keyHandle); - $response = $gapicClient->createKeyHandle($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.Autokey/CreateKeyHandle', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getKeyHandle(); - $this->assertProtobufEquals($keyHandle, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createKeyHandleTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createKeyHandleExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createKeyHandleTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $keyHandle = new KeyHandle(); - $keyHandleResourceTypeSelector = 'keyHandleResourceTypeSelector-1310560146'; - $keyHandle->setResourceTypeSelector($keyHandleResourceTypeSelector); - $request = (new CreateKeyHandleRequest()) - ->setParent($formattedParent) - ->setKeyHandle($keyHandle); - $response = $gapicClient->createKeyHandle($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createKeyHandleTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getKeyHandleTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $kmsKey = 'kmsKey-591635343'; - $resourceTypeSelector = 'resourceTypeSelector-455377709'; - $expectedResponse = new KeyHandle(); - $expectedResponse->setName($name2); - $expectedResponse->setKmsKey($kmsKey); - $expectedResponse->setResourceTypeSelector($resourceTypeSelector); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->keyHandleName('[PROJECT]', '[LOCATION]', '[KEY_HANDLE]'); - $request = (new GetKeyHandleRequest()) - ->setName($formattedName); - $response = $gapicClient->getKeyHandle($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.Autokey/GetKeyHandle', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getKeyHandleExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->keyHandleName('[PROJECT]', '[LOCATION]', '[KEY_HANDLE]'); - $request = (new GetKeyHandleRequest()) - ->setName($formattedName); - try { - $gapicClient->getKeyHandle($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listKeyHandlesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $keyHandlesElement = new KeyHandle(); - $keyHandles = [ - $keyHandlesElement, - ]; - $expectedResponse = new ListKeyHandlesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setKeyHandles($keyHandles); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListKeyHandlesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listKeyHandles($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getKeyHandles()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.Autokey/ListKeyHandles', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listKeyHandlesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListKeyHandlesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listKeyHandles($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $request = new GetLocationRequest(); - $response = $gapicClient->getLocation($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new GetLocationRequest(); - try { - $gapicClient->getLocation($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $request = new ListLocationsRequest(); - $response = $gapicClient->listLocations($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new ListLocationsRequest(); - try { - $gapicClient->listLocations($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - $response = $gapicClient->getIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - try { - $gapicClient->getIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - $response = $gapicClient->setIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - try { - $gapicClient->setIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TestIamPermissionsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - $response = $gapicClient->testIamPermissions($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPermissions(); - $this->assertProtobufEquals($permissions, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - try { - $gapicClient->testIamPermissions($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createKeyHandleAsyncTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createKeyHandleTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $kmsKey = 'kmsKey-591635343'; - $resourceTypeSelector = 'resourceTypeSelector-455377709'; - $expectedResponse = new KeyHandle(); - $expectedResponse->setName($name); - $expectedResponse->setKmsKey($kmsKey); - $expectedResponse->setResourceTypeSelector($resourceTypeSelector); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createKeyHandleTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $keyHandle = new KeyHandle(); - $keyHandleResourceTypeSelector = 'keyHandleResourceTypeSelector-1310560146'; - $keyHandle->setResourceTypeSelector($keyHandleResourceTypeSelector); - $request = (new CreateKeyHandleRequest()) - ->setParent($formattedParent) - ->setKeyHandle($keyHandle); - $response = $gapicClient->createKeyHandleAsync($request)->wait(); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.Autokey/CreateKeyHandle', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getKeyHandle(); - $this->assertProtobufEquals($keyHandle, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createKeyHandleTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } -} diff --git a/owl-bot-staging/Kms/v1/tests/Unit/V1/Client/EkmServiceClientTest.php b/owl-bot-staging/Kms/v1/tests/Unit/V1/Client/EkmServiceClientTest.php deleted file mode 100644 index fe3bede918ee..000000000000 --- a/owl-bot-staging/Kms/v1/tests/Unit/V1/Client/EkmServiceClientTest.php +++ /dev/null @@ -1,948 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return EkmServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new EkmServiceClient($options); - } - - /** @test */ - public function createEkmConnectionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $etag = 'etag3123477'; - $cryptoSpacePath = 'cryptoSpacePath-1229393412'; - $expectedResponse = new EkmConnection(); - $expectedResponse->setName($name); - $expectedResponse->setEtag($etag); - $expectedResponse->setCryptoSpacePath($cryptoSpacePath); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $ekmConnectionId = 'ekmConnectionId270499940'; - $ekmConnection = new EkmConnection(); - $request = (new CreateEkmConnectionRequest()) - ->setParent($formattedParent) - ->setEkmConnectionId($ekmConnectionId) - ->setEkmConnection($ekmConnection); - $response = $gapicClient->createEkmConnection($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.EkmService/CreateEkmConnection', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getEkmConnectionId(); - $this->assertProtobufEquals($ekmConnectionId, $actualValue); - $actualValue = $actualRequestObject->getEkmConnection(); - $this->assertProtobufEquals($ekmConnection, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createEkmConnectionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $ekmConnectionId = 'ekmConnectionId270499940'; - $ekmConnection = new EkmConnection(); - $request = (new CreateEkmConnectionRequest()) - ->setParent($formattedParent) - ->setEkmConnectionId($ekmConnectionId) - ->setEkmConnection($ekmConnection); - try { - $gapicClient->createEkmConnection($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getEkmConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $defaultEkmConnection = 'defaultEkmConnection1342549844'; - $expectedResponse = new EkmConfig(); - $expectedResponse->setName($name2); - $expectedResponse->setDefaultEkmConnection($defaultEkmConnection); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->ekmConfigName('[PROJECT]', '[LOCATION]'); - $request = (new GetEkmConfigRequest()) - ->setName($formattedName); - $response = $gapicClient->getEkmConfig($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.EkmService/GetEkmConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getEkmConfigExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->ekmConfigName('[PROJECT]', '[LOCATION]'); - $request = (new GetEkmConfigRequest()) - ->setName($formattedName); - try { - $gapicClient->getEkmConfig($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getEkmConnectionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $etag = 'etag3123477'; - $cryptoSpacePath = 'cryptoSpacePath-1229393412'; - $expectedResponse = new EkmConnection(); - $expectedResponse->setName($name2); - $expectedResponse->setEtag($etag); - $expectedResponse->setCryptoSpacePath($cryptoSpacePath); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->ekmConnectionName('[PROJECT]', '[LOCATION]', '[EKM_CONNECTION]'); - $request = (new GetEkmConnectionRequest()) - ->setName($formattedName); - $response = $gapicClient->getEkmConnection($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.EkmService/GetEkmConnection', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getEkmConnectionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->ekmConnectionName('[PROJECT]', '[LOCATION]', '[EKM_CONNECTION]'); - $request = (new GetEkmConnectionRequest()) - ->setName($formattedName); - try { - $gapicClient->getEkmConnection($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listEkmConnectionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $totalSize = 705419236; - $ekmConnectionsElement = new EkmConnection(); - $ekmConnections = [ - $ekmConnectionsElement, - ]; - $expectedResponse = new ListEkmConnectionsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setTotalSize($totalSize); - $expectedResponse->setEkmConnections($ekmConnections); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListEkmConnectionsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listEkmConnections($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getEkmConnections()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.EkmService/ListEkmConnections', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listEkmConnectionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListEkmConnectionsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listEkmConnections($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateEkmConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $defaultEkmConnection = 'defaultEkmConnection1342549844'; - $expectedResponse = new EkmConfig(); - $expectedResponse->setName($name); - $expectedResponse->setDefaultEkmConnection($defaultEkmConnection); - $transport->addResponse($expectedResponse); - // Mock request - $ekmConfig = new EkmConfig(); - $updateMask = new FieldMask(); - $request = (new UpdateEkmConfigRequest()) - ->setEkmConfig($ekmConfig) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateEkmConfig($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.EkmService/UpdateEkmConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getEkmConfig(); - $this->assertProtobufEquals($ekmConfig, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateEkmConfigExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $ekmConfig = new EkmConfig(); - $updateMask = new FieldMask(); - $request = (new UpdateEkmConfigRequest()) - ->setEkmConfig($ekmConfig) - ->setUpdateMask($updateMask); - try { - $gapicClient->updateEkmConfig($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateEkmConnectionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $etag = 'etag3123477'; - $cryptoSpacePath = 'cryptoSpacePath-1229393412'; - $expectedResponse = new EkmConnection(); - $expectedResponse->setName($name); - $expectedResponse->setEtag($etag); - $expectedResponse->setCryptoSpacePath($cryptoSpacePath); - $transport->addResponse($expectedResponse); - // Mock request - $ekmConnection = new EkmConnection(); - $updateMask = new FieldMask(); - $request = (new UpdateEkmConnectionRequest()) - ->setEkmConnection($ekmConnection) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateEkmConnection($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.EkmService/UpdateEkmConnection', $actualFuncCall); - $actualValue = $actualRequestObject->getEkmConnection(); - $this->assertProtobufEquals($ekmConnection, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateEkmConnectionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $ekmConnection = new EkmConnection(); - $updateMask = new FieldMask(); - $request = (new UpdateEkmConnectionRequest()) - ->setEkmConnection($ekmConnection) - ->setUpdateMask($updateMask); - try { - $gapicClient->updateEkmConnection($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function verifyConnectivityTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new VerifyConnectivityResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->ekmConnectionName('[PROJECT]', '[LOCATION]', '[EKM_CONNECTION]'); - $request = (new VerifyConnectivityRequest()) - ->setName($formattedName); - $response = $gapicClient->verifyConnectivity($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.EkmService/VerifyConnectivity', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function verifyConnectivityExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->ekmConnectionName('[PROJECT]', '[LOCATION]', '[EKM_CONNECTION]'); - $request = (new VerifyConnectivityRequest()) - ->setName($formattedName); - try { - $gapicClient->verifyConnectivity($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $request = new GetLocationRequest(); - $response = $gapicClient->getLocation($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new GetLocationRequest(); - try { - $gapicClient->getLocation($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $request = new ListLocationsRequest(); - $response = $gapicClient->listLocations($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new ListLocationsRequest(); - try { - $gapicClient->listLocations($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - $response = $gapicClient->getIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - try { - $gapicClient->getIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - $response = $gapicClient->setIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - try { - $gapicClient->setIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TestIamPermissionsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - $response = $gapicClient->testIamPermissions($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPermissions(); - $this->assertProtobufEquals($permissions, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - try { - $gapicClient->testIamPermissions($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createEkmConnectionAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $etag = 'etag3123477'; - $cryptoSpacePath = 'cryptoSpacePath-1229393412'; - $expectedResponse = new EkmConnection(); - $expectedResponse->setName($name); - $expectedResponse->setEtag($etag); - $expectedResponse->setCryptoSpacePath($cryptoSpacePath); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $ekmConnectionId = 'ekmConnectionId270499940'; - $ekmConnection = new EkmConnection(); - $request = (new CreateEkmConnectionRequest()) - ->setParent($formattedParent) - ->setEkmConnectionId($ekmConnectionId) - ->setEkmConnection($ekmConnection); - $response = $gapicClient->createEkmConnectionAsync($request)->wait(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.EkmService/CreateEkmConnection', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getEkmConnectionId(); - $this->assertProtobufEquals($ekmConnectionId, $actualValue); - $actualValue = $actualRequestObject->getEkmConnection(); - $this->assertProtobufEquals($ekmConnection, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Kms/v1/tests/Unit/V1/Client/HsmManagementClientTest.php b/owl-bot-staging/Kms/v1/tests/Unit/V1/Client/HsmManagementClientTest.php deleted file mode 100644 index 93b8e0e98def..000000000000 --- a/owl-bot-staging/Kms/v1/tests/Unit/V1/Client/HsmManagementClientTest.php +++ /dev/null @@ -1,1254 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return HsmManagementClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new HsmManagementClient($options); - } - - /** @test */ - public function approveSingleTenantHsmInstanceProposalTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ApproveSingleTenantHsmInstanceProposalResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->singleTenantHsmInstanceProposalName('[PROJECT]', '[LOCATION]', '[SINGLE_TENANT_HSM_INSTANCE]', '[PROPOSAL]'); - $quorumReply = new QuorumReply(); - $quorumReplyChallengeReplies = []; - $quorumReply->setChallengeReplies($quorumReplyChallengeReplies); - $request = (new ApproveSingleTenantHsmInstanceProposalRequest()) - ->setName($formattedName) - ->setQuorumReply($quorumReply); - $response = $gapicClient->approveSingleTenantHsmInstanceProposal($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.HsmManagement/ApproveSingleTenantHsmInstanceProposal', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getQuorumReply(); - $this->assertProtobufEquals($quorumReply, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function approveSingleTenantHsmInstanceProposalExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->singleTenantHsmInstanceProposalName('[PROJECT]', '[LOCATION]', '[SINGLE_TENANT_HSM_INSTANCE]', '[PROPOSAL]'); - $quorumReply = new QuorumReply(); - $quorumReplyChallengeReplies = []; - $quorumReply->setChallengeReplies($quorumReplyChallengeReplies); - $request = (new ApproveSingleTenantHsmInstanceProposalRequest()) - ->setName($formattedName) - ->setQuorumReply($quorumReply); - try { - $gapicClient->approveSingleTenantHsmInstanceProposal($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createSingleTenantHsmInstanceTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createSingleTenantHsmInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $expectedResponse = new SingleTenantHsmInstance(); - $expectedResponse->setName($name); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createSingleTenantHsmInstanceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $singleTenantHsmInstance = new SingleTenantHsmInstance(); - $singleTenantHsmInstanceQuorumAuth = new QuorumAuth(); - $quorumAuthTotalApproverCount = 152512237; - $singleTenantHsmInstanceQuorumAuth->setTotalApproverCount($quorumAuthTotalApproverCount); - $singleTenantHsmInstance->setQuorumAuth($singleTenantHsmInstanceQuorumAuth); - $request = (new CreateSingleTenantHsmInstanceRequest()) - ->setParent($formattedParent) - ->setSingleTenantHsmInstance($singleTenantHsmInstance); - $response = $gapicClient->createSingleTenantHsmInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.HsmManagement/CreateSingleTenantHsmInstance', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getSingleTenantHsmInstance(); - $this->assertProtobufEquals($singleTenantHsmInstance, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createSingleTenantHsmInstanceTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createSingleTenantHsmInstanceExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createSingleTenantHsmInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $singleTenantHsmInstance = new SingleTenantHsmInstance(); - $singleTenantHsmInstanceQuorumAuth = new QuorumAuth(); - $quorumAuthTotalApproverCount = 152512237; - $singleTenantHsmInstanceQuorumAuth->setTotalApproverCount($quorumAuthTotalApproverCount); - $singleTenantHsmInstance->setQuorumAuth($singleTenantHsmInstanceQuorumAuth); - $request = (new CreateSingleTenantHsmInstanceRequest()) - ->setParent($formattedParent) - ->setSingleTenantHsmInstance($singleTenantHsmInstance); - $response = $gapicClient->createSingleTenantHsmInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createSingleTenantHsmInstanceTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createSingleTenantHsmInstanceProposalTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createSingleTenantHsmInstanceProposalTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $failureReason = 'failureReason1743941273'; - $expectedResponse = new SingleTenantHsmInstanceProposal(); - $expectedResponse->setName($name); - $expectedResponse->setFailureReason($failureReason); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createSingleTenantHsmInstanceProposalTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->singleTenantHsmInstanceName('[PROJECT]', '[LOCATION]', '[SINGLE_TENANT_HSM_INSTANCE]'); - $singleTenantHsmInstanceProposal = new SingleTenantHsmInstanceProposal(); - $request = (new CreateSingleTenantHsmInstanceProposalRequest()) - ->setParent($formattedParent) - ->setSingleTenantHsmInstanceProposal($singleTenantHsmInstanceProposal); - $response = $gapicClient->createSingleTenantHsmInstanceProposal($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.HsmManagement/CreateSingleTenantHsmInstanceProposal', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getSingleTenantHsmInstanceProposal(); - $this->assertProtobufEquals($singleTenantHsmInstanceProposal, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createSingleTenantHsmInstanceProposalTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createSingleTenantHsmInstanceProposalExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createSingleTenantHsmInstanceProposalTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->singleTenantHsmInstanceName('[PROJECT]', '[LOCATION]', '[SINGLE_TENANT_HSM_INSTANCE]'); - $singleTenantHsmInstanceProposal = new SingleTenantHsmInstanceProposal(); - $request = (new CreateSingleTenantHsmInstanceProposalRequest()) - ->setParent($formattedParent) - ->setSingleTenantHsmInstanceProposal($singleTenantHsmInstanceProposal); - $response = $gapicClient->createSingleTenantHsmInstanceProposal($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createSingleTenantHsmInstanceProposalTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteSingleTenantHsmInstanceProposalTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->singleTenantHsmInstanceProposalName('[PROJECT]', '[LOCATION]', '[SINGLE_TENANT_HSM_INSTANCE]', '[PROPOSAL]'); - $request = (new DeleteSingleTenantHsmInstanceProposalRequest()) - ->setName($formattedName); - $gapicClient->deleteSingleTenantHsmInstanceProposal($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.HsmManagement/DeleteSingleTenantHsmInstanceProposal', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteSingleTenantHsmInstanceProposalExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->singleTenantHsmInstanceProposalName('[PROJECT]', '[LOCATION]', '[SINGLE_TENANT_HSM_INSTANCE]', '[PROPOSAL]'); - $request = (new DeleteSingleTenantHsmInstanceProposalRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteSingleTenantHsmInstanceProposal($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function executeSingleTenantHsmInstanceProposalTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/executeSingleTenantHsmInstanceProposalTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new ExecuteSingleTenantHsmInstanceProposalResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/executeSingleTenantHsmInstanceProposalTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->singleTenantHsmInstanceProposalName('[PROJECT]', '[LOCATION]', '[SINGLE_TENANT_HSM_INSTANCE]', '[PROPOSAL]'); - $request = (new ExecuteSingleTenantHsmInstanceProposalRequest()) - ->setName($formattedName); - $response = $gapicClient->executeSingleTenantHsmInstanceProposal($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.HsmManagement/ExecuteSingleTenantHsmInstanceProposal', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/executeSingleTenantHsmInstanceProposalTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function executeSingleTenantHsmInstanceProposalExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/executeSingleTenantHsmInstanceProposalTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->singleTenantHsmInstanceProposalName('[PROJECT]', '[LOCATION]', '[SINGLE_TENANT_HSM_INSTANCE]', '[PROPOSAL]'); - $request = (new ExecuteSingleTenantHsmInstanceProposalRequest()) - ->setName($formattedName); - $response = $gapicClient->executeSingleTenantHsmInstanceProposal($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/executeSingleTenantHsmInstanceProposalTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getSingleTenantHsmInstanceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new SingleTenantHsmInstance(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->singleTenantHsmInstanceName('[PROJECT]', '[LOCATION]', '[SINGLE_TENANT_HSM_INSTANCE]'); - $request = (new GetSingleTenantHsmInstanceRequest()) - ->setName($formattedName); - $response = $gapicClient->getSingleTenantHsmInstance($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.HsmManagement/GetSingleTenantHsmInstance', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSingleTenantHsmInstanceExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->singleTenantHsmInstanceName('[PROJECT]', '[LOCATION]', '[SINGLE_TENANT_HSM_INSTANCE]'); - $request = (new GetSingleTenantHsmInstanceRequest()) - ->setName($formattedName); - try { - $gapicClient->getSingleTenantHsmInstance($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSingleTenantHsmInstanceProposalTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $failureReason = 'failureReason1743941273'; - $expectedResponse = new SingleTenantHsmInstanceProposal(); - $expectedResponse->setName($name2); - $expectedResponse->setFailureReason($failureReason); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->singleTenantHsmInstanceProposalName('[PROJECT]', '[LOCATION]', '[SINGLE_TENANT_HSM_INSTANCE]', '[PROPOSAL]'); - $request = (new GetSingleTenantHsmInstanceProposalRequest()) - ->setName($formattedName); - $response = $gapicClient->getSingleTenantHsmInstanceProposal($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.HsmManagement/GetSingleTenantHsmInstanceProposal', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSingleTenantHsmInstanceProposalExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->singleTenantHsmInstanceProposalName('[PROJECT]', '[LOCATION]', '[SINGLE_TENANT_HSM_INSTANCE]', '[PROPOSAL]'); - $request = (new GetSingleTenantHsmInstanceProposalRequest()) - ->setName($formattedName); - try { - $gapicClient->getSingleTenantHsmInstanceProposal($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSingleTenantHsmInstanceProposalsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $totalSize = 705419236; - $singleTenantHsmInstanceProposalsElement = new SingleTenantHsmInstanceProposal(); - $singleTenantHsmInstanceProposals = [ - $singleTenantHsmInstanceProposalsElement, - ]; - $expectedResponse = new ListSingleTenantHsmInstanceProposalsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setTotalSize($totalSize); - $expectedResponse->setSingleTenantHsmInstanceProposals($singleTenantHsmInstanceProposals); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->singleTenantHsmInstanceName('[PROJECT]', '[LOCATION]', '[SINGLE_TENANT_HSM_INSTANCE]'); - $request = (new ListSingleTenantHsmInstanceProposalsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listSingleTenantHsmInstanceProposals($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getSingleTenantHsmInstanceProposals()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.HsmManagement/ListSingleTenantHsmInstanceProposals', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSingleTenantHsmInstanceProposalsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->singleTenantHsmInstanceName('[PROJECT]', '[LOCATION]', '[SINGLE_TENANT_HSM_INSTANCE]'); - $request = (new ListSingleTenantHsmInstanceProposalsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listSingleTenantHsmInstanceProposals($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSingleTenantHsmInstancesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $totalSize = 705419236; - $singleTenantHsmInstancesElement = new SingleTenantHsmInstance(); - $singleTenantHsmInstances = [ - $singleTenantHsmInstancesElement, - ]; - $expectedResponse = new ListSingleTenantHsmInstancesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setTotalSize($totalSize); - $expectedResponse->setSingleTenantHsmInstances($singleTenantHsmInstances); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListSingleTenantHsmInstancesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listSingleTenantHsmInstances($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getSingleTenantHsmInstances()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.HsmManagement/ListSingleTenantHsmInstances', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSingleTenantHsmInstancesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListSingleTenantHsmInstancesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listSingleTenantHsmInstances($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $request = new GetLocationRequest(); - $response = $gapicClient->getLocation($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new GetLocationRequest(); - try { - $gapicClient->getLocation($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $request = new ListLocationsRequest(); - $response = $gapicClient->listLocations($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new ListLocationsRequest(); - try { - $gapicClient->listLocations($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - $response = $gapicClient->getIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - try { - $gapicClient->getIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - $response = $gapicClient->setIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - try { - $gapicClient->setIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TestIamPermissionsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - $response = $gapicClient->testIamPermissions($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPermissions(); - $this->assertProtobufEquals($permissions, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - try { - $gapicClient->testIamPermissions($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function approveSingleTenantHsmInstanceProposalAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ApproveSingleTenantHsmInstanceProposalResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->singleTenantHsmInstanceProposalName('[PROJECT]', '[LOCATION]', '[SINGLE_TENANT_HSM_INSTANCE]', '[PROPOSAL]'); - $quorumReply = new QuorumReply(); - $quorumReplyChallengeReplies = []; - $quorumReply->setChallengeReplies($quorumReplyChallengeReplies); - $request = (new ApproveSingleTenantHsmInstanceProposalRequest()) - ->setName($formattedName) - ->setQuorumReply($quorumReply); - $response = $gapicClient->approveSingleTenantHsmInstanceProposalAsync($request)->wait(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.HsmManagement/ApproveSingleTenantHsmInstanceProposal', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getQuorumReply(); - $this->assertProtobufEquals($quorumReply, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Kms/v1/tests/Unit/V1/Client/KeyManagementServiceClientTest.php b/owl-bot-staging/Kms/v1/tests/Unit/V1/Client/KeyManagementServiceClientTest.php deleted file mode 100644 index bb1c652777b8..000000000000 --- a/owl-bot-staging/Kms/v1/tests/Unit/V1/Client/KeyManagementServiceClientTest.php +++ /dev/null @@ -1,3050 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return KeyManagementServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new KeyManagementServiceClient($options); - } - - /** @test */ - public function asymmetricDecryptTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $plaintext = '-9'; - $verifiedCiphertextCrc32c = true; - $expectedResponse = new AsymmetricDecryptResponse(); - $expectedResponse->setPlaintext($plaintext); - $expectedResponse->setVerifiedCiphertextCrc32c($verifiedCiphertextCrc32c); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); - $ciphertext = '-72'; - $request = (new AsymmetricDecryptRequest()) - ->setName($formattedName) - ->setCiphertext($ciphertext); - $response = $gapicClient->asymmetricDecrypt($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.KeyManagementService/AsymmetricDecrypt', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getCiphertext(); - $this->assertProtobufEquals($ciphertext, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function asymmetricDecryptExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); - $ciphertext = '-72'; - $request = (new AsymmetricDecryptRequest()) - ->setName($formattedName) - ->setCiphertext($ciphertext); - try { - $gapicClient->asymmetricDecrypt($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function asymmetricSignTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $signature = '-72'; - $verifiedDigestCrc32c = true; - $name2 = 'name2-1052831874'; - $verifiedDataCrc32c = true; - $expectedResponse = new AsymmetricSignResponse(); - $expectedResponse->setSignature($signature); - $expectedResponse->setVerifiedDigestCrc32c($verifiedDigestCrc32c); - $expectedResponse->setName($name2); - $expectedResponse->setVerifiedDataCrc32c($verifiedDataCrc32c); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); - $digest = new Digest(); - $request = (new AsymmetricSignRequest()) - ->setName($formattedName) - ->setDigest($digest); - $response = $gapicClient->asymmetricSign($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.KeyManagementService/AsymmetricSign', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getDigest(); - $this->assertProtobufEquals($digest, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function asymmetricSignExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); - $digest = new Digest(); - $request = (new AsymmetricSignRequest()) - ->setName($formattedName) - ->setDigest($digest); - try { - $gapicClient->asymmetricSign($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createCryptoKeyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $importOnly = true; - $cryptoKeyBackend = 'cryptoKeyBackend-1526615498'; - $expectedResponse = new CryptoKey(); - $expectedResponse->setName($name); - $expectedResponse->setImportOnly($importOnly); - $expectedResponse->setCryptoKeyBackend($cryptoKeyBackend); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->keyRingName('[PROJECT]', '[LOCATION]', '[KEY_RING]'); - $cryptoKeyId = 'cryptoKeyId-2123094983'; - $cryptoKey = new CryptoKey(); - $request = (new CreateCryptoKeyRequest()) - ->setParent($formattedParent) - ->setCryptoKeyId($cryptoKeyId) - ->setCryptoKey($cryptoKey); - $response = $gapicClient->createCryptoKey($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.KeyManagementService/CreateCryptoKey', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getCryptoKeyId(); - $this->assertProtobufEquals($cryptoKeyId, $actualValue); - $actualValue = $actualRequestObject->getCryptoKey(); - $this->assertProtobufEquals($cryptoKey, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createCryptoKeyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->keyRingName('[PROJECT]', '[LOCATION]', '[KEY_RING]'); - $cryptoKeyId = 'cryptoKeyId-2123094983'; - $cryptoKey = new CryptoKey(); - $request = (new CreateCryptoKeyRequest()) - ->setParent($formattedParent) - ->setCryptoKeyId($cryptoKeyId) - ->setCryptoKey($cryptoKey); - try { - $gapicClient->createCryptoKey($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createCryptoKeyVersionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $importJob = 'importJob2125587491'; - $importFailureReason = 'importFailureReason-494073229'; - $generationFailureReason = 'generationFailureReason1749803168'; - $externalDestructionFailureReason = 'externalDestructionFailureReason-2122384710'; - $reimportEligible = true; - $expectedResponse = new CryptoKeyVersion(); - $expectedResponse->setName($name); - $expectedResponse->setImportJob($importJob); - $expectedResponse->setImportFailureReason($importFailureReason); - $expectedResponse->setGenerationFailureReason($generationFailureReason); - $expectedResponse->setExternalDestructionFailureReason($externalDestructionFailureReason); - $expectedResponse->setReimportEligible($reimportEligible); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->cryptoKeyName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]'); - $cryptoKeyVersion = new CryptoKeyVersion(); - $request = (new CreateCryptoKeyVersionRequest()) - ->setParent($formattedParent) - ->setCryptoKeyVersion($cryptoKeyVersion); - $response = $gapicClient->createCryptoKeyVersion($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.KeyManagementService/CreateCryptoKeyVersion', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getCryptoKeyVersion(); - $this->assertProtobufEquals($cryptoKeyVersion, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createCryptoKeyVersionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->cryptoKeyName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]'); - $cryptoKeyVersion = new CryptoKeyVersion(); - $request = (new CreateCryptoKeyVersionRequest()) - ->setParent($formattedParent) - ->setCryptoKeyVersion($cryptoKeyVersion); - try { - $gapicClient->createCryptoKeyVersion($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createImportJobTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $cryptoKeyBackend = 'cryptoKeyBackend-1526615498'; - $expectedResponse = new ImportJob(); - $expectedResponse->setName($name); - $expectedResponse->setCryptoKeyBackend($cryptoKeyBackend); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->keyRingName('[PROJECT]', '[LOCATION]', '[KEY_RING]'); - $importJobId = 'importJobId-1620773193'; - $importJob = new ImportJob(); - $importJobImportMethod = ImportMethod::IMPORT_METHOD_UNSPECIFIED; - $importJob->setImportMethod($importJobImportMethod); - $importJobProtectionLevel = ProtectionLevel::PROTECTION_LEVEL_UNSPECIFIED; - $importJob->setProtectionLevel($importJobProtectionLevel); - $request = (new CreateImportJobRequest()) - ->setParent($formattedParent) - ->setImportJobId($importJobId) - ->setImportJob($importJob); - $response = $gapicClient->createImportJob($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.KeyManagementService/CreateImportJob', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getImportJobId(); - $this->assertProtobufEquals($importJobId, $actualValue); - $actualValue = $actualRequestObject->getImportJob(); - $this->assertProtobufEquals($importJob, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createImportJobExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->keyRingName('[PROJECT]', '[LOCATION]', '[KEY_RING]'); - $importJobId = 'importJobId-1620773193'; - $importJob = new ImportJob(); - $importJobImportMethod = ImportMethod::IMPORT_METHOD_UNSPECIFIED; - $importJob->setImportMethod($importJobImportMethod); - $importJobProtectionLevel = ProtectionLevel::PROTECTION_LEVEL_UNSPECIFIED; - $importJob->setProtectionLevel($importJobProtectionLevel); - $request = (new CreateImportJobRequest()) - ->setParent($formattedParent) - ->setImportJobId($importJobId) - ->setImportJob($importJob); - try { - $gapicClient->createImportJob($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createKeyRingTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $expectedResponse = new KeyRing(); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $keyRingId = 'keyRingId-2056646742'; - $keyRing = new KeyRing(); - $request = (new CreateKeyRingRequest()) - ->setParent($formattedParent) - ->setKeyRingId($keyRingId) - ->setKeyRing($keyRing); - $response = $gapicClient->createKeyRing($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.KeyManagementService/CreateKeyRing', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getKeyRingId(); - $this->assertProtobufEquals($keyRingId, $actualValue); - $actualValue = $actualRequestObject->getKeyRing(); - $this->assertProtobufEquals($keyRing, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createKeyRingExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $keyRingId = 'keyRingId-2056646742'; - $keyRing = new KeyRing(); - $request = (new CreateKeyRingRequest()) - ->setParent($formattedParent) - ->setKeyRingId($keyRingId) - ->setKeyRing($keyRing); - try { - $gapicClient->createKeyRing($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function decapsulateTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $sharedSecret = '-54'; - $sharedSecretCrc32c = 1482306981; - $verifiedCiphertextCrc32c = true; - $expectedResponse = new DecapsulateResponse(); - $expectedResponse->setName($name2); - $expectedResponse->setSharedSecret($sharedSecret); - $expectedResponse->setSharedSecretCrc32c($sharedSecretCrc32c); - $expectedResponse->setVerifiedCiphertextCrc32c($verifiedCiphertextCrc32c); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); - $ciphertext = '-72'; - $request = (new DecapsulateRequest()) - ->setName($formattedName) - ->setCiphertext($ciphertext); - $response = $gapicClient->decapsulate($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.KeyManagementService/Decapsulate', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getCiphertext(); - $this->assertProtobufEquals($ciphertext, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function decapsulateExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); - $ciphertext = '-72'; - $request = (new DecapsulateRequest()) - ->setName($formattedName) - ->setCiphertext($ciphertext); - try { - $gapicClient->decapsulate($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function decryptTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $plaintext = '-9'; - $usedPrimary = true; - $expectedResponse = new DecryptResponse(); - $expectedResponse->setPlaintext($plaintext); - $expectedResponse->setUsedPrimary($usedPrimary); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->cryptoKeyName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]'); - $ciphertext = '-72'; - $request = (new DecryptRequest()) - ->setName($formattedName) - ->setCiphertext($ciphertext); - $response = $gapicClient->decrypt($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.KeyManagementService/Decrypt', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getCiphertext(); - $this->assertProtobufEquals($ciphertext, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function decryptExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->cryptoKeyName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]'); - $ciphertext = '-72'; - $request = (new DecryptRequest()) - ->setName($formattedName) - ->setCiphertext($ciphertext); - try { - $gapicClient->decrypt($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteCryptoKeyTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteCryptoKeyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteCryptoKeyTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->cryptoKeyName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]'); - $request = (new DeleteCryptoKeyRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteCryptoKey($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.KeyManagementService/DeleteCryptoKey', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteCryptoKeyTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteCryptoKeyExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteCryptoKeyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->cryptoKeyName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]'); - $request = (new DeleteCryptoKeyRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteCryptoKey($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteCryptoKeyTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteCryptoKeyVersionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteCryptoKeyVersionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteCryptoKeyVersionTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); - $request = (new DeleteCryptoKeyVersionRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteCryptoKeyVersion($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.KeyManagementService/DeleteCryptoKeyVersion', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteCryptoKeyVersionTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteCryptoKeyVersionExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteCryptoKeyVersionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); - $request = (new DeleteCryptoKeyVersionRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteCryptoKeyVersion($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteCryptoKeyVersionTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function destroyCryptoKeyVersionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $importJob = 'importJob2125587491'; - $importFailureReason = 'importFailureReason-494073229'; - $generationFailureReason = 'generationFailureReason1749803168'; - $externalDestructionFailureReason = 'externalDestructionFailureReason-2122384710'; - $reimportEligible = true; - $expectedResponse = new CryptoKeyVersion(); - $expectedResponse->setName($name2); - $expectedResponse->setImportJob($importJob); - $expectedResponse->setImportFailureReason($importFailureReason); - $expectedResponse->setGenerationFailureReason($generationFailureReason); - $expectedResponse->setExternalDestructionFailureReason($externalDestructionFailureReason); - $expectedResponse->setReimportEligible($reimportEligible); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); - $request = (new DestroyCryptoKeyVersionRequest()) - ->setName($formattedName); - $response = $gapicClient->destroyCryptoKeyVersion($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.KeyManagementService/DestroyCryptoKeyVersion', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function destroyCryptoKeyVersionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); - $request = (new DestroyCryptoKeyVersionRequest()) - ->setName($formattedName); - try { - $gapicClient->destroyCryptoKeyVersion($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function encryptTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $ciphertext = '-72'; - $verifiedPlaintextCrc32c = false; - $verifiedAdditionalAuthenticatedDataCrc32c = true; - $expectedResponse = new EncryptResponse(); - $expectedResponse->setName($name2); - $expectedResponse->setCiphertext($ciphertext); - $expectedResponse->setVerifiedPlaintextCrc32c($verifiedPlaintextCrc32c); - $expectedResponse->setVerifiedAdditionalAuthenticatedDataCrc32c($verifiedAdditionalAuthenticatedDataCrc32c); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $plaintext = '-9'; - $request = (new EncryptRequest()) - ->setName($name) - ->setPlaintext($plaintext); - $response = $gapicClient->encrypt($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.KeyManagementService/Encrypt', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $actualValue = $actualRequestObject->getPlaintext(); - $this->assertProtobufEquals($plaintext, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function encryptExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $name = 'name3373707'; - $plaintext = '-9'; - $request = (new EncryptRequest()) - ->setName($name) - ->setPlaintext($plaintext); - try { - $gapicClient->encrypt($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function generateRandomBytesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $data = '-86'; - $expectedResponse = new GenerateRandomBytesResponse(); - $expectedResponse->setData($data); - $transport->addResponse($expectedResponse); - $request = new GenerateRandomBytesRequest(); - $response = $gapicClient->generateRandomBytes($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.KeyManagementService/GenerateRandomBytes', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function generateRandomBytesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new GenerateRandomBytesRequest(); - try { - $gapicClient->generateRandomBytes($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getCryptoKeyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $importOnly = true; - $cryptoKeyBackend = 'cryptoKeyBackend-1526615498'; - $expectedResponse = new CryptoKey(); - $expectedResponse->setName($name2); - $expectedResponse->setImportOnly($importOnly); - $expectedResponse->setCryptoKeyBackend($cryptoKeyBackend); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->cryptoKeyName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]'); - $request = (new GetCryptoKeyRequest()) - ->setName($formattedName); - $response = $gapicClient->getCryptoKey($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.KeyManagementService/GetCryptoKey', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getCryptoKeyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->cryptoKeyName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]'); - $request = (new GetCryptoKeyRequest()) - ->setName($formattedName); - try { - $gapicClient->getCryptoKey($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getCryptoKeyVersionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $importJob = 'importJob2125587491'; - $importFailureReason = 'importFailureReason-494073229'; - $generationFailureReason = 'generationFailureReason1749803168'; - $externalDestructionFailureReason = 'externalDestructionFailureReason-2122384710'; - $reimportEligible = true; - $expectedResponse = new CryptoKeyVersion(); - $expectedResponse->setName($name2); - $expectedResponse->setImportJob($importJob); - $expectedResponse->setImportFailureReason($importFailureReason); - $expectedResponse->setGenerationFailureReason($generationFailureReason); - $expectedResponse->setExternalDestructionFailureReason($externalDestructionFailureReason); - $expectedResponse->setReimportEligible($reimportEligible); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); - $request = (new GetCryptoKeyVersionRequest()) - ->setName($formattedName); - $response = $gapicClient->getCryptoKeyVersion($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.KeyManagementService/GetCryptoKeyVersion', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getCryptoKeyVersionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); - $request = (new GetCryptoKeyVersionRequest()) - ->setName($formattedName); - try { - $gapicClient->getCryptoKeyVersion($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getImportJobTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $cryptoKeyBackend = 'cryptoKeyBackend-1526615498'; - $expectedResponse = new ImportJob(); - $expectedResponse->setName($name2); - $expectedResponse->setCryptoKeyBackend($cryptoKeyBackend); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->importJobName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[IMPORT_JOB]'); - $request = (new GetImportJobRequest()) - ->setName($formattedName); - $response = $gapicClient->getImportJob($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.KeyManagementService/GetImportJob', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getImportJobExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->importJobName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[IMPORT_JOB]'); - $request = (new GetImportJobRequest()) - ->setName($formattedName); - try { - $gapicClient->getImportJob($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getKeyRingTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new KeyRing(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->keyRingName('[PROJECT]', '[LOCATION]', '[KEY_RING]'); - $request = (new GetKeyRingRequest()) - ->setName($formattedName); - $response = $gapicClient->getKeyRing($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.KeyManagementService/GetKeyRing', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getKeyRingExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->keyRingName('[PROJECT]', '[LOCATION]', '[KEY_RING]'); - $request = (new GetKeyRingRequest()) - ->setName($formattedName); - try { - $gapicClient->getKeyRing($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getPublicKeyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $pem = 'pem110872'; - $name2 = 'name2-1052831874'; - $expectedResponse = new PublicKey(); - $expectedResponse->setPem($pem); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); - $request = (new GetPublicKeyRequest()) - ->setName($formattedName); - $response = $gapicClient->getPublicKey($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.KeyManagementService/GetPublicKey', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getPublicKeyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); - $request = (new GetPublicKeyRequest()) - ->setName($formattedName); - try { - $gapicClient->getPublicKey($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getRetiredResourceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $originalResource = 'originalResource-1264720196'; - $resourceType = 'resourceType979623115'; - $expectedResponse = new RetiredResource(); - $expectedResponse->setName($name2); - $expectedResponse->setOriginalResource($originalResource); - $expectedResponse->setResourceType($resourceType); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->retiredResourceName('[PROJECT]', '[LOCATION]', '[RETIRED_RESOURCE]'); - $request = (new GetRetiredResourceRequest()) - ->setName($formattedName); - $response = $gapicClient->getRetiredResource($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.KeyManagementService/GetRetiredResource', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getRetiredResourceExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->retiredResourceName('[PROJECT]', '[LOCATION]', '[RETIRED_RESOURCE]'); - $request = (new GetRetiredResourceRequest()) - ->setName($formattedName); - try { - $gapicClient->getRetiredResource($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function importCryptoKeyVersionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $importJob2 = 'importJob2-1714851050'; - $importFailureReason = 'importFailureReason-494073229'; - $generationFailureReason = 'generationFailureReason1749803168'; - $externalDestructionFailureReason = 'externalDestructionFailureReason-2122384710'; - $reimportEligible = true; - $expectedResponse = new CryptoKeyVersion(); - $expectedResponse->setName($name); - $expectedResponse->setImportJob($importJob2); - $expectedResponse->setImportFailureReason($importFailureReason); - $expectedResponse->setGenerationFailureReason($generationFailureReason); - $expectedResponse->setExternalDestructionFailureReason($externalDestructionFailureReason); - $expectedResponse->setReimportEligible($reimportEligible); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->cryptoKeyName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]'); - $algorithm = CryptoKeyVersionAlgorithm::CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED; - $importJob = 'importJob2125587491'; - $request = (new ImportCryptoKeyVersionRequest()) - ->setParent($formattedParent) - ->setAlgorithm($algorithm) - ->setImportJob($importJob); - $response = $gapicClient->importCryptoKeyVersion($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.KeyManagementService/ImportCryptoKeyVersion', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getAlgorithm(); - $this->assertProtobufEquals($algorithm, $actualValue); - $actualValue = $actualRequestObject->getImportJob(); - $this->assertProtobufEquals($importJob, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function importCryptoKeyVersionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->cryptoKeyName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]'); - $algorithm = CryptoKeyVersionAlgorithm::CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED; - $importJob = 'importJob2125587491'; - $request = (new ImportCryptoKeyVersionRequest()) - ->setParent($formattedParent) - ->setAlgorithm($algorithm) - ->setImportJob($importJob); - try { - $gapicClient->importCryptoKeyVersion($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listCryptoKeyVersionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $totalSize = 705419236; - $cryptoKeyVersionsElement = new CryptoKeyVersion(); - $cryptoKeyVersions = [ - $cryptoKeyVersionsElement, - ]; - $expectedResponse = new ListCryptoKeyVersionsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setTotalSize($totalSize); - $expectedResponse->setCryptoKeyVersions($cryptoKeyVersions); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->cryptoKeyName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]'); - $request = (new ListCryptoKeyVersionsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listCryptoKeyVersions($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getCryptoKeyVersions()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.KeyManagementService/ListCryptoKeyVersions', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listCryptoKeyVersionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->cryptoKeyName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]'); - $request = (new ListCryptoKeyVersionsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listCryptoKeyVersions($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listCryptoKeysTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $totalSize = 705419236; - $cryptoKeysElement = new CryptoKey(); - $cryptoKeys = [ - $cryptoKeysElement, - ]; - $expectedResponse = new ListCryptoKeysResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setTotalSize($totalSize); - $expectedResponse->setCryptoKeys($cryptoKeys); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->keyRingName('[PROJECT]', '[LOCATION]', '[KEY_RING]'); - $request = (new ListCryptoKeysRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listCryptoKeys($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getCryptoKeys()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.KeyManagementService/ListCryptoKeys', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listCryptoKeysExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->keyRingName('[PROJECT]', '[LOCATION]', '[KEY_RING]'); - $request = (new ListCryptoKeysRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listCryptoKeys($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listImportJobsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $totalSize = 705419236; - $importJobsElement = new ImportJob(); - $importJobs = [ - $importJobsElement, - ]; - $expectedResponse = new ListImportJobsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setTotalSize($totalSize); - $expectedResponse->setImportJobs($importJobs); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->keyRingName('[PROJECT]', '[LOCATION]', '[KEY_RING]'); - $request = (new ListImportJobsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listImportJobs($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getImportJobs()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.KeyManagementService/ListImportJobs', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listImportJobsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->keyRingName('[PROJECT]', '[LOCATION]', '[KEY_RING]'); - $request = (new ListImportJobsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listImportJobs($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listKeyRingsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $totalSize = 705419236; - $keyRingsElement = new KeyRing(); - $keyRings = [ - $keyRingsElement, - ]; - $expectedResponse = new ListKeyRingsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setTotalSize($totalSize); - $expectedResponse->setKeyRings($keyRings); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListKeyRingsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listKeyRings($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getKeyRings()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.KeyManagementService/ListKeyRings', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listKeyRingsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListKeyRingsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listKeyRings($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listRetiredResourcesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $totalSize = 705419236; - $retiredResourcesElement = new RetiredResource(); - $retiredResources = [ - $retiredResourcesElement, - ]; - $expectedResponse = new ListRetiredResourcesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setTotalSize($totalSize); - $expectedResponse->setRetiredResources($retiredResources); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListRetiredResourcesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listRetiredResources($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getRetiredResources()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.KeyManagementService/ListRetiredResources', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listRetiredResourcesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListRetiredResourcesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listRetiredResources($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function macSignTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $mac = '79'; - $verifiedDataCrc32c = true; - $expectedResponse = new MacSignResponse(); - $expectedResponse->setName($name2); - $expectedResponse->setMac($mac); - $expectedResponse->setVerifiedDataCrc32c($verifiedDataCrc32c); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); - $data = '-86'; - $request = (new MacSignRequest()) - ->setName($formattedName) - ->setData($data); - $response = $gapicClient->macSign($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.KeyManagementService/MacSign', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getData(); - $this->assertProtobufEquals($data, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function macSignExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); - $data = '-86'; - $request = (new MacSignRequest()) - ->setName($formattedName) - ->setData($data); - try { - $gapicClient->macSign($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function macVerifyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $success = false; - $verifiedDataCrc32c = true; - $verifiedMacCrc32c = false; - $verifiedSuccessIntegrity = true; - $expectedResponse = new MacVerifyResponse(); - $expectedResponse->setName($name2); - $expectedResponse->setSuccess($success); - $expectedResponse->setVerifiedDataCrc32c($verifiedDataCrc32c); - $expectedResponse->setVerifiedMacCrc32c($verifiedMacCrc32c); - $expectedResponse->setVerifiedSuccessIntegrity($verifiedSuccessIntegrity); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); - $data = '-86'; - $mac = '79'; - $request = (new MacVerifyRequest()) - ->setName($formattedName) - ->setData($data) - ->setMac($mac); - $response = $gapicClient->macVerify($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.KeyManagementService/MacVerify', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getData(); - $this->assertProtobufEquals($data, $actualValue); - $actualValue = $actualRequestObject->getMac(); - $this->assertProtobufEquals($mac, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function macVerifyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); - $data = '-86'; - $mac = '79'; - $request = (new MacVerifyRequest()) - ->setName($formattedName) - ->setData($data) - ->setMac($mac); - try { - $gapicClient->macVerify($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function rawDecryptTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $plaintext = '-9'; - $verifiedCiphertextCrc32c = true; - $verifiedAdditionalAuthenticatedDataCrc32c = true; - $verifiedInitializationVectorCrc32c = true; - $expectedResponse = new RawDecryptResponse(); - $expectedResponse->setPlaintext($plaintext); - $expectedResponse->setVerifiedCiphertextCrc32c($verifiedCiphertextCrc32c); - $expectedResponse->setVerifiedAdditionalAuthenticatedDataCrc32c($verifiedAdditionalAuthenticatedDataCrc32c); - $expectedResponse->setVerifiedInitializationVectorCrc32c($verifiedInitializationVectorCrc32c); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $ciphertext = '-72'; - $initializationVector = '-62'; - $request = (new RawDecryptRequest()) - ->setName($name) - ->setCiphertext($ciphertext) - ->setInitializationVector($initializationVector); - $response = $gapicClient->rawDecrypt($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.KeyManagementService/RawDecrypt', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $actualValue = $actualRequestObject->getCiphertext(); - $this->assertProtobufEquals($ciphertext, $actualValue); - $actualValue = $actualRequestObject->getInitializationVector(); - $this->assertProtobufEquals($initializationVector, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function rawDecryptExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $name = 'name3373707'; - $ciphertext = '-72'; - $initializationVector = '-62'; - $request = (new RawDecryptRequest()) - ->setName($name) - ->setCiphertext($ciphertext) - ->setInitializationVector($initializationVector); - try { - $gapicClient->rawDecrypt($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function rawEncryptTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $ciphertext = '-72'; - $initializationVector2 = '-11'; - $tagLength = 172791595; - $verifiedPlaintextCrc32c = false; - $verifiedAdditionalAuthenticatedDataCrc32c = true; - $verifiedInitializationVectorCrc32c = true; - $name2 = 'name2-1052831874'; - $expectedResponse = new RawEncryptResponse(); - $expectedResponse->setCiphertext($ciphertext); - $expectedResponse->setInitializationVector($initializationVector2); - $expectedResponse->setTagLength($tagLength); - $expectedResponse->setVerifiedPlaintextCrc32c($verifiedPlaintextCrc32c); - $expectedResponse->setVerifiedAdditionalAuthenticatedDataCrc32c($verifiedAdditionalAuthenticatedDataCrc32c); - $expectedResponse->setVerifiedInitializationVectorCrc32c($verifiedInitializationVectorCrc32c); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $plaintext = '-9'; - $request = (new RawEncryptRequest()) - ->setName($name) - ->setPlaintext($plaintext); - $response = $gapicClient->rawEncrypt($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.KeyManagementService/RawEncrypt', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $actualValue = $actualRequestObject->getPlaintext(); - $this->assertProtobufEquals($plaintext, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function rawEncryptExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $name = 'name3373707'; - $plaintext = '-9'; - $request = (new RawEncryptRequest()) - ->setName($name) - ->setPlaintext($plaintext); - try { - $gapicClient->rawEncrypt($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function restoreCryptoKeyVersionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $importJob = 'importJob2125587491'; - $importFailureReason = 'importFailureReason-494073229'; - $generationFailureReason = 'generationFailureReason1749803168'; - $externalDestructionFailureReason = 'externalDestructionFailureReason-2122384710'; - $reimportEligible = true; - $expectedResponse = new CryptoKeyVersion(); - $expectedResponse->setName($name2); - $expectedResponse->setImportJob($importJob); - $expectedResponse->setImportFailureReason($importFailureReason); - $expectedResponse->setGenerationFailureReason($generationFailureReason); - $expectedResponse->setExternalDestructionFailureReason($externalDestructionFailureReason); - $expectedResponse->setReimportEligible($reimportEligible); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); - $request = (new RestoreCryptoKeyVersionRequest()) - ->setName($formattedName); - $response = $gapicClient->restoreCryptoKeyVersion($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.KeyManagementService/RestoreCryptoKeyVersion', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function restoreCryptoKeyVersionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); - $request = (new RestoreCryptoKeyVersionRequest()) - ->setName($formattedName); - try { - $gapicClient->restoreCryptoKeyVersion($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateCryptoKeyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $importOnly = true; - $cryptoKeyBackend = 'cryptoKeyBackend-1526615498'; - $expectedResponse = new CryptoKey(); - $expectedResponse->setName($name); - $expectedResponse->setImportOnly($importOnly); - $expectedResponse->setCryptoKeyBackend($cryptoKeyBackend); - $transport->addResponse($expectedResponse); - // Mock request - $cryptoKey = new CryptoKey(); - $updateMask = new FieldMask(); - $request = (new UpdateCryptoKeyRequest()) - ->setCryptoKey($cryptoKey) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateCryptoKey($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.KeyManagementService/UpdateCryptoKey', $actualFuncCall); - $actualValue = $actualRequestObject->getCryptoKey(); - $this->assertProtobufEquals($cryptoKey, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateCryptoKeyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $cryptoKey = new CryptoKey(); - $updateMask = new FieldMask(); - $request = (new UpdateCryptoKeyRequest()) - ->setCryptoKey($cryptoKey) - ->setUpdateMask($updateMask); - try { - $gapicClient->updateCryptoKey($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateCryptoKeyPrimaryVersionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $importOnly = true; - $cryptoKeyBackend = 'cryptoKeyBackend-1526615498'; - $expectedResponse = new CryptoKey(); - $expectedResponse->setName($name2); - $expectedResponse->setImportOnly($importOnly); - $expectedResponse->setCryptoKeyBackend($cryptoKeyBackend); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->cryptoKeyName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]'); - $cryptoKeyVersionId = 'cryptoKeyVersionId729489152'; - $request = (new UpdateCryptoKeyPrimaryVersionRequest()) - ->setName($formattedName) - ->setCryptoKeyVersionId($cryptoKeyVersionId); - $response = $gapicClient->updateCryptoKeyPrimaryVersion($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.KeyManagementService/UpdateCryptoKeyPrimaryVersion', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getCryptoKeyVersionId(); - $this->assertProtobufEquals($cryptoKeyVersionId, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateCryptoKeyPrimaryVersionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->cryptoKeyName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]'); - $cryptoKeyVersionId = 'cryptoKeyVersionId729489152'; - $request = (new UpdateCryptoKeyPrimaryVersionRequest()) - ->setName($formattedName) - ->setCryptoKeyVersionId($cryptoKeyVersionId); - try { - $gapicClient->updateCryptoKeyPrimaryVersion($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateCryptoKeyVersionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $importJob = 'importJob2125587491'; - $importFailureReason = 'importFailureReason-494073229'; - $generationFailureReason = 'generationFailureReason1749803168'; - $externalDestructionFailureReason = 'externalDestructionFailureReason-2122384710'; - $reimportEligible = true; - $expectedResponse = new CryptoKeyVersion(); - $expectedResponse->setName($name); - $expectedResponse->setImportJob($importJob); - $expectedResponse->setImportFailureReason($importFailureReason); - $expectedResponse->setGenerationFailureReason($generationFailureReason); - $expectedResponse->setExternalDestructionFailureReason($externalDestructionFailureReason); - $expectedResponse->setReimportEligible($reimportEligible); - $transport->addResponse($expectedResponse); - // Mock request - $cryptoKeyVersion = new CryptoKeyVersion(); - $updateMask = new FieldMask(); - $request = (new UpdateCryptoKeyVersionRequest()) - ->setCryptoKeyVersion($cryptoKeyVersion) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateCryptoKeyVersion($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.KeyManagementService/UpdateCryptoKeyVersion', $actualFuncCall); - $actualValue = $actualRequestObject->getCryptoKeyVersion(); - $this->assertProtobufEquals($cryptoKeyVersion, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateCryptoKeyVersionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $cryptoKeyVersion = new CryptoKeyVersion(); - $updateMask = new FieldMask(); - $request = (new UpdateCryptoKeyVersionRequest()) - ->setCryptoKeyVersion($cryptoKeyVersion) - ->setUpdateMask($updateMask); - try { - $gapicClient->updateCryptoKeyVersion($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $request = new GetLocationRequest(); - $response = $gapicClient->getLocation($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new GetLocationRequest(); - try { - $gapicClient->getLocation($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $request = new ListLocationsRequest(); - $response = $gapicClient->listLocations($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new ListLocationsRequest(); - try { - $gapicClient->listLocations($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - $response = $gapicClient->getIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - try { - $gapicClient->getIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - $response = $gapicClient->setIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - try { - $gapicClient->setIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TestIamPermissionsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - $response = $gapicClient->testIamPermissions($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPermissions(); - $this->assertProtobufEquals($permissions, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - try { - $gapicClient->testIamPermissions($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function asymmetricDecryptAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $plaintext = '-9'; - $verifiedCiphertextCrc32c = true; - $expectedResponse = new AsymmetricDecryptResponse(); - $expectedResponse->setPlaintext($plaintext); - $expectedResponse->setVerifiedCiphertextCrc32c($verifiedCiphertextCrc32c); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); - $ciphertext = '-72'; - $request = (new AsymmetricDecryptRequest()) - ->setName($formattedName) - ->setCiphertext($ciphertext); - $response = $gapicClient->asymmetricDecryptAsync($request)->wait(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.KeyManagementService/AsymmetricDecrypt', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getCiphertext(); - $this->assertProtobufEquals($ciphertext, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -}